From f2401f32a2f2cf49acb46615cee500d9324a355f Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 12 Jun 2024 15:14:38 +0800 Subject: [PATCH 01/53] enh: support enable/disable tfs config entries --- include/util/tdef.h | 5 +- source/common/src/tglobal.c | 3 + source/dnode/mgmt/node_mgmt/src/dmEnv.c | 4 +- source/dnode/vnode/test/tsdbSmaTest.cpp | 1 + source/libs/tfs/src/tfs.c | 18 ++++++ source/libs/tfs/test/tfsTest.cpp | 12 ++++ source/util/src/tconfig.c | 79 ++++++++++++++++--------- 7 files changed, 89 insertions(+), 33 deletions(-) diff --git a/include/util/tdef.h b/include/util/tdef.h index 905a50886a..b813d590a4 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -539,6 +539,8 @@ typedef enum ELogicConditionType { #define TFS_MAX_LEVEL (TFS_MAX_TIERS - 1) #define TFS_PRIMARY_LEVEL 0 #define TFS_PRIMARY_ID 0 +#define TFS_ENTRY_DISABLE 0 +#define TFS_ENTRY_ENABLE 1 #define TFS_MIN_DISK_FREE_SIZE 50 * 1024 * 1024 enum { TRANS_STAT_INIT = 0, TRANS_STAT_EXECUTING, TRANS_STAT_EXECUTED, TRANS_STAT_ROLLBACKING, TRANS_STAT_ROLLBACKED }; @@ -548,7 +550,8 @@ enum { ENCRYPT_KEY_STAT_UNKNOWN = 0, ENCRYPT_KEY_STAT_UNSET, ENCRYPT_KEY_STAT_SE typedef struct { char dir[TSDB_FILENAME_LEN]; int32_t level; - int32_t primary; + int8_t primary; + int8_t enable; } SDiskCfg; typedef struct { diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index c68dc85c29..169bcf56a5 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -221,6 +221,8 @@ int32_t tsDiskCfgNum = 0; SDiskCfg tsDiskCfg[TFS_MAX_DISKS] = {0}; int64_t tsMinDiskFreeSize = TFS_MIN_DISK_FREE_SIZE; +int a = sizeof(tsDiskCfg); + // stream scheduler bool tsDeployOnSnode = true; @@ -325,6 +327,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) { tstrncpy(tsDiskCfg[0].dir, pItem->str, TSDB_FILENAME_LEN); tsDiskCfg[0].level = 0; tsDiskCfg[0].primary = 1; + tsDiskCfg[0].enable = 1; tstrncpy(tsDataDir, pItem->str, PATH_MAX); if (taosMulMkDir(tsDataDir) != 0) { uError("failed to create dataDir:%s", tsDataDir); diff --git a/source/dnode/mgmt/node_mgmt/src/dmEnv.c b/source/dnode/mgmt/node_mgmt/src/dmEnv.c index 5b1f31e6c6..d6031dee15 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmEnv.c +++ b/source/dnode/mgmt/node_mgmt/src/dmEnv.c @@ -110,10 +110,8 @@ static bool dmCheckDiskSpace() { int32_t dmDiskInit() { SDnode *pDnode = dmInstance(); - SDiskCfg dCfg = {0}; + SDiskCfg dCfg = {.level = 0, .primary = 1, .enable = 1}; tstrncpy(dCfg.dir, tsDataDir, TSDB_FILENAME_LEN); - dCfg.level = 0; - dCfg.primary = 1; SDiskCfg *pDisks = tsDiskCfg; int32_t numOfDisks = tsDiskCfgNum; if (numOfDisks <= 0 || pDisks == NULL) { diff --git a/source/dnode/vnode/test/tsdbSmaTest.cpp b/source/dnode/vnode/test/tsdbSmaTest.cpp index 43eaacfff9..e0e4f45feb 100644 --- a/source/dnode/vnode/test/tsdbSmaTest.cpp +++ b/source/dnode/vnode/test/tsdbSmaTest.cpp @@ -368,6 +368,7 @@ TEST(testCase, tSma_Data_Insert_Query_Test) { SDiskCfg pDisks = {0}; pDisks.level = 0; pDisks.primary = 1; + pDisks.enable = 1; strncpy(pDisks.dir, TD_DATA_DIR_PATH, TSDB_FILENAME_LEN); int32_t numOfDisks = 1; pTsdb->pTfs = tfsOpen(&pDisks, numOfDisks); diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index e7c4573c14..dd93b25186 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -519,6 +519,18 @@ static int32_t tfsCheckAndFormatCfg(STfs *pTfs, SDiskCfg *pCfg) { return -1; } + if (pCfg->primary < 0 || pCfg->primary > 1) { + fError("failed to mount %s to FS since invalid primary %" PRIi8, pCfg->dir, pCfg->primary); + terrno = TSDB_CODE_FS_INVLD_CFG; + return -1; + } + + if (pCfg->enable < 0 || pCfg->enable > 1) { + fError("failed to mount %s to FS since invalid enable %" PRIi8, pCfg->dir, pCfg->enable); + terrno = TSDB_CODE_FS_INVLD_CFG; + return -1; + } + if (pCfg->primary) { if (pCfg->level != 0) { fError("failed to mount %s to FS since disk is primary but level %d not 0", pCfg->dir, pCfg->level); @@ -526,6 +538,12 @@ static int32_t tfsCheckAndFormatCfg(STfs *pTfs, SDiskCfg *pCfg) { return -1; } + if (pCfg->enable == 0) { + fError("failed to mount %s to FS since disk is primary but enable %" PRIi8 " not 1", pCfg->dir, pCfg->enable); + terrno = TSDB_CODE_FS_INVLD_CFG; + return -1; + } + if (TFS_PRIMARY_DISK(pTfs) != NULL) { fError("failed to mount %s to FS since duplicate primary mount", pCfg->dir); terrno = TSDB_CODE_FS_DUP_PRIMARY; diff --git a/source/libs/tfs/test/tfsTest.cpp b/source/libs/tfs/test/tfsTest.cpp index 1f16e585ae..2c895f698a 100644 --- a/source/libs/tfs/test/tfsTest.cpp +++ b/source/libs/tfs/test/tfsTest.cpp @@ -37,6 +37,7 @@ TEST_F(TfsTest, 01_Open_Close) { tstrncpy(dCfg.dir, root, TSDB_FILENAME_LEN); dCfg.level = 0; dCfg.primary = 1; + dCfg.enable = 1; taosRemoveDir(root); STfs *pTfs = tfsOpen(&dCfg, 1); @@ -63,6 +64,7 @@ TEST_F(TfsTest, 02_AllocDisk) { tstrncpy(dCfg.dir, root, TSDB_FILENAME_LEN); dCfg.level = 0; dCfg.primary = 1; + dCfg.enable = 1; taosRemoveDir(root); taosMkDir(root); @@ -114,6 +116,7 @@ TEST_F(TfsTest, 03_Dir) { tstrncpy(dCfg.dir, root, TSDB_FILENAME_LEN); dCfg.level = 0; dCfg.primary = 1; + dCfg.enable = 1; taosRemoveDir(root); taosMkDir(root); @@ -330,30 +333,39 @@ TEST_F(TfsTest, 05_MultiDisk) { tstrncpy(dCfg[0].dir, root01, TSDB_FILENAME_LEN); dCfg[0].level = 0; dCfg[0].primary = 0; + dCfg[0].enable = 1; tstrncpy(dCfg[1].dir, root00, TSDB_FILENAME_LEN); dCfg[1].level = 0; dCfg[1].primary = 0; + dCfg[1].enable = 1; tstrncpy(dCfg[2].dir, root20, TSDB_FILENAME_LEN); dCfg[2].level = 2; dCfg[2].primary = 0; + dCfg[2].enable = 1; tstrncpy(dCfg[3].dir, root21, TSDB_FILENAME_LEN); dCfg[3].level = 2; dCfg[3].primary = 0; + dCfg[3].enable = 1; tstrncpy(dCfg[4].dir, root22, TSDB_FILENAME_LEN); dCfg[4].level = 2; dCfg[4].primary = 0; + dCfg[4].enable = 1; tstrncpy(dCfg[5].dir, root23, TSDB_FILENAME_LEN); dCfg[5].level = 2; dCfg[5].primary = 0; + dCfg[5].enable = 1; tstrncpy(dCfg[6].dir, root10, TSDB_FILENAME_LEN); dCfg[6].level = 1; dCfg[6].primary = 0; + dCfg[6].enable = 1; tstrncpy(dCfg[7].dir, root11, TSDB_FILENAME_LEN); dCfg[7].level = 1; dCfg[7].primary = 0; + dCfg[7].enable = 1; tstrncpy(dCfg[8].dir, root12, TSDB_FILENAME_LEN); dCfg[8].level = 1; dCfg[8].primary = 0; + dCfg[8].enable = 1; taosRemoveDir(root00); taosRemoveDir(root01); diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index d05d616233..6aad5cae28 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -259,7 +259,7 @@ static int32_t cfgSetTimezone(SConfigItem *pItem, const char *value, ECfgSrcType } static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value, const char *level, const char *primary, - ECfgSrcType stype) { + const char *enable, ECfgSrcType stype) { taosThreadMutexLock(&pCfg->lock); SConfigItem *pItem = cfgGetItem(pCfg, name); @@ -283,6 +283,7 @@ static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value, tstrncpy(cfg.dir, pItem->str, sizeof(cfg.dir)); cfg.level = level ? atoi(level) : 0; cfg.primary = primary ? atoi(primary) : 1; + cfg.enable = enable ? atoi(enable) : 1; void *ret = taosArrayPush(pItem->array, &cfg); if (ret == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -899,16 +900,16 @@ void cfgDumpCfg(SConfig *pCfg, bool tsc, bool dump) { } int32_t cfgLoadFromEnvVar(SConfig *pConfig) { - char line[1024], *name, *value, *value2, *value3; - int32_t olen, vlen, vlen2, vlen3; + char line[1024], *name, *value, *value2, *value3, *value4; + int32_t olen, vlen, vlen2, vlen3, vlen4; int32_t code = 0; char **pEnv = environ; line[1023] = 0; if (pEnv == NULL) return 0; while (*pEnv != NULL) { - name = value = value2 = value3 = NULL; - olen = vlen = vlen2 = vlen3 = 0; + name = value = value2 = value3 = value4 = NULL; + olen = vlen = vlen2 = vlen3 = vlen4 = 0; strncpy(line, *pEnv, sizeof(line) - 1); pEnv++; @@ -926,14 +927,18 @@ int32_t cfgLoadFromEnvVar(SConfig *pConfig) { if (vlen2 != 0) { value2[vlen2] = 0; paGetToken(value2 + vlen2 + 1, &value3, &vlen3); - if (vlen3 != 0) value3[vlen3] = 0; + if (vlen3 != 0) { + value3[vlen3] = 0; + paGetToken(value3 + vlen3 + 1, &value4, &vlen4); + if(vlen4 != 0) value4[vlen4] = 0; + } } code = cfgSetItem(pConfig, name, value, CFG_STYPE_ENV_VAR, true); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; if (strcasecmp(name, "dataDir") == 0) { - code = cfgSetTfsItem(pConfig, name, value, value2, value3, CFG_STYPE_ENV_VAR); + code = cfgSetTfsItem(pConfig, name, value, value2, value3, value4, CFG_STYPE_ENV_VAR); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; } } @@ -943,8 +948,8 @@ int32_t cfgLoadFromEnvVar(SConfig *pConfig) { } int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd) { - char buf[1024], *name, *value, *value2, *value3; - int32_t olen, vlen, vlen2, vlen3; + char buf[1024], *name, *value, *value2, *value3, *value4; + int32_t olen, vlen, vlen2, vlen3, vlen4; int32_t code = 0; int32_t index = 0; if (envCmd == NULL) return 0; @@ -954,8 +959,8 @@ int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd) { taosEnvToCfg(buf, buf); index++; - name = value = value2 = value3 = NULL; - olen = vlen = vlen2 = vlen3 = 0; + name = value = value2 = value3 = value4 = NULL; + olen = vlen = vlen2 = vlen3 = vlen4 = 0; paGetToken(buf, &name, &olen); if (olen == 0) continue; @@ -969,14 +974,18 @@ int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd) { if (vlen2 != 0) { value2[vlen2] = 0; paGetToken(value2 + vlen2 + 1, &value3, &vlen3); - if (vlen3 != 0) value3[vlen3] = 0; + if (vlen3 != 0) { + value3[vlen3] = 0; + paGetToken(value3 + vlen3 + 1, &value4, &vlen4); + if(vlen4 != 0) value4[vlen4] = 0; + } } code = cfgSetItem(pConfig, name, value, CFG_STYPE_ENV_CMD, true); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; if (strcasecmp(name, "dataDir") == 0) { - code = cfgSetTfsItem(pConfig, name, value, value2, value3, CFG_STYPE_ENV_CMD); + code = cfgSetTfsItem(pConfig, name, value, value2, value3, value4, CFG_STYPE_ENV_CMD); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; } } @@ -986,8 +995,8 @@ int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd) { } int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile) { - char line[1024], *name, *value, *value2, *value3; - int32_t olen, vlen, vlen2, vlen3; + char line[1024], *name, *value, *value2, *value3, *value4; + int32_t olen, vlen, vlen2, vlen3, vlen4; int32_t code = 0; ssize_t _bytes = 0; @@ -1012,8 +1021,8 @@ int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile) { } while (!taosEOFFile(pFile)) { - name = value = value2 = value3 = NULL; - olen = vlen = vlen2 = vlen3 = 0; + name = value = value2 = value3 = value4 = NULL; + olen = vlen = vlen2 = vlen3 = vlen4 = 0; _bytes = taosGetsFile(pFile, sizeof(line), line); if (_bytes <= 0) { @@ -1034,14 +1043,18 @@ int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile) { if (vlen2 != 0) { value2[vlen2] = 0; paGetToken(value2 + vlen2 + 1, &value3, &vlen3); - if (vlen3 != 0) value3[vlen3] = 0; + if (vlen3 != 0) { + value3[vlen3] = 0; + paGetToken(value3 + vlen3 + 1, &value4, &vlen4); + if(vlen4 != 0) value4[vlen4] = 0; + } } code = cfgSetItem(pConfig, name, value, CFG_STYPE_ENV_FILE, true); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; if (strcasecmp(name, "dataDir") == 0) { - code = cfgSetTfsItem(pConfig, name, value, value2, value3, CFG_STYPE_ENV_FILE); + code = cfgSetTfsItem(pConfig, name, value, value2, value3, value4, CFG_STYPE_ENV_FILE); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; } } @@ -1053,8 +1066,8 @@ int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile) { } int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) { - char line[1024], *name, *value, *value2, *value3; - int32_t olen, vlen, vlen2, vlen3; + char line[1024], *name, *value, *value2, *value3, *value4; + int32_t olen, vlen, vlen2, vlen3, vlen4; ssize_t _bytes = 0; int32_t code = 0; @@ -1072,8 +1085,8 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) { } while (!taosEOFFile(pFile)) { - name = value = value2 = value3 = NULL; - olen = vlen = vlen2 = vlen3 = 0; + name = value = value2 = value3 = value4 = NULL; + olen = vlen = vlen2 = vlen3 = vlen4 = 0; _bytes = taosGetsFile(pFile, sizeof(line), line); if (_bytes <= 0) { @@ -1114,7 +1127,11 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) { if (vlen2 != 0) { value2[vlen2] = 0; paGetToken(value2 + vlen2 + 1, &value3, &vlen3); - if (vlen3 != 0) value3[vlen3] = 0; + if (vlen3 != 0) { + value3[vlen3] = 0; + paGetToken(value3 + vlen3 + 1, &value4, &vlen4); + if (vlen4 != 0) value4[vlen4] = 0; + } } code = cfgSetItem(pConfig, name, value, CFG_STYPE_CFG_FILE, true); @@ -1122,7 +1139,7 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) { } if (strcasecmp(name, "dataDir") == 0) { - code = cfgSetTfsItem(pConfig, name, value, value2, value3, CFG_STYPE_CFG_FILE); + code = cfgSetTfsItem(pConfig, name, value, value2, value3, value4, CFG_STYPE_CFG_FILE); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; } @@ -1212,8 +1229,8 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) { // } int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) { - char *cfgLineBuf = NULL, *name, *value, *value2, *value3; - int32_t olen, vlen, vlen2, vlen3; + char *cfgLineBuf = NULL, *name, *value, *value2, *value3, *value4; + int32_t olen, vlen, vlen2, vlen3, vlen4; int32_t code = 0; if (url == NULL || strlen(url) == 0) { uInfo("apoll url not load"); @@ -1289,14 +1306,18 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) { if (vlen2 != 0) { value2[vlen2] = 0; paGetToken(value2 + vlen2 + 1, &value3, &vlen3); - if (vlen3 != 0) value3[vlen3] = 0; + if (vlen3 != 0) { + value3[vlen3] = 0; + paGetToken(value3 + vlen3 + 1, &value4, &vlen4); + if (vlen4 != 0) value4[vlen4] = 0; + } } code = cfgSetItem(pConfig, name, value, CFG_STYPE_APOLLO_URL, true); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; if (strcasecmp(name, "dataDir") == 0) { - code = cfgSetTfsItem(pConfig, name, value, value2, value3, CFG_STYPE_APOLLO_URL); + code = cfgSetTfsItem(pConfig, name, value, value2, value3, value4, CFG_STYPE_APOLLO_URL); if (code != 0 && terrno != TSDB_CODE_CFG_NOT_FOUND) break; } } From ff47e1eab1d4c6a471a48ba651bc7792c0a515a9 Mon Sep 17 00:00:00 2001 From: kailixu Date: Wed, 12 Jun 2024 17:12:30 +0800 Subject: [PATCH 02/53] enh: support enable/disable tfs config entries --- source/common/src/tglobal.c | 2 -- source/libs/tfs/src/tfs.c | 5 +++++ tests/system-test/0-others/multilevel.py | 11 ++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 169bcf56a5..0cdb1eb784 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -221,8 +221,6 @@ int32_t tsDiskCfgNum = 0; SDiskCfg tsDiskCfg[TFS_MAX_DISKS] = {0}; int64_t tsMinDiskFreeSize = TFS_MIN_DISK_FREE_SIZE; -int a = sizeof(tsDiskCfg); - // stream scheduler bool tsDeployOnSnode = true; diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index dd93b25186..e863f658e6 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -494,6 +494,11 @@ static int32_t tfsMount(STfs *pTfs, SDiskCfg *pCfg) { return -1; } + if (pCfg->enable == 0) { + fInfo("skip to mount disk %s to level %d since enable is %" PRIi8, pCfg->dir, pCfg->level, pCfg->enable); + return 0; + } + SDiskID did = {.level = pCfg->level}; STfsDisk *pDisk = tfsMountDiskToTier(TFS_TIER_AT(pTfs, did.level), pCfg); if (pDisk == NULL) { diff --git a/tests/system-test/0-others/multilevel.py b/tests/system-test/0-others/multilevel.py index 7b0ebb4b78..aaecbae50e 100644 --- a/tests/system-test/0-others/multilevel.py +++ b/tests/system-test/0-others/multilevel.py @@ -242,7 +242,7 @@ class TDTestCase: tdSql.execute('use dbtest') tdSql.execute('create table stb (ts timestamp,c0 int) tags(t0 int)') tdSql.execute('create table tb1 using stb tags(1)') - for i in range(10,30): + for i in range(1,600, 30): tdSql.execute(f'insert into tb1 values(now-{i}d,10)') tdSql.execute('flush database dbtest') time.sleep(3) @@ -250,21 +250,26 @@ class TDTestCase: tdDnodes.stop(1) cfg={ '/mnt/data1 0 1' : 'dataDir', - '/mnt/data2 1 0' : 'dataDir', - '/mnt/data3 2 0' : 'dataDir', + '/mnt/data2 1 0 1' : 'dataDir', + '/mnt/data3 1 0 0' : 'dataDir', + '/mnt/data4 1 0' : 'dataDir', } tdSql.createDir('/mnt/data2') tdSql.createDir('/mnt/data3') + tdSql.createDir('/mnt/data4') tdDnodes.deploy(1,cfg) tdDnodes.start(1) checkFiles('/mnt/data1/vnode/*/tsdb/v*',1) checkFiles('/mnt/data2/vnode/*/tsdb/v*',0) checkFiles('/mnt/data3/vnode/*/tsdb/v*',0) + checkFiles('/mnt/data4/vnode/*/tsdb/v*',0) tdSql.execute('alter database dbtest keep 10d,365d,3650d') tdSql.execute('trim database dbtest') time.sleep(3) checkFiles('/mnt/data1/vnode/*/tsdb/v*',1) checkFiles('/mnt/data2/vnode/*/tsdb/v*',1) + checkFiles('/mnt/data3/vnode/*/tsdb/v*',0) + checkFiles('/mnt/data4/vnode/*/tsdb/v*',1) def run(self): self.basic() From caa2884bc9a696cd6b1af8b93c5864a999b8e018 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 13 Jun 2024 14:13:23 +0800 Subject: [PATCH 03/53] enh: support enable/disable tfs config entries --- source/util/src/tconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index 6aad5cae28..17e1b3faf2 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -283,7 +283,7 @@ static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value, tstrncpy(cfg.dir, pItem->str, sizeof(cfg.dir)); cfg.level = level ? atoi(level) : 0; cfg.primary = primary ? atoi(primary) : 1; - cfg.enable = enable ? atoi(enable) : 1; + cfg.enable = (enable && enable[0]) ? atoi(enable) : 1; void *ret = taosArrayPush(pItem->array, &cfg); if (ret == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; From 7620be6e28e3a86fa6a19f6da12e0de0b1e76355 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Thu, 13 Jun 2024 16:23:50 +0800 Subject: [PATCH 04/53] optimize show cluster alive stmt --- include/common/taosdef.h | 4 - include/libs/nodes/querynodes.h | 1 + source/libs/command/src/command.c | 124 ------------ source/libs/nodes/src/nodesUtilFuncs.c | 12 ++ source/libs/parser/src/parAstParser.c | 13 ++ source/libs/parser/src/parTranslater.c | 252 +++++++++++++++++++++++-- tests/script/tsim/show/showalive.sim | 167 ++++++++++++++++ 7 files changed, 426 insertions(+), 147 deletions(-) create mode 100644 tests/script/tsim/show/showalive.sim diff --git a/include/common/taosdef.h b/include/common/taosdef.h index 9e92e2f569..c6e03dc1d8 100644 --- a/include/common/taosdef.h +++ b/include/common/taosdef.h @@ -30,10 +30,6 @@ typedef int64_t tb_uid_t; #define IS_TSWINDOW_SPECIFIED(win) (((win).skey != INT64_MIN) || ((win).ekey != INT64_MAX)) #define TSWINDOW_IS_EQUAL(t1, t2) (((t1).skey == (t2).skey) && ((t1).ekey == (t2).ekey)) -//define show cluster alive and show db.alive -#define SHOW_STATUS_NOT_AVAILABLE 0 -#define SHOW_STATUS_AVAILABLE 1 -#define SHOW_STATUS_HALF_AVAILABLE 2 typedef enum { TSDB_SUPER_TABLE = 1, // super table diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index befd6afce9..457937835d 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -628,6 +628,7 @@ char* nodesGetStrValueFromNode(SValueNode* pNode); void nodesValueNodeToVariant(const SValueNode* pNode, SVariant* pVal); SValueNode* nodesMakeValueNodeFromString(char* literal); SValueNode* nodesMakeValueNodeFromBool(bool b); +SNode* nodesMakeValueNodeFromInt32(int32_t value); char* nodesGetFillModeString(EFillMode mode); int32_t nodesMergeConds(SNode** pDst, SNodeList** pSrc); diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index d19b4c6913..9ab1348b9a 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -234,23 +234,6 @@ static int32_t buildCreateDBResultDataBlock(SSDataBlock** pOutput) { return code; } -static int32_t buildAliveResultDataBlock(SSDataBlock** pOutput) { - SSDataBlock* pBlock = createDataBlock(); - if (NULL == pBlock) { - return TSDB_CODE_OUT_OF_MEMORY; - } - - SColumnInfoData infoData = createColumnInfoData(TSDB_DATA_TYPE_INT, sizeof(int32_t), 1); - int32_t code = blockDataAppendColInfo(pBlock, &infoData); - - if (TSDB_CODE_SUCCESS == code) { - *pOutput = pBlock; - } else { - blockDataDestroy(pBlock); - } - return code; -} - int64_t getValOfDiffPrecision(int8_t unit, int64_t val) { int64_t v = 0; switch (unit) { @@ -398,110 +381,6 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbName, ch colDataSetVal(pCol2, 0, buf2, false); } -#define CHECK_LEADER(n) \ - (row[n] && (fields[n].type == TSDB_DATA_TYPE_VARCHAR && \ - strncasecmp(row[n], "leader", varDataLen((char*)row[n] - VARSTR_HEADER_SIZE)) == 0)) -// on this row, if have leader return true else return false -bool existLeaderRole(TAOS_ROW row, TAOS_FIELD* fields, int nFields) { - // vgroup_id | db_name | tables | v1_dnode | v1_status | v2_dnode | v2_status | v3_dnode | v3_status | v4_dnode | - // v4_status | cacheload | tsma | - if (nFields != 14) { - return false; - } - - // check have leader on cloumn v*_status on 4 6 8 10 - if (CHECK_LEADER(4) || CHECK_LEADER(6) || CHECK_LEADER(8) || CHECK_LEADER(10)) { - return true; - } - - return false; -} - -// get db alive status, return 1 is alive else return 0 -int32_t getAliveStatusFromApi(int64_t* pConnId, char* dbName, int32_t* pStatus) { - char sql[128 + TSDB_DB_NAME_LEN] = "select * from information_schema.ins_vgroups"; - int32_t code; - - // filter with db name - if (dbName && dbName[0] != 0) { - char str[64 + TSDB_DB_NAME_LEN] = ""; - // test db name exist - sprintf(str, "show create database %s ;", dbName); - TAOS_RES* dbRes = taos_query(pConnId, str); - code = taos_errno(dbRes); - if (code != TSDB_CODE_SUCCESS) { - taos_free_result(dbRes); - return code; - } - taos_free_result(dbRes); - - sprintf(str, " where db_name='%s' ;", dbName); - strcat(sql, str); - } - - TAOS_RES* res = taos_query(pConnId, sql); - code = taos_errno(res); - if (code != TSDB_CODE_SUCCESS) { - taos_free_result(res); - return code; - } - - TAOS_ROW row = NULL; - TAOS_FIELD* fields = taos_fetch_fields(res); - int32_t nFields = taos_num_fields(res); - int32_t nAvailble = 0; - int32_t nUnAvailble = 0; - - while ((row = taos_fetch_row(res)) != NULL) { - if (existLeaderRole(row, fields, nFields)) { - nAvailble++; - } else { - nUnAvailble++; - } - } - taos_free_result(res); - - int32_t status = 0; - if (nAvailble + nUnAvailble == 0 || nUnAvailble == 0) { - status = SHOW_STATUS_AVAILABLE; - } else if (nAvailble > 0 && nUnAvailble > 0) { - status = SHOW_STATUS_HALF_AVAILABLE; - } else { - status = SHOW_STATUS_NOT_AVAILABLE; - } - - if (pStatus) { - *pStatus = status; - } - return TSDB_CODE_SUCCESS; -} - -static int32_t setAliveResultIntoDataBlock(int64_t* pConnId, SSDataBlock* pBlock, char* dbName) { - blockDataEnsureCapacity(pBlock, 1); - pBlock->info.rows = 1; - - SColumnInfoData* pCol1 = taosArrayGet(pBlock->pDataBlock, 0); - int32_t status = 0; - int32_t code = getAliveStatusFromApi(pConnId, dbName, &status); - if (code == TSDB_CODE_SUCCESS) { - colDataSetVal(pCol1, 0, (const char*)&status, false); - } - return code; -} - -static int32_t execShowAliveStatus(int64_t* pConnId, SShowAliveStmt* pStmt, SRetrieveTableRsp** pRsp) { - SSDataBlock* pBlock = NULL; - int32_t code = buildAliveResultDataBlock(&pBlock); - if (TSDB_CODE_SUCCESS == code) { - code = setAliveResultIntoDataBlock(pConnId, pBlock, pStmt->dbName); - } - if (TSDB_CODE_SUCCESS == code) { - code = buildRetrieveTableRsp(pBlock, SHOW_ALIVE_RESULT_COLS, pRsp); - } - blockDataDestroy(pBlock); - return code; -} - static int32_t execShowCreateDatabase(SShowCreateDatabaseStmt* pStmt, SRetrieveTableRsp** pRsp) { SSDataBlock* pBlock = NULL; int32_t code = buildCreateDBResultDataBlock(&pBlock); @@ -1070,9 +949,6 @@ int32_t qExecCommand(int64_t* pConnId, bool sysInfoUser, SNode* pStmt, SRetrieve return execShowLocalVariables(pRsp); case QUERY_NODE_SELECT_STMT: return execSelectWithoutFrom((SSelectStmt*)pStmt, pRsp); - case QUERY_NODE_SHOW_DB_ALIVE_STMT: - case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT: - return execShowAliveStatus(pConnId, (SShowAliveStmt*)pStmt, pRsp); default: break; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index beedffc4f2..68ce33d596 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -2674,6 +2674,18 @@ SValueNode* nodesMakeValueNodeFromBool(bool b) { return pValNode; } +SNode* nodesMakeValueNodeFromInt32(int32_t value) { + SValueNode* pValNode = (SValueNode*)nodesMakeNode(QUERY_NODE_VALUE); + if (pValNode) { + pValNode->node.resType.type = TSDB_DATA_TYPE_INT; + pValNode->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes; + nodesSetValueNodeValue(pValNode, &value); + pValNode->translate = true; + pValNode->isNull = false; + } + return (SNode*)pValNode; +} + bool nodesIsStar(SNode* pNode) { return (QUERY_NODE_COLUMN == nodeType(pNode)) && ('\0' == ((SColumnNode*)pNode)->tableAlias[0]) && (0 == strcmp(((SColumnNode*)pNode)->colName, "*")); diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 122118b71c..aa2fd287c5 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -821,6 +821,16 @@ static int32_t collectMetaKeyFromShowTSMASStmt(SCollectMetaKeyCxt* pCxt, SShowSt pCxt->pMetaCache); } +static int32_t collectMetaKeyFromShowAlive(SCollectMetaKeyCxt* pCxt, SShowAliveStmt* pStmt) { + int32_t code = reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_VGROUPS, + pCxt->pMetaCache); + if (TSDB_CODE_SUCCESS == code) { + // just to verify whether the database exists + code = reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache); + } + return code; +} + static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { pCxt->pStmt = pStmt; switch (nodeType(pStmt)) { @@ -960,6 +970,9 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { break; case QUERY_NODE_SHOW_TSMAS_STMT: return collectMetaKeyFromShowTSMASStmt(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_DB_ALIVE_STMT: + case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT: + return collectMetaKeyFromShowAlive(pCxt, (SShowAliveStmt*)pStmt); default: break; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 1c4dbaa9e1..58a158bd97 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -33,6 +33,20 @@ #define SYSTABLE_SHOW_TYPE_OFFSET QUERY_NODE_SHOW_DNODES_STMT +#define CHECK_RES_OUT_OF_MEM(p) \ + do { \ + if (TSDB_CODE_SUCCESS != (p)) { \ + return TSDB_CODE_OUT_OF_MEMORY; \ + } \ + } while (0) + +#define CHECK_POINTER_OUT_OF_MEM(p) \ + do { \ + if (NULL == (p)) { \ + return TSDB_CODE_OUT_OF_MEMORY; \ + } \ + } while (0) + typedef struct SRewriteTbNameContext { int32_t errCode; char* pTbName; @@ -11545,20 +11559,6 @@ static int32_t extractShowCreateDatabaseResultSchema(int32_t* numOfCols, SSchema return TSDB_CODE_SUCCESS; } -static int32_t extractShowAliveResultSchema(int32_t* numOfCols, SSchema** pSchema) { - *numOfCols = 1; - *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); - if (NULL == (*pSchema)) { - return TSDB_CODE_OUT_OF_MEMORY; - } - - (*pSchema)[0].type = TSDB_DATA_TYPE_INT; - (*pSchema)[0].bytes = sizeof(int32_t); - strcpy((*pSchema)[0].name, "status"); - - return TSDB_CODE_SUCCESS; -} - static int32_t extractShowCreateTableResultSchema(int32_t* numOfCols, SSchema** pSchema) { *numOfCols = 2; *pSchema = taosMemoryCalloc((*numOfCols), sizeof(SSchema)); @@ -11656,9 +11656,6 @@ int32_t extractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pS } case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: return extractShowCreateDatabaseResultSchema(numOfCols, pSchema); - case QUERY_NODE_SHOW_DB_ALIVE_STMT: - case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT: - return extractShowAliveResultSchema(numOfCols, pSchema); case QUERY_NODE_SHOW_CREATE_TABLE_STMT: case QUERY_NODE_SHOW_CREATE_STABLE_STMT: return extractShowCreateTableResultSchema(numOfCols, pSchema); @@ -11785,6 +11782,24 @@ static int32_t createOperatorNode(EOperatorType opType, const char* pColName, SN return TSDB_CODE_SUCCESS; } +static int32_t createParOperatorNode(EOperatorType opType, const char* pLeftCol, const char* pRightCol, SNode** ppResOp) { + SOperatorNode* pOper = (SOperatorNode*)nodesMakeNode(QUERY_NODE_OPERATOR); + CHECK_POINTER_OUT_OF_MEM(pOper); + + pOper->opType = opType; + pOper->pLeft = nodesMakeNode(QUERY_NODE_COLUMN); + pOper->pRight = nodesMakeNode(QUERY_NODE_COLUMN); + if (NULL == pOper->pLeft || NULL == pOper->pRight) { + nodesDestroyNode((SNode*)pOper); + return TSDB_CODE_OUT_OF_MEMORY; + } + strcpy(((SColumnNode*)pOper->pLeft)->colName, pLeftCol); + strcpy(((SColumnNode*)pOper->pRight)->colName, pRightCol); + + *ppResOp = (SNode*)pOper; + return TSDB_CODE_SUCCESS; +} + static const char* getTbNameColName(ENodeType type) { const char* colName; switch (type) { @@ -13312,6 +13327,203 @@ static int32_t rewriteShowCompactDetailsStmt(STranslateContext* pCxt, SQuery* pQ return code; } +static int32_t createParWhenThenNode(SNode* pWhen, SNode* pThen, SNode** ppResWhenThen) { + SWhenThenNode* pWThen = (SWhenThenNode*)nodesMakeNode(QUERY_NODE_WHEN_THEN); + CHECK_POINTER_OUT_OF_MEM(pWThen); + + pWThen->pWhen = pWhen; + pWThen->pThen = pThen; + *ppResWhenThen = (SNode*)pWThen; + return TSDB_CODE_SUCCESS; +} + +static int32_t createParCaseWhenNode(SNode* pCase, SNodeList* pWhenThenList, SNode* pElse, const char* pAias, SNode** ppResCaseWhen) { + SCaseWhenNode* pCaseWhen = (SCaseWhenNode*)nodesMakeNode(QUERY_NODE_CASE_WHEN); + CHECK_POINTER_OUT_OF_MEM(pCaseWhen); + + pCaseWhen->pCase = pCase; + pCaseWhen->pWhenThenList = pWhenThenList; + pCaseWhen->pElse = pElse; + if (pAias) { + strcpy(pCaseWhen->node.aliasName, pAias); + strcpy(pCaseWhen->node.userAlias, pAias); + } + *ppResCaseWhen = (SNode*)pCaseWhen; + return TSDB_CODE_SUCCESS; +} + +static int32_t createParFunctionNode(const char* pFunName, const char* pAias, SNodeList* pParameterList, SNode** ppResFunc) { + SFunctionNode* pFunc = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION); + CHECK_POINTER_OUT_OF_MEM(pFunc); + strcpy(pFunc->functionName, pFunName); + strcpy(pFunc->node.aliasName, pAias); + strcpy(pFunc->node.userAlias, pAias); + pFunc->pParameterList = pParameterList; + *ppResFunc = (SNode*)pFunc; + return TSDB_CODE_SUCCESS; +} + +static int32_t createParListNode(SNode* pItem, SNodeList** ppResList) { + SNodeList* pList = nodesMakeList(); + CHECK_POINTER_OUT_OF_MEM(pList); + CHECK_RES_OUT_OF_MEM(nodesListStrictAppend(pList, pItem)); + *ppResList = pList; + return TSDB_CODE_SUCCESS; +} + +static int32_t createParTempTableNode(SSelectStmt* pSubquery, SNode** ppResTempTable) { + STempTableNode* pTempTable = (STempTableNode*)nodesMakeNode(QUERY_NODE_TEMP_TABLE); + CHECK_POINTER_OUT_OF_MEM(pTempTable); + pTempTable->pSubquery = (SNode*)pSubquery; + taosRandStr(pTempTable->table.tableAlias, 8); + strcpy(pSubquery->stmtName, pTempTable->table.tableAlias); + pSubquery->isSubquery = true; + *ppResTempTable = (SNode*)pTempTable; + return TSDB_CODE_SUCCESS; +} + +static int32_t rewriteShowAliveStmt(STranslateContext* pCxt, SQuery* pQuery) { + int32_t code = TSDB_CODE_SUCCESS; + char* pDbName = ((SShowAliveStmt*)pQuery->pRoot)->dbName; + if (pDbName && pDbName[0] != 0) { + SDbCfgInfo dbCfg = {0}; + code = getDBCfg(pCxt, pDbName, &dbCfg); + if (TSDB_CODE_SUCCESS != code) { + return code; + } + } + + SValueNode* pValNode = nodesMakeValueNodeFromString("leader"); + CHECK_POINTER_OUT_OF_MEM(pValNode); + + SNode* pCond1 = NULL; + SNode* pCond2 = NULL; + SNode* pCond3 = NULL; + SNode* pCond4 = NULL; + CHECK_RES_OUT_OF_MEM(createOperatorNode(OP_TYPE_EQUAL, "v1_status", (SNode*)pValNode, &pCond1)); + CHECK_RES_OUT_OF_MEM(createOperatorNode(OP_TYPE_EQUAL, "v2_status", (SNode*)pValNode, &pCond2)); + CHECK_RES_OUT_OF_MEM(createOperatorNode(OP_TYPE_EQUAL, "v3_status", (SNode*)pValNode, &pCond3)); + CHECK_RES_OUT_OF_MEM(createOperatorNode(OP_TYPE_EQUAL, "v4_status", (SNode*)pValNode, &pCond4)); + nodesDestroyNode((SNode*)pValNode); + + SNode* pTemp1 = NULL; + SNode* pTemp2 = NULL; + SNode* pFullCond = NULL; + CHECK_RES_OUT_OF_MEM(createLogicCondNode(pCond1, pCond2, &pTemp1, LOGIC_COND_TYPE_OR)); + CHECK_RES_OUT_OF_MEM(createLogicCondNode(pTemp1, pCond3, &pTemp2, LOGIC_COND_TYPE_OR)); + CHECK_RES_OUT_OF_MEM(createLogicCondNode(pTemp2, pCond4, &pFullCond, LOGIC_COND_TYPE_OR)); + + SNode* pThen = nodesMakeValueNodeFromInt32(1); + CHECK_POINTER_OUT_OF_MEM(pThen); + + SNode* pWhenThen = NULL; + CHECK_RES_OUT_OF_MEM(createParWhenThenNode(pFullCond, pThen, &pWhenThen)); + SNodeList* pWhenThenlist = NULL; + CHECK_RES_OUT_OF_MEM(createParListNode(pWhenThen, &pWhenThenlist)); + + SNode* pElse = nodesMakeValueNodeFromInt32(0); + CHECK_POINTER_OUT_OF_MEM(pElse); + + // case when (v1_status = "leader" or v2_status = "lead er" or v3_status = "leader" or v4_status = "leader") then 1 else 0 end + SNode* pCaseWhen = NULL; + CHECK_RES_OUT_OF_MEM(createParCaseWhenNode(NULL, pWhenThenlist, pElse, NULL, &pCaseWhen)); + + SNodeList* pParaList = NULL; + CHECK_RES_OUT_OF_MEM(createParListNode(pCaseWhen, &pParaList)); + + + // sum( case when ... end) as leader_col + SNode* pSumFun = NULL; + const char* pSumColAlias = "leader_col"; + CHECK_RES_OUT_OF_MEM(createParFunctionNode("sum", pSumColAlias, pParaList, &pSumFun)); + + SNode* pPara1 = nodesMakeValueNodeFromInt32(1); + CHECK_POINTER_OUT_OF_MEM(pThen); + pParaList = NULL; + CHECK_RES_OUT_OF_MEM(createParListNode(pPara1, &pParaList)); + + // count(1) as count_col + SNode* pCountFun = NULL; + const char* pCountColAlias = "count_col"; + CHECK_RES_OUT_OF_MEM(createParFunctionNode("count", pCountColAlias, pParaList, &pCountFun)); + + SNodeList* pProjList = NULL; + CHECK_RES_OUT_OF_MEM(createParListNode(pSumFun, &pProjList)); + CHECK_RES_OUT_OF_MEM(nodesListStrictAppend(pProjList, pCountFun)); + + SSelectStmt* pSubSelect = NULL; + // select sum( case when .... end) as leader_col, count(*) as count_col from information_schema.ins_vgroups + CHECK_RES_OUT_OF_MEM(createSimpleSelectStmtFromProjList(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_VGROUPS, pProjList, &pSubSelect)); + + if (pDbName && pDbName[0] != 0) { + // for show db.alive + // select sum( case when .... end) as leader_col, count(*) as count_col from information_schema.ins_vgroups where db_name = "..." + SNode* pDbCond = NULL; + pValNode = nodesMakeValueNodeFromString(pDbName); + CHECK_RES_OUT_OF_MEM(createOperatorNode(OP_TYPE_EQUAL, "db_name", (SNode*)pValNode, &pDbCond)); + nodesDestroyNode((SNode*)pValNode); + pCxt->showRewrite = false; + pQuery->showRewrite = false; + pSubSelect->pWhere = pDbCond; + } + + + + pCond1 = NULL; + CHECK_RES_OUT_OF_MEM(createParOperatorNode(OP_TYPE_EQUAL, pSumColAlias, pCountColAlias, &pCond1)); + pCond2 = NULL; + SNode* pTempVal = nodesMakeValueNodeFromInt32(0); + CHECK_RES_OUT_OF_MEM(createOperatorNode(OP_TYPE_GREATER_THAN, pSumColAlias, pTempVal, &pCond2)); + //leader_col = count_col and leader_col > 0 + pTemp1 = NULL; + CHECK_RES_OUT_OF_MEM(createLogicCondNode(pCond1, pCond2, &pTemp1, LOGIC_COND_TYPE_AND)); + + pThen = nodesMakeValueNodeFromInt32(1); + CHECK_POINTER_OUT_OF_MEM(pThen); + pWhenThen = NULL; + CHECK_RES_OUT_OF_MEM(createParWhenThenNode(pTemp1, pThen, &pWhenThen)); + pWhenThenlist = NULL; + CHECK_RES_OUT_OF_MEM(createParListNode(pWhenThen, &pWhenThenlist)); + + pCond1 = NULL; + CHECK_RES_OUT_OF_MEM(createParOperatorNode(OP_TYPE_LOWER_THAN, pSumColAlias, pCountColAlias, &pCond1)); + pCond2 = NULL; + CHECK_RES_OUT_OF_MEM(createOperatorNode(OP_TYPE_GREATER_THAN, pSumColAlias, pTempVal, &pCond2)); + // leader_col < count_col and leader_col > 0 + pTemp2 = NULL; + CHECK_RES_OUT_OF_MEM(createLogicCondNode(pCond1, pCond2, &pTemp2, LOGIC_COND_TYPE_AND)); + nodesDestroyNode((SNode*)pTempVal); + + pThen = nodesMakeValueNodeFromInt32(2); + CHECK_POINTER_OUT_OF_MEM(pThen); + pWhenThen = NULL; + CHECK_RES_OUT_OF_MEM(createParWhenThenNode(pTemp2, pThen, &pWhenThen)); + CHECK_RES_OUT_OF_MEM(nodesListStrictAppend(pWhenThenlist, pWhenThen)); + + // case when leader_col = count_col and count_col > 0 then 1 when leader_col < count_col and count_col > 0 then 2 else 0 end as status + pCaseWhen = NULL; + pElse = nodesMakeValueNodeFromInt32(0); + CHECK_POINTER_OUT_OF_MEM(pElse); + CHECK_RES_OUT_OF_MEM(createParCaseWhenNode(NULL, pWhenThenlist, pElse, "status", &pCaseWhen)); + + pProjList = NULL; + CHECK_RES_OUT_OF_MEM(createParListNode(pCaseWhen, &pProjList)); + + SNode* pTempTblNode = NULL; + CHECK_RES_OUT_OF_MEM(createParTempTableNode(pSubSelect, &pTempTblNode)); + + + SSelectStmt* pStmt = (SSelectStmt*)nodesMakeNode(QUERY_NODE_SELECT_STMT); + CHECK_POINTER_OUT_OF_MEM(pStmt); + pStmt->pProjectionList = pProjList; + pStmt->pFromTable = pTempTblNode; + sprintf(pStmt->stmtName, "%p", pStmt); + + nodesDestroyNode(pQuery->pRoot); + pQuery->pRoot = (SNode*)pStmt; + return TSDB_CODE_SUCCESS; +} + static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { int32_t code = TSDB_CODE_SUCCESS; switch (nodeType(pQuery->pRoot)) { @@ -13388,6 +13600,10 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_COMPACT_DETAILS_STMT: code = rewriteShowCompactDetailsStmt(pCxt, pQuery); break; + case QUERY_NODE_SHOW_DB_ALIVE_STMT: + case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT: + code = rewriteShowAliveStmt(pCxt, pQuery); + break; default: break; } @@ -13479,8 +13695,6 @@ static int32_t setQuery(STranslateContext* pCxt, SQuery* pQuery) { break; case QUERY_NODE_DESCRIBE_STMT: case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: - case QUERY_NODE_SHOW_DB_ALIVE_STMT: - case QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT: case QUERY_NODE_SHOW_CREATE_TABLE_STMT: case QUERY_NODE_SHOW_CREATE_STABLE_STMT: case QUERY_NODE_SHOW_CREATE_VIEW_STMT: diff --git a/tests/script/tsim/show/showalive.sim b/tests/script/tsim/show/showalive.sim new file mode 100644 index 0000000000..4cad1da01d --- /dev/null +++ b/tests/script/tsim/show/showalive.sim @@ -0,0 +1,167 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/deploy.sh -n dnode2 -i 2 +system sh/deploy.sh -n dnode3 -i 3 +system sh/deploy.sh -n dnode4 -i 4 +system sh/exec.sh -n dnode1 -s start +system sh/exec.sh -n dnode2 -s start +system sh/exec.sh -n dnode3 -s start +system sh/exec.sh -n dnode4 -s start + +sleep 1000 + +sql connect + + +print =============== add dnode into cluster +sql create dnode $hostname1 port 7200 +sql create dnode $hostname2 port 7300 +sql create dnode $hostname3 port 7400 +sql create dnode $hostname4 port 7500 + +sleep 1000 + +print =============== create database, stable, table +sql create database test vgroups 6; +sql use test; +sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int); +sql create table t1 using st tags(1,1,1); +sql create table t2 using st tags(2,2,2); +sql insert into t1 values(1648791211000,1,2,3); +sql insert into t1 values(1648791222001,2,2,3); +sql insert into t2 values(1648791211000,1,2,3); +sql insert into t2 values(1648791222001,2,2,3); + +$loop_count = 0 + +loop0: + +sleep 1000 + +$loop_count = $loop_count + 1 +if $loop_count == 20 then + return -1 +endi + +print show cluster alive; +sql show cluster alive; + +if $data00 != 1 then + print =====data00=$data00 + goto loop0 +endi + +print show test.alive; +sql show test.alive; + +if $data00 != 1 then + print =====data00=$data00 + goto loop0 +endi + +print stop dnode3 +print stop dnode4 +system sh/exec.sh -n dnode3 -s stop -x SIGKILL +system sh/exec.sh -n dnode4 -s stop -x SIGKILL + +$loop_count = 0 + +loop1: + +sleep 1000 + +$loop_count = $loop_count + 1 +if $loop_count == 20 then + return -1 +endi + +print show cluster alive; +sql show cluster alive; + +if $data00 != 2 then + print =====data00=$data00 + goto loop1 +endi + +print show test.alive +sql show test.alive; + +if $data00 != 2 then + print =====data00=$data00 + goto loop1 +endi + + +sql create database test1 vgroups 2; + +$loop_count = 0 + +loop2: + +sleep 1000 + +$loop_count = $loop_count + 1 +if $loop_count == 20 then + return -1 +endi + +print show cluster alive; +sql show cluster alive; + +if $data00 != 2 then + goto loop2 +endi + +print show test1.alive; +sql show test1.alive; + +if $data00 != 1 then + print =====data00=$data00 + goto loop2 +endi + +print stop dnode2 + +system sh/exec.sh -n dnode2 -s stop -x SIGKILL + + +$loop_count = 0 + +loop3: + +sleep 1000 + +$loop_count = $loop_count + 1 +if $loop_count == 20 then + return -1 +endi + + +print show cluster alive; +sql show cluster alive; + +if $data00 != 2 then + print =====data00=$data00 + goto loop3 +endi + +print show test.alive; +sql show test.alive; + +if $data00 != 2 then + print =====data00=$data00 + goto loop3 +endi + +sql show test1.alive; + +if $data00 != 2 then + print =====data00=$data00 + goto loop3 +endi + + +system sh/exec.sh -n dnode1 -s stop -x SIGINT +system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec.sh -n dnode3 -s stop -x SIGINT +system sh/exec.sh -n dnode4 -s stop -x SIGINT From 4ed3b303527bc91004777f66a6ef8632d9aa5837 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 17 Jun 2024 06:14:49 +0800 Subject: [PATCH 05/53] tfs: support disable create new file --- include/util/tdef.h | 4 +--- source/common/src/tglobal.c | 2 +- source/dnode/mgmt/node_mgmt/src/dmEnv.c | 2 +- source/dnode/vnode/test/tsdbSmaTest.cpp | 2 +- source/libs/tfs/src/tfs.c | 14 ++++---------- source/libs/tfs/test/tfsTest.cpp | 24 ++++++++++++------------ source/util/src/tconfig.c | 4 ++-- 7 files changed, 22 insertions(+), 30 deletions(-) diff --git a/include/util/tdef.h b/include/util/tdef.h index b813d590a4..a7ebb4da22 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -539,8 +539,6 @@ typedef enum ELogicConditionType { #define TFS_MAX_LEVEL (TFS_MAX_TIERS - 1) #define TFS_PRIMARY_LEVEL 0 #define TFS_PRIMARY_ID 0 -#define TFS_ENTRY_DISABLE 0 -#define TFS_ENTRY_ENABLE 1 #define TFS_MIN_DISK_FREE_SIZE 50 * 1024 * 1024 enum { TRANS_STAT_INIT = 0, TRANS_STAT_EXECUTING, TRANS_STAT_EXECUTED, TRANS_STAT_ROLLBACKING, TRANS_STAT_ROLLBACKED }; @@ -551,7 +549,7 @@ typedef struct { char dir[TSDB_FILENAME_LEN]; int32_t level; int8_t primary; - int8_t enable; + int8_t disable; // disable create new file } SDiskCfg; typedef struct { diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index f76ea35a23..827f22b553 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -326,7 +326,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) { tstrncpy(tsDiskCfg[0].dir, pItem->str, TSDB_FILENAME_LEN); tsDiskCfg[0].level = 0; tsDiskCfg[0].primary = 1; - tsDiskCfg[0].enable = 1; + tsDiskCfg[0].disable = 0; tstrncpy(tsDataDir, pItem->str, PATH_MAX); if (taosMulMkDir(tsDataDir) != 0) { uError("failed to create dataDir:%s", tsDataDir); diff --git a/source/dnode/mgmt/node_mgmt/src/dmEnv.c b/source/dnode/mgmt/node_mgmt/src/dmEnv.c index d6031dee15..54a118b666 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmEnv.c +++ b/source/dnode/mgmt/node_mgmt/src/dmEnv.c @@ -110,7 +110,7 @@ static bool dmCheckDiskSpace() { int32_t dmDiskInit() { SDnode *pDnode = dmInstance(); - SDiskCfg dCfg = {.level = 0, .primary = 1, .enable = 1}; + SDiskCfg dCfg = {.level = 0, .primary = 1, .disable = 0}; tstrncpy(dCfg.dir, tsDataDir, TSDB_FILENAME_LEN); SDiskCfg *pDisks = tsDiskCfg; int32_t numOfDisks = tsDiskCfgNum; diff --git a/source/dnode/vnode/test/tsdbSmaTest.cpp b/source/dnode/vnode/test/tsdbSmaTest.cpp index e0e4f45feb..8b19c0dc95 100644 --- a/source/dnode/vnode/test/tsdbSmaTest.cpp +++ b/source/dnode/vnode/test/tsdbSmaTest.cpp @@ -368,7 +368,7 @@ TEST(testCase, tSma_Data_Insert_Query_Test) { SDiskCfg pDisks = {0}; pDisks.level = 0; pDisks.primary = 1; - pDisks.enable = 1; + pDisks.disable = 0; strncpy(pDisks.dir, TD_DATA_DIR_PATH, TSDB_FILENAME_LEN); int32_t numOfDisks = 1; pTsdb->pTfs = tfsOpen(&pDisks, numOfDisks); diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index e863f658e6..2c3ca9b86c 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -494,8 +494,8 @@ static int32_t tfsMount(STfs *pTfs, SDiskCfg *pCfg) { return -1; } - if (pCfg->enable == 0) { - fInfo("skip to mount disk %s to level %d since enable is %" PRIi8, pCfg->dir, pCfg->level, pCfg->enable); + if (pCfg->disable == 1) { + fInfo("skip to mount disk %s to level %d since disable is %" PRIi8, pCfg->dir, pCfg->level, pCfg->disable); return 0; } @@ -530,8 +530,8 @@ static int32_t tfsCheckAndFormatCfg(STfs *pTfs, SDiskCfg *pCfg) { return -1; } - if (pCfg->enable < 0 || pCfg->enable > 1) { - fError("failed to mount %s to FS since invalid enable %" PRIi8, pCfg->dir, pCfg->enable); + if (pCfg->disable < 0 || pCfg->disable > 1) { + fError("failed to mount %s to FS since invalid disable %" PRIi8, pCfg->dir, pCfg->disable); terrno = TSDB_CODE_FS_INVLD_CFG; return -1; } @@ -543,12 +543,6 @@ static int32_t tfsCheckAndFormatCfg(STfs *pTfs, SDiskCfg *pCfg) { return -1; } - if (pCfg->enable == 0) { - fError("failed to mount %s to FS since disk is primary but enable %" PRIi8 " not 1", pCfg->dir, pCfg->enable); - terrno = TSDB_CODE_FS_INVLD_CFG; - return -1; - } - if (TFS_PRIMARY_DISK(pTfs) != NULL) { fError("failed to mount %s to FS since duplicate primary mount", pCfg->dir); terrno = TSDB_CODE_FS_DUP_PRIMARY; diff --git a/source/libs/tfs/test/tfsTest.cpp b/source/libs/tfs/test/tfsTest.cpp index 2c895f698a..d8c117818e 100644 --- a/source/libs/tfs/test/tfsTest.cpp +++ b/source/libs/tfs/test/tfsTest.cpp @@ -37,7 +37,7 @@ TEST_F(TfsTest, 01_Open_Close) { tstrncpy(dCfg.dir, root, TSDB_FILENAME_LEN); dCfg.level = 0; dCfg.primary = 1; - dCfg.enable = 1; + dCfg.disable = 0; taosRemoveDir(root); STfs *pTfs = tfsOpen(&dCfg, 1); @@ -64,7 +64,7 @@ TEST_F(TfsTest, 02_AllocDisk) { tstrncpy(dCfg.dir, root, TSDB_FILENAME_LEN); dCfg.level = 0; dCfg.primary = 1; - dCfg.enable = 1; + dCfg.disable = 0; taosRemoveDir(root); taosMkDir(root); @@ -116,7 +116,7 @@ TEST_F(TfsTest, 03_Dir) { tstrncpy(dCfg.dir, root, TSDB_FILENAME_LEN); dCfg.level = 0; dCfg.primary = 1; - dCfg.enable = 1; + dCfg.disable = 0; taosRemoveDir(root); taosMkDir(root); @@ -333,39 +333,39 @@ TEST_F(TfsTest, 05_MultiDisk) { tstrncpy(dCfg[0].dir, root01, TSDB_FILENAME_LEN); dCfg[0].level = 0; dCfg[0].primary = 0; - dCfg[0].enable = 1; + dCfg[0].disable = 0; tstrncpy(dCfg[1].dir, root00, TSDB_FILENAME_LEN); dCfg[1].level = 0; dCfg[1].primary = 0; - dCfg[1].enable = 1; + dCfg[1].disable = 0; tstrncpy(dCfg[2].dir, root20, TSDB_FILENAME_LEN); dCfg[2].level = 2; dCfg[2].primary = 0; - dCfg[2].enable = 1; + dCfg[2].disable = 0; tstrncpy(dCfg[3].dir, root21, TSDB_FILENAME_LEN); dCfg[3].level = 2; dCfg[3].primary = 0; - dCfg[3].enable = 1; + dCfg[3].disable = 0; tstrncpy(dCfg[4].dir, root22, TSDB_FILENAME_LEN); dCfg[4].level = 2; dCfg[4].primary = 0; - dCfg[4].enable = 1; + dCfg[4].disable = 0; tstrncpy(dCfg[5].dir, root23, TSDB_FILENAME_LEN); dCfg[5].level = 2; dCfg[5].primary = 0; - dCfg[5].enable = 1; + dCfg[5].disable = 0; tstrncpy(dCfg[6].dir, root10, TSDB_FILENAME_LEN); dCfg[6].level = 1; dCfg[6].primary = 0; - dCfg[6].enable = 1; + dCfg[6].disable = 0; tstrncpy(dCfg[7].dir, root11, TSDB_FILENAME_LEN); dCfg[7].level = 1; dCfg[7].primary = 0; - dCfg[7].enable = 1; + dCfg[7].disable = 0; tstrncpy(dCfg[8].dir, root12, TSDB_FILENAME_LEN); dCfg[8].level = 1; dCfg[8].primary = 0; - dCfg[8].enable = 1; + dCfg[8].disable = 0; taosRemoveDir(root00); taosRemoveDir(root01); diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index 17e1b3faf2..8be38a811f 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -259,7 +259,7 @@ static int32_t cfgSetTimezone(SConfigItem *pItem, const char *value, ECfgSrcType } static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value, const char *level, const char *primary, - const char *enable, ECfgSrcType stype) { + const char *disable, ECfgSrcType stype) { taosThreadMutexLock(&pCfg->lock); SConfigItem *pItem = cfgGetItem(pCfg, name); @@ -283,7 +283,7 @@ static int32_t cfgSetTfsItem(SConfig *pCfg, const char *name, const char *value, tstrncpy(cfg.dir, pItem->str, sizeof(cfg.dir)); cfg.level = level ? atoi(level) : 0; cfg.primary = primary ? atoi(primary) : 1; - cfg.enable = (enable && enable[0]) ? atoi(enable) : 1; + cfg.disable = disable ? atoi(disable) : 0; void *ret = taosArrayPush(pItem->array, &cfg); if (ret == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; From bb40184260163decf661fb843521945131e3dc8d Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 17 Jun 2024 10:43:48 +0800 Subject: [PATCH 06/53] fix: add primary disk although disable create new file --- source/libs/tfs/src/tfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index 2c3ca9b86c..ac1fe40f24 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -494,7 +494,7 @@ static int32_t tfsMount(STfs *pTfs, SDiskCfg *pCfg) { return -1; } - if (pCfg->disable == 1) { + if (pCfg->disable == 1 && pCfg->primary != 1) { fInfo("skip to mount disk %s to level %d since disable is %" PRIi8, pCfg->dir, pCfg->level, pCfg->disable); return 0; } From 4c8ce7a14ccd84f2ade2185af9a7c565912499e1 Mon Sep 17 00:00:00 2001 From: dmchen Date: Mon, 17 Jun 2024 06:31:39 +0000 Subject: [PATCH 07/53] feat/TS-4954 --- include/common/systable.h | 1 + include/common/tmsg.h | 5 + include/common/ttokendef.h | 685 +- include/libs/nodes/cmdnodes.h | 3 + source/common/src/systable.c | 11 + source/common/src/tmsg.c | 10 +- source/dnode/mnode/impl/src/mndInfoSchema.c | 9 +- source/dnode/mnode/impl/src/mndShow.c | 9 + source/dnode/mnode/impl/src/mndUser.c | 123 +- source/libs/nodes/src/nodesCodeFuncs.c | 3 + source/libs/nodes/src/nodesUtilFuncs.c | 2 + source/libs/parser/inc/parAst.h | 4 +- source/libs/parser/inc/sql.y | 14 +- source/libs/parser/src/parAstCreater.c | 14 +- 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 | 10 + source/libs/parser/src/sql.c | 11170 +++++++++--------- 19 files changed, 6318 insertions(+), 5764 deletions(-) diff --git a/include/common/systable.h b/include/common/systable.h index 615b0e4656..65b3b36af8 100644 --- a/include/common/systable.h +++ b/include/common/systable.h @@ -40,6 +40,7 @@ extern "C" { #define TSDB_INS_TABLE_COLS "ins_columns" #define TSDB_INS_TABLE_TABLE_DISTRIBUTED "ins_table_distributed" #define TSDB_INS_TABLE_USERS "ins_users" +#define TSDB_INS_TABLE_USERS_FULL "ins_users_full" #define TSDB_INS_TABLE_LICENCES "ins_grants" #define TSDB_INS_TABLE_VGROUPS "ins_vgroups" #define TSDB_INS_TABLE_VNODES "ins_vnodes" diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 9301b31f95..698ab8fac3 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -158,6 +158,7 @@ typedef enum _mgmt_table { TSDB_MGMT_TABLE_MACHINES, TSDB_MGMT_TABLE_ARBGROUP, TSDB_MGMT_TABLE_ENCRYPTIONS, + TSDB_MGMT_TABLE_USER_FULL, TSDB_MGMT_TABLE_MAX, } EShowType; @@ -362,6 +363,7 @@ typedef enum ENodeType { QUERY_NODE_SHOW_TABLES_STMT, QUERY_NODE_SHOW_TAGS_STMT, QUERY_NODE_SHOW_USERS_STMT, + QUERY_NODE_SHOW_USERS_FULL_STMT, QUERY_NODE_SHOW_LICENCES_STMT, QUERY_NODE_SHOW_VGROUPS_STMT, QUERY_NODE_SHOW_TOPICS_STMT, @@ -1017,6 +1019,8 @@ typedef struct { SIpV4Range* pIpRanges; int32_t sqlLen; char* sql; + int8_t isImport; + int8_t createDb; } SCreateUserReq; int32_t tSerializeSCreateUserReq(void* buf, int32_t bufLen, SCreateUserReq* pReq); @@ -2111,6 +2115,7 @@ typedef struct { char filterTb[TSDB_TABLE_NAME_LEN]; // for ins_columns int64_t showId; int64_t compactId; // for compact + bool withFull; // for show users full } SRetrieveTableReq; typedef struct SSysTableSchema { diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 9060c145a4..a276329c42 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -50,348 +50,349 @@ #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_CREATEDB 39 -#define TK_ADD 40 -#define TK_DROP 41 -#define TK_GRANT 42 -#define TK_ON 43 -#define TK_TO 44 -#define TK_REVOKE 45 -#define TK_FROM 46 -#define TK_SUBSCRIBE 47 -#define TK_READ 48 -#define TK_WRITE 49 -#define TK_NK_DOT 50 -#define TK_WITH 51 -#define TK_ENCRYPT_KEY 52 -#define TK_DNODE 53 -#define TK_PORT 54 -#define TK_DNODES 55 -#define TK_RESTORE 56 -#define TK_NK_IPTOKEN 57 -#define TK_FORCE 58 -#define TK_UNSAFE 59 -#define TK_CLUSTER 60 -#define TK_LOCAL 61 -#define TK_QNODE 62 -#define TK_BNODE 63 -#define TK_SNODE 64 -#define TK_MNODE 65 -#define TK_VNODE 66 -#define TK_DATABASE 67 -#define TK_USE 68 -#define TK_FLUSH 69 -#define TK_TRIM 70 -#define TK_S3MIGRATE 71 -#define TK_COMPACT 72 -#define TK_IF 73 -#define TK_NOT 74 -#define TK_EXISTS 75 -#define TK_BUFFER 76 -#define TK_CACHEMODEL 77 -#define TK_CACHESIZE 78 -#define TK_COMP 79 -#define TK_DURATION 80 -#define TK_NK_VARIABLE 81 -#define TK_MAXROWS 82 -#define TK_MINROWS 83 -#define TK_KEEP 84 -#define TK_PAGES 85 -#define TK_PAGESIZE 86 -#define TK_TSDB_PAGESIZE 87 -#define TK_PRECISION 88 -#define TK_REPLICA 89 -#define TK_VGROUPS 90 -#define TK_SINGLE_STABLE 91 -#define TK_RETENTIONS 92 -#define TK_SCHEMALESS 93 -#define TK_WAL_LEVEL 94 -#define TK_WAL_FSYNC_PERIOD 95 -#define TK_WAL_RETENTION_PERIOD 96 -#define TK_WAL_RETENTION_SIZE 97 -#define TK_WAL_ROLL_PERIOD 98 -#define TK_WAL_SEGMENT_SIZE 99 -#define TK_STT_TRIGGER 100 -#define TK_TABLE_PREFIX 101 -#define TK_TABLE_SUFFIX 102 -#define TK_S3_CHUNKSIZE 103 -#define TK_S3_KEEPLOCAL 104 -#define TK_S3_COMPACT 105 -#define TK_KEEP_TIME_OFFSET 106 -#define TK_ENCRYPT_ALGORITHM 107 -#define TK_NK_COLON 108 -#define TK_BWLIMIT 109 -#define TK_START 110 -#define TK_TIMESTAMP 111 -#define TK_END 112 -#define TK_TABLE 113 -#define TK_NK_LP 114 -#define TK_NK_RP 115 -#define TK_STABLE 116 -#define TK_COLUMN 117 -#define TK_MODIFY 118 -#define TK_RENAME 119 -#define TK_TAG 120 -#define TK_SET 121 -#define TK_NK_EQ 122 -#define TK_USING 123 -#define TK_TAGS 124 -#define TK_BOOL 125 -#define TK_TINYINT 126 -#define TK_SMALLINT 127 -#define TK_INT 128 -#define TK_INTEGER 129 -#define TK_BIGINT 130 -#define TK_FLOAT 131 -#define TK_DOUBLE 132 -#define TK_BINARY 133 -#define TK_NCHAR 134 -#define TK_UNSIGNED 135 -#define TK_JSON 136 -#define TK_VARCHAR 137 -#define TK_MEDIUMBLOB 138 -#define TK_BLOB 139 -#define TK_VARBINARY 140 -#define TK_GEOMETRY 141 -#define TK_DECIMAL 142 -#define TK_COMMENT 143 -#define TK_MAX_DELAY 144 -#define TK_WATERMARK 145 -#define TK_ROLLUP 146 -#define TK_TTL 147 -#define TK_SMA 148 -#define TK_DELETE_MARK 149 -#define TK_FIRST 150 -#define TK_LAST 151 -#define TK_SHOW 152 -#define TK_PRIVILEGES 153 -#define TK_DATABASES 154 -#define TK_TABLES 155 -#define TK_STABLES 156 -#define TK_MNODES 157 -#define TK_QNODES 158 -#define TK_ARBGROUPS 159 -#define TK_FUNCTIONS 160 -#define TK_INDEXES 161 -#define TK_ACCOUNTS 162 -#define TK_APPS 163 -#define TK_CONNECTIONS 164 -#define TK_LICENCES 165 -#define TK_GRANTS 166 -#define TK_FULL 167 -#define TK_LOGS 168 -#define TK_MACHINES 169 -#define TK_ENCRYPTIONS 170 -#define TK_QUERIES 171 -#define TK_SCORES 172 -#define TK_TOPICS 173 -#define TK_VARIABLES 174 -#define TK_BNODES 175 -#define TK_SNODES 176 -#define TK_TRANSACTIONS 177 -#define TK_DISTRIBUTED 178 -#define TK_CONSUMERS 179 -#define TK_SUBSCRIPTIONS 180 -#define TK_VNODES 181 -#define TK_ALIVE 182 -#define TK_VIEWS 183 -#define TK_VIEW 184 -#define TK_COMPACTS 185 -#define TK_NORMAL 186 -#define TK_CHILD 187 -#define TK_LIKE 188 -#define TK_TBNAME 189 -#define TK_QTAGS 190 -#define TK_AS 191 -#define TK_SYSTEM 192 -#define TK_TSMA 193 -#define TK_INTERVAL 194 -#define TK_RECURSIVE 195 -#define TK_TSMAS 196 -#define TK_FUNCTION 197 -#define TK_INDEX 198 -#define TK_COUNT 199 -#define TK_LAST_ROW 200 -#define TK_META 201 -#define TK_ONLY 202 -#define TK_TOPIC 203 -#define TK_CONSUMER 204 -#define TK_GROUP 205 -#define TK_DESC 206 -#define TK_DESCRIBE 207 -#define TK_RESET 208 -#define TK_QUERY 209 -#define TK_CACHE 210 -#define TK_EXPLAIN 211 -#define TK_ANALYZE 212 -#define TK_VERBOSE 213 -#define TK_NK_BOOL 214 -#define TK_RATIO 215 -#define TK_NK_FLOAT 216 -#define TK_OUTPUTTYPE 217 -#define TK_AGGREGATE 218 -#define TK_BUFSIZE 219 -#define TK_LANGUAGE 220 -#define TK_REPLACE 221 -#define TK_STREAM 222 -#define TK_INTO 223 -#define TK_PAUSE 224 -#define TK_RESUME 225 -#define TK_PRIMARY 226 -#define TK_KEY 227 -#define TK_TRIGGER 228 -#define TK_AT_ONCE 229 -#define TK_WINDOW_CLOSE 230 -#define TK_IGNORE 231 -#define TK_EXPIRED 232 -#define TK_FILL_HISTORY 233 -#define TK_UPDATE 234 -#define TK_SUBTABLE 235 -#define TK_UNTREATED 236 -#define TK_KILL 237 -#define TK_CONNECTION 238 -#define TK_TRANSACTION 239 -#define TK_BALANCE 240 -#define TK_VGROUP 241 -#define TK_LEADER 242 -#define TK_MERGE 243 -#define TK_REDISTRIBUTE 244 -#define TK_SPLIT 245 -#define TK_DELETE 246 -#define TK_INSERT 247 -#define TK_NK_BIN 248 -#define TK_NK_HEX 249 -#define TK_NULL 250 -#define TK_NK_QUESTION 251 -#define TK_NK_ALIAS 252 -#define TK_NK_ARROW 253 -#define TK_ROWTS 254 -#define TK_QSTART 255 -#define TK_QEND 256 -#define TK_QDURATION 257 -#define TK_WSTART 258 -#define TK_WEND 259 -#define TK_WDURATION 260 -#define TK_IROWTS 261 -#define TK_ISFILLED 262 -#define TK_CAST 263 -#define TK_NOW 264 -#define TK_TODAY 265 -#define TK_TIMEZONE 266 -#define TK_CLIENT_VERSION 267 -#define TK_SERVER_VERSION 268 -#define TK_SERVER_STATUS 269 -#define TK_CURRENT_USER 270 -#define TK_CASE 271 -#define TK_WHEN 272 -#define TK_THEN 273 -#define TK_ELSE 274 -#define TK_BETWEEN 275 -#define TK_IS 276 -#define TK_NK_LT 277 -#define TK_NK_GT 278 -#define TK_NK_LE 279 -#define TK_NK_GE 280 -#define TK_NK_NE 281 -#define TK_MATCH 282 -#define TK_NMATCH 283 -#define TK_CONTAINS 284 -#define TK_IN 285 -#define TK_JOIN 286 -#define TK_INNER 287 -#define TK_LEFT 288 -#define TK_RIGHT 289 -#define TK_OUTER 290 -#define TK_SEMI 291 -#define TK_ANTI 292 -#define TK_ASOF 293 -#define TK_WINDOW 294 -#define TK_WINDOW_OFFSET 295 -#define TK_JLIMIT 296 -#define TK_SELECT 297 -#define TK_NK_HINT 298 -#define TK_DISTINCT 299 -#define TK_WHERE 300 -#define TK_PARTITION 301 -#define TK_BY 302 -#define TK_SESSION 303 -#define TK_STATE_WINDOW 304 -#define TK_EVENT_WINDOW 305 -#define TK_COUNT_WINDOW 306 -#define TK_SLIDING 307 -#define TK_FILL 308 -#define TK_VALUE 309 -#define TK_VALUE_F 310 -#define TK_NONE 311 -#define TK_PREV 312 -#define TK_NULL_F 313 -#define TK_LINEAR 314 -#define TK_NEXT 315 -#define TK_HAVING 316 -#define TK_RANGE 317 -#define TK_EVERY 318 -#define TK_ORDER 319 -#define TK_SLIMIT 320 -#define TK_SOFFSET 321 -#define TK_LIMIT 322 -#define TK_OFFSET 323 -#define TK_ASC 324 -#define TK_NULLS 325 -#define TK_ABORT 326 -#define TK_AFTER 327 -#define TK_ATTACH 328 -#define TK_BEFORE 329 -#define TK_BEGIN 330 -#define TK_BITAND 331 -#define TK_BITNOT 332 -#define TK_BITOR 333 -#define TK_BLOCKS 334 -#define TK_CHANGE 335 -#define TK_COMMA 336 -#define TK_CONCAT 337 -#define TK_CONFLICT 338 -#define TK_COPY 339 -#define TK_DEFERRED 340 -#define TK_DELIMITERS 341 -#define TK_DETACH 342 -#define TK_DIVIDE 343 -#define TK_DOT 344 -#define TK_EACH 345 -#define TK_FAIL 346 -#define TK_FILE 347 -#define TK_FOR 348 -#define TK_GLOB 349 -#define TK_ID 350 -#define TK_IMMEDIATE 351 -#define TK_IMPORT 352 -#define TK_INITIALLY 353 -#define TK_INSTEAD 354 -#define TK_ISNULL 355 -#define TK_MODULES 356 -#define TK_NK_BITNOT 357 -#define TK_NK_SEMI 358 -#define TK_NOTNULL 359 -#define TK_OF 360 -#define TK_PLUS 361 -#define TK_PRIVILEGE 362 -#define TK_RAISE 363 -#define TK_RESTRICT 364 -#define TK_ROW 365 -#define TK_STAR 366 -#define TK_STATEMENT 367 -#define TK_STRICT 368 -#define TK_STRING 369 -#define TK_TIMES 370 -#define TK_VALUES 371 -#define TK_VARIABLE 372 -#define TK_WAL 373 -#define TK_ENCODE 374 -#define TK_COMPRESS 375 -#define TK_LEVEL 376 +#define TK_IS_IMPORT 35 +#define TK_NK_INTEGER 36 +#define TK_CREATEDB 37 +#define TK_USER 38 +#define TK_ENABLE 39 +#define TK_SYSINFO 40 +#define TK_ADD 41 +#define TK_DROP 42 +#define TK_GRANT 43 +#define TK_ON 44 +#define TK_TO 45 +#define TK_REVOKE 46 +#define TK_FROM 47 +#define TK_SUBSCRIBE 48 +#define TK_READ 49 +#define TK_WRITE 50 +#define TK_NK_DOT 51 +#define TK_WITH 52 +#define TK_ENCRYPT_KEY 53 +#define TK_DNODE 54 +#define TK_PORT 55 +#define TK_DNODES 56 +#define TK_RESTORE 57 +#define TK_NK_IPTOKEN 58 +#define TK_FORCE 59 +#define TK_UNSAFE 60 +#define TK_CLUSTER 61 +#define TK_LOCAL 62 +#define TK_QNODE 63 +#define TK_BNODE 64 +#define TK_SNODE 65 +#define TK_MNODE 66 +#define TK_VNODE 67 +#define TK_DATABASE 68 +#define TK_USE 69 +#define TK_FLUSH 70 +#define TK_TRIM 71 +#define TK_S3MIGRATE 72 +#define TK_COMPACT 73 +#define TK_IF 74 +#define TK_NOT 75 +#define TK_EXISTS 76 +#define TK_BUFFER 77 +#define TK_CACHEMODEL 78 +#define TK_CACHESIZE 79 +#define TK_COMP 80 +#define TK_DURATION 81 +#define TK_NK_VARIABLE 82 +#define TK_MAXROWS 83 +#define TK_MINROWS 84 +#define TK_KEEP 85 +#define TK_PAGES 86 +#define TK_PAGESIZE 87 +#define TK_TSDB_PAGESIZE 88 +#define TK_PRECISION 89 +#define TK_REPLICA 90 +#define TK_VGROUPS 91 +#define TK_SINGLE_STABLE 92 +#define TK_RETENTIONS 93 +#define TK_SCHEMALESS 94 +#define TK_WAL_LEVEL 95 +#define TK_WAL_FSYNC_PERIOD 96 +#define TK_WAL_RETENTION_PERIOD 97 +#define TK_WAL_RETENTION_SIZE 98 +#define TK_WAL_ROLL_PERIOD 99 +#define TK_WAL_SEGMENT_SIZE 100 +#define TK_STT_TRIGGER 101 +#define TK_TABLE_PREFIX 102 +#define TK_TABLE_SUFFIX 103 +#define TK_S3_CHUNKSIZE 104 +#define TK_S3_KEEPLOCAL 105 +#define TK_S3_COMPACT 106 +#define TK_KEEP_TIME_OFFSET 107 +#define TK_ENCRYPT_ALGORITHM 108 +#define TK_NK_COLON 109 +#define TK_BWLIMIT 110 +#define TK_START 111 +#define TK_TIMESTAMP 112 +#define TK_END 113 +#define TK_TABLE 114 +#define TK_NK_LP 115 +#define TK_NK_RP 116 +#define TK_STABLE 117 +#define TK_COLUMN 118 +#define TK_MODIFY 119 +#define TK_RENAME 120 +#define TK_TAG 121 +#define TK_SET 122 +#define TK_NK_EQ 123 +#define TK_USING 124 +#define TK_TAGS 125 +#define TK_BOOL 126 +#define TK_TINYINT 127 +#define TK_SMALLINT 128 +#define TK_INT 129 +#define TK_INTEGER 130 +#define TK_BIGINT 131 +#define TK_FLOAT 132 +#define TK_DOUBLE 133 +#define TK_BINARY 134 +#define TK_NCHAR 135 +#define TK_UNSIGNED 136 +#define TK_JSON 137 +#define TK_VARCHAR 138 +#define TK_MEDIUMBLOB 139 +#define TK_BLOB 140 +#define TK_VARBINARY 141 +#define TK_GEOMETRY 142 +#define TK_DECIMAL 143 +#define TK_COMMENT 144 +#define TK_MAX_DELAY 145 +#define TK_WATERMARK 146 +#define TK_ROLLUP 147 +#define TK_TTL 148 +#define TK_SMA 149 +#define TK_DELETE_MARK 150 +#define TK_FIRST 151 +#define TK_LAST 152 +#define TK_SHOW 153 +#define TK_FULL 154 +#define TK_PRIVILEGES 155 +#define TK_DATABASES 156 +#define TK_TABLES 157 +#define TK_STABLES 158 +#define TK_MNODES 159 +#define TK_QNODES 160 +#define TK_ARBGROUPS 161 +#define TK_FUNCTIONS 162 +#define TK_INDEXES 163 +#define TK_ACCOUNTS 164 +#define TK_APPS 165 +#define TK_CONNECTIONS 166 +#define TK_LICENCES 167 +#define TK_GRANTS 168 +#define TK_LOGS 169 +#define TK_MACHINES 170 +#define TK_ENCRYPTIONS 171 +#define TK_QUERIES 172 +#define TK_SCORES 173 +#define TK_TOPICS 174 +#define TK_VARIABLES 175 +#define TK_BNODES 176 +#define TK_SNODES 177 +#define TK_TRANSACTIONS 178 +#define TK_DISTRIBUTED 179 +#define TK_CONSUMERS 180 +#define TK_SUBSCRIPTIONS 181 +#define TK_VNODES 182 +#define TK_ALIVE 183 +#define TK_VIEWS 184 +#define TK_VIEW 185 +#define TK_COMPACTS 186 +#define TK_NORMAL 187 +#define TK_CHILD 188 +#define TK_LIKE 189 +#define TK_TBNAME 190 +#define TK_QTAGS 191 +#define TK_AS 192 +#define TK_SYSTEM 193 +#define TK_TSMA 194 +#define TK_INTERVAL 195 +#define TK_RECURSIVE 196 +#define TK_TSMAS 197 +#define TK_FUNCTION 198 +#define TK_INDEX 199 +#define TK_COUNT 200 +#define TK_LAST_ROW 201 +#define TK_META 202 +#define TK_ONLY 203 +#define TK_TOPIC 204 +#define TK_CONSUMER 205 +#define TK_GROUP 206 +#define TK_DESC 207 +#define TK_DESCRIBE 208 +#define TK_RESET 209 +#define TK_QUERY 210 +#define TK_CACHE 211 +#define TK_EXPLAIN 212 +#define TK_ANALYZE 213 +#define TK_VERBOSE 214 +#define TK_NK_BOOL 215 +#define TK_RATIO 216 +#define TK_NK_FLOAT 217 +#define TK_OUTPUTTYPE 218 +#define TK_AGGREGATE 219 +#define TK_BUFSIZE 220 +#define TK_LANGUAGE 221 +#define TK_REPLACE 222 +#define TK_STREAM 223 +#define TK_INTO 224 +#define TK_PAUSE 225 +#define TK_RESUME 226 +#define TK_PRIMARY 227 +#define TK_KEY 228 +#define TK_TRIGGER 229 +#define TK_AT_ONCE 230 +#define TK_WINDOW_CLOSE 231 +#define TK_IGNORE 232 +#define TK_EXPIRED 233 +#define TK_FILL_HISTORY 234 +#define TK_UPDATE 235 +#define TK_SUBTABLE 236 +#define TK_UNTREATED 237 +#define TK_KILL 238 +#define TK_CONNECTION 239 +#define TK_TRANSACTION 240 +#define TK_BALANCE 241 +#define TK_VGROUP 242 +#define TK_LEADER 243 +#define TK_MERGE 244 +#define TK_REDISTRIBUTE 245 +#define TK_SPLIT 246 +#define TK_DELETE 247 +#define TK_INSERT 248 +#define TK_NK_BIN 249 +#define TK_NK_HEX 250 +#define TK_NULL 251 +#define TK_NK_QUESTION 252 +#define TK_NK_ALIAS 253 +#define TK_NK_ARROW 254 +#define TK_ROWTS 255 +#define TK_QSTART 256 +#define TK_QEND 257 +#define TK_QDURATION 258 +#define TK_WSTART 259 +#define TK_WEND 260 +#define TK_WDURATION 261 +#define TK_IROWTS 262 +#define TK_ISFILLED 263 +#define TK_CAST 264 +#define TK_NOW 265 +#define TK_TODAY 266 +#define TK_TIMEZONE 267 +#define TK_CLIENT_VERSION 268 +#define TK_SERVER_VERSION 269 +#define TK_SERVER_STATUS 270 +#define TK_CURRENT_USER 271 +#define TK_CASE 272 +#define TK_WHEN 273 +#define TK_THEN 274 +#define TK_ELSE 275 +#define TK_BETWEEN 276 +#define TK_IS 277 +#define TK_NK_LT 278 +#define TK_NK_GT 279 +#define TK_NK_LE 280 +#define TK_NK_GE 281 +#define TK_NK_NE 282 +#define TK_MATCH 283 +#define TK_NMATCH 284 +#define TK_CONTAINS 285 +#define TK_IN 286 +#define TK_JOIN 287 +#define TK_INNER 288 +#define TK_LEFT 289 +#define TK_RIGHT 290 +#define TK_OUTER 291 +#define TK_SEMI 292 +#define TK_ANTI 293 +#define TK_ASOF 294 +#define TK_WINDOW 295 +#define TK_WINDOW_OFFSET 296 +#define TK_JLIMIT 297 +#define TK_SELECT 298 +#define TK_NK_HINT 299 +#define TK_DISTINCT 300 +#define TK_WHERE 301 +#define TK_PARTITION 302 +#define TK_BY 303 +#define TK_SESSION 304 +#define TK_STATE_WINDOW 305 +#define TK_EVENT_WINDOW 306 +#define TK_COUNT_WINDOW 307 +#define TK_SLIDING 308 +#define TK_FILL 309 +#define TK_VALUE 310 +#define TK_VALUE_F 311 +#define TK_NONE 312 +#define TK_PREV 313 +#define TK_NULL_F 314 +#define TK_LINEAR 315 +#define TK_NEXT 316 +#define TK_HAVING 317 +#define TK_RANGE 318 +#define TK_EVERY 319 +#define TK_ORDER 320 +#define TK_SLIMIT 321 +#define TK_SOFFSET 322 +#define TK_LIMIT 323 +#define TK_OFFSET 324 +#define TK_ASC 325 +#define TK_NULLS 326 +#define TK_ABORT 327 +#define TK_AFTER 328 +#define TK_ATTACH 329 +#define TK_BEFORE 330 +#define TK_BEGIN 331 +#define TK_BITAND 332 +#define TK_BITNOT 333 +#define TK_BITOR 334 +#define TK_BLOCKS 335 +#define TK_CHANGE 336 +#define TK_COMMA 337 +#define TK_CONCAT 338 +#define TK_CONFLICT 339 +#define TK_COPY 340 +#define TK_DEFERRED 341 +#define TK_DELIMITERS 342 +#define TK_DETACH 343 +#define TK_DIVIDE 344 +#define TK_DOT 345 +#define TK_EACH 346 +#define TK_FAIL 347 +#define TK_FILE 348 +#define TK_FOR 349 +#define TK_GLOB 350 +#define TK_ID 351 +#define TK_IMMEDIATE 352 +#define TK_IMPORT 353 +#define TK_INITIALLY 354 +#define TK_INSTEAD 355 +#define TK_ISNULL 356 +#define TK_MODULES 357 +#define TK_NK_BITNOT 358 +#define TK_NK_SEMI 359 +#define TK_NOTNULL 360 +#define TK_OF 361 +#define TK_PLUS 362 +#define TK_PRIVILEGE 363 +#define TK_RAISE 364 +#define TK_RESTRICT 365 +#define TK_ROW 366 +#define TK_STAR 367 +#define TK_STATEMENT 368 +#define TK_STRICT 369 +#define TK_STRING 370 +#define TK_TIMES 371 +#define TK_VALUES 372 +#define TK_VARIABLE 373 +#define TK_WAL 374 +#define TK_ENCODE 375 +#define TK_COMPRESS 376 +#define TK_LEVEL 377 #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 112411d524..e2337dc6da 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -258,6 +258,8 @@ typedef struct SCreateUserStmt { char userName[TSDB_USER_LEN]; char password[TSDB_USET_PASSWORD_LEN]; int8_t sysinfo; + int8_t createDb; + int8_t isImport; int32_t numIpRanges; SIpV4Range* pIpRanges; @@ -311,6 +313,7 @@ typedef struct SShowStmt { SNode* pTbName; // SValueNode EOperatorType tableCondType; EShowKind showKind; // show databases: user/system, show tables: normal/child, others NULL + bool withFull; // for show users full; } SShowStmt; typedef struct SShowCreateDatabaseStmt { diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 6558df1fc1..65c58abdda 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -269,6 +269,16 @@ static const SSysDbTableSchema userUsersSchema[] = { {.name = "allowed_host", .bytes = TSDB_PRIVILEDGE_HOST_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, }; +static const SSysDbTableSchema userUsersFullSchema[] = { + {.name = "name", .bytes = TSDB_USER_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "super", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT, .sysInfo = true}, + {.name = "enable", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT, .sysInfo = true}, + {.name = "sysinfo", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT, .sysInfo = true}, + {.name = "createdb", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT, .sysInfo = true}, + {.name = "encrypted_pass", .bytes = TSDB_USER_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "allowed_host", .bytes = TSDB_PRIVILEDGE_HOST_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +}; + GRANTS_SCHEMA; static const SSysDbTableSchema vgroupsSchema[] = { @@ -438,6 +448,7 @@ static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_COLS, userColsSchema, tListLen(userColsSchema), false}, // {TSDB_INS_TABLE_TABLE_DISTRIBUTED, userTblDistSchema, tListLen(userTblDistSchema)}, {TSDB_INS_TABLE_USERS, userUsersSchema, tListLen(userUsersSchema), true}, + {TSDB_INS_TABLE_USERS_FULL, userUsersFullSchema, tListLen(userUsersFullSchema), true}, {TSDB_INS_TABLE_LICENCES, grantsSchema, tListLen(grantsSchema), true}, {TSDB_INS_TABLE_VGROUPS, vgroupsSchema, tListLen(vgroupsSchema), true}, {TSDB_INS_TABLE_CONFIGS, configSchema, tListLen(configSchema), false}, diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 1cbd646413..549c90d185 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -1637,8 +1637,10 @@ int32_t tSerializeSCreateUserReq(void *buf, int32_t bufLen, SCreateUserReq *pReq if (tEncodeU32(&encoder, pReq->pIpRanges[i].ip) < 0) return -1; if (tEncodeU32(&encoder, pReq->pIpRanges[i].mask) < 0) return -1; } - ENCODESQL(); + if (tEncodeI8(&encoder, pReq->isImport) < 0) return -1; + if (tEncodeI8(&encoder, pReq->createDb) < 0) return -1; + tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -1664,8 +1666,12 @@ int32_t tDeserializeSCreateUserReq(void *buf, int32_t bufLen, SCreateUserReq *pR if (tDecodeU32(&decoder, &(pReq->pIpRanges[i].ip)) < 0) return -1; if (tDecodeU32(&decoder, &(pReq->pIpRanges[i].mask)) < 0) return -1; } - DECODESQL(); + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI8(&decoder, &pReq->createDb) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->isImport) < 0) return -1; + } + tEndDecode(&decoder); tDecoderClear(&decoder); return 0; diff --git a/source/dnode/mnode/impl/src/mndInfoSchema.c b/source/dnode/mnode/impl/src/mndInfoSchema.c index 2c7eca28ae..82cdbd8613 100644 --- a/source/dnode/mnode/impl/src/mndInfoSchema.c +++ b/source/dnode/mnode/impl/src/mndInfoSchema.c @@ -75,7 +75,14 @@ int32_t mndBuildInsTableSchema(SMnode *pMnode, const char *dbFName, const char * return -1; } - STableMetaRsp *pMeta = taosHashGet(pMnode->infosMeta, tbName, strlen(tbName)); + STableMetaRsp *pMeta = NULL; + if(strcmp(tbName, TSDB_INS_TABLE_USERS_FULL) == 0) { + pMeta = taosHashGet(pMnode->infosMeta, TSDB_INS_TABLE_USERS_FULL, strlen(tbName)); + } + else{ + pMeta = taosHashGet(pMnode->infosMeta, tbName, strlen(tbName)); + } + if (NULL == pMeta) { mError("invalid information schema table name:%s", tbName); terrno = TSDB_CODE_PAR_TABLE_NOT_EXIST; diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index 5dcd7b3d38..444ed3d750 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -89,6 +89,8 @@ static int32_t convertToRetrieveType(char *name, int32_t len) { // type = TSDB_MGMT_TABLE_DIST; } else if (strncasecmp(name, TSDB_INS_TABLE_USERS, len) == 0) { type = TSDB_MGMT_TABLE_USER; + } else if (strncasecmp(name, TSDB_INS_TABLE_USERS_FULL, len) == 0) { + type = TSDB_MGMT_TABLE_USER_FULL; } else if (strncasecmp(name, TSDB_INS_TABLE_LICENCES, len) == 0) { type = TSDB_MGMT_TABLE_GRANTS; } else if (strncasecmp(name, TSDB_INS_TABLE_VGROUPS, len) == 0) { @@ -276,6 +278,13 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) { if (retrieveReq.db[0] && mndCheckShowPrivilege(pMnode, pReq->info.conn.user, pShow->type, retrieveReq.db) != 0) { return -1; } + if (pShow->type == TSDB_MGMT_TABLE_USER_FULL) { + if(strcmp(pReq->info.conn.user, "root") != 0){ + mError("The operation is not permitted, user:%s, pShow->type:%d", pReq->info.conn.user, pShow->type); + terrno = TSDB_CODE_MND_NO_RIGHTS; + return -1; + } + } int32_t numOfCols = pShow->pMeta->numOfColumns; diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 7cde8c5508..7a9645937b 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -97,6 +97,7 @@ static int32_t mndProcessDropUserReq(SRpcMsg *pReq); static int32_t mndProcessGetUserAuthReq(SRpcMsg *pReq); static int32_t mndProcessGetUserWhiteListReq(SRpcMsg *pReq); static int32_t mndRetrieveUsers(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); +static int32_t mndRetrieveUsersFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextUser(SMnode *pMnode, void *pIter); static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); static void mndCancelGetNextPrivileges(SMnode *pMnode, void *pIter); @@ -502,6 +503,8 @@ int32_t mndInitUser(SMnode *pMnode) { mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_USER, mndRetrieveUsers); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_USER, mndCancelGetNextUser); + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_USER_FULL, mndRetrieveUsersFull); + mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_USER_FULL, mndCancelGetNextUser); mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_PRIVILEGES, mndRetrievePrivileges); mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_PRIVILEGES, mndCancelGetNextPrivileges); return sdbSetTable(pMnode->pSdb, table); @@ -1440,7 +1443,12 @@ void mndReleaseUser(SMnode *pMnode, SUserObj *pUser) { static int32_t mndCreateUser(SMnode *pMnode, char *acct, SCreateUserReq *pCreate, SRpcMsg *pReq) { SUserObj userObj = {0}; - taosEncryptPass_c((uint8_t *)pCreate->pass, strlen(pCreate->pass), userObj.pass); + if(pCreate->isImport != 1){ + taosEncryptPass_c((uint8_t *)pCreate->pass, strlen(pCreate->pass), userObj.pass); + }else{ + //mInfo("pCreate->pass:%s", pCreate->pass) + strncpy(userObj.pass, pCreate->pass, TSDB_PASSWORD_LEN); + } tstrncpy(userObj.user, pCreate->user, TSDB_USER_LEN); tstrncpy(userObj.acct, acct, TSDB_USER_LEN); userObj.createdTime = taosGetTimestampMs(); @@ -1448,7 +1456,7 @@ static int32_t mndCreateUser(SMnode *pMnode, char *acct, SCreateUserReq *pCreate userObj.superUser = 0; // pCreate->superUser; userObj.sysInfo = pCreate->sysInfo; userObj.enable = pCreate->enable; - userObj.createdb = 0; + userObj.createdb = pCreate->createDb; if (pCreate->numIpRanges == 0) { userObj.pIpWhiteList = createDefaultIpWhiteList(); @@ -1534,10 +1542,27 @@ static int32_t mndProcessCreateUserReq(SRpcMsg *pReq) { goto _OVER; } - mInfo("user:%s, start to create", createReq.user); - if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_USER) != 0) { + mInfo("user:%s, start to create, createdb:%d, is_import:%d", createReq.user, createReq.isImport, + createReq.createDb); + +#ifndef TD_ENTERPRISE + if(createReq.isImport == 1){ goto _OVER; } +#endif + + if(createReq.isImport != 1){ + if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_USER) != 0) { + goto _OVER; + } + } + else{ + if (strcmp(pReq->info.conn.user, "root") != 0) { + mError("The operation is not permitted, user:%s", pReq->info.conn.user); + terrno = TSDB_CODE_MND_NO_RIGHTS; + goto _OVER; + } + } if (createReq.user[0] == 0) { terrno = TSDB_CODE_MND_INVALID_USER_FORMAT; @@ -1549,9 +1574,11 @@ static int32_t mndProcessCreateUserReq(SRpcMsg *pReq) { goto _OVER; } - if (strlen(createReq.pass) >= TSDB_PASSWORD_LEN) { - terrno = TSDB_CODE_PAR_NAME_OR_PASSWD_TOO_LONG; - goto _OVER; + if(createReq.isImport != 1){ + if (strlen(createReq.pass) >= TSDB_PASSWORD_LEN) { + terrno = TSDB_CODE_PAR_NAME_OR_PASSWD_TOO_LONG; + goto _OVER; + } } pUser = mndAcquireUser(pMnode, createReq.user); @@ -1577,8 +1604,14 @@ static int32_t mndProcessCreateUserReq(SRpcMsg *pReq) { char detail[1000] = {0}; sprintf(detail, "enable:%d, superUser:%d, sysInfo:%d, password:xxx", createReq.enable, createReq.superUser, createReq.sysInfo); + char operation[15] = {0}; + if (createReq.isImport == 1) { + strcpy(operation, "importUser"); + } else { + strcpy(operation, "createUser"); + } - auditRecord(pReq, pMnode->clusterId, "createUser", "", createReq.user, detail, strlen(detail)); + auditRecord(pReq, pMnode->clusterId, operation, "", createReq.user, detail, strlen(detail)); _OVER: if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) { @@ -2364,6 +2397,80 @@ static int32_t mndRetrieveUsers(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl return numOfRows; } +static int32_t mndRetrieveUsersFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { + int32_t numOfRows = 0; +#ifdef TD_ENTERPRISE + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; + SUserObj *pUser = NULL; + int32_t cols = 0; + int8_t flag = 0; + char *pWrite; + + while (numOfRows < rows) { + pShow->pIter = sdbFetch(pSdb, SDB_USER, pShow->pIter, (void **)&pUser); + if (pShow->pIter == NULL) break; + + cols = 0; + SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + char name[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; + STR_WITH_MAXSIZE_TO_VARSTR(name, pUser->user, pShow->pMeta->pSchemas[cols].bytes); + colDataSetVal(pColInfo, numOfRows, (const char *)name, false); + + cols++; + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->superUser, false); + + cols++; + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->enable, false); + + cols++; + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->sysInfo, false); + + cols++; + flag = pUser->createdb ? 1 : 0; + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + colDataSetVal(pColInfo, numOfRows, (const char *)&flag, false); + + + //mInfo("pUser->pass:%s", pUser->pass); + cols++; + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + char pass[TSDB_PASSWORD_LEN + VARSTR_HEADER_SIZE] = {0}; + STR_WITH_MAXSIZE_TO_VARSTR(pass, pUser->pass, pShow->pMeta->pSchemas[cols].bytes); + colDataSetVal(pColInfo, numOfRows, (const char *)pass, false); + + cols++; + + char *buf = NULL; + int32_t tlen = convertIpWhiteListToStr(pUser->pIpWhiteList, &buf); + // int32_t tlen = mndFetchIpWhiteList(pUser->pIpWhiteList, &buf); + if (tlen != 0) { + char *varstr = taosMemoryCalloc(1, VARSTR_HEADER_SIZE + tlen); + varDataSetLen(varstr, tlen); + memcpy(varDataVal(varstr), buf, tlen); + + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + colDataSetVal(pColInfo, numOfRows, (const char *)varstr, false); + + taosMemoryFree(varstr); + taosMemoryFree(buf); + } else { + pColInfo = taosArrayGet(pBlock->pDataBlock, cols); + colDataSetVal(pColInfo, numOfRows, (const char *)NULL, true); + } + + numOfRows++; + sdbRelease(pSdb, pUser); + } + + pShow->numOfRows += numOfRows; +#endif + return numOfRows; +} + static void mndCancelGetNextUser(SMnode *pMnode, void *pIter) { SSdb *pSdb = pMnode->pSdb; sdbCancelFetch(pSdb, pIter); diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 96eb664134..d5b36aa1a8 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -236,6 +236,7 @@ const char* nodesNodeName(ENodeType type) { case QUERY_NODE_SHOW_TAGS_STMT: return "ShowTagsStmt"; case QUERY_NODE_SHOW_USERS_STMT: + case QUERY_NODE_SHOW_USERS_FULL_STMT: return "ShowUsersStmt"; case QUERY_NODE_SHOW_LICENCES_STMT: return "ShowGrantsStmt"; @@ -7655,6 +7656,7 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_SHOW_TAGS_STMT: return showTagsStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_USERS_STMT: + case QUERY_NODE_SHOW_USERS_FULL_STMT: return showUsersStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_VGROUPS_STMT: return showVgroupsStmtToJson(pObj, pJson); @@ -8004,6 +8006,7 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { case QUERY_NODE_SHOW_TAGS_STMT: return jsonToShowTagsStmt(pJson, pObj); case QUERY_NODE_SHOW_USERS_STMT: + case QUERY_NODE_SHOW_USERS_FULL_STMT: return jsonToShowUsersStmt(pJson, pObj); case QUERY_NODE_SHOW_VGROUPS_STMT: return jsonToShowVgroupsStmt(pJson, pObj); diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index c081841b3b..2ac1a91871 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -524,6 +524,7 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_STREAMS_STMT: case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_USERS_STMT: + case QUERY_NODE_SHOW_USERS_FULL_STMT: case QUERY_NODE_SHOW_LICENCES_STMT: case QUERY_NODE_SHOW_VGROUPS_STMT: case QUERY_NODE_SHOW_TOPICS_STMT: @@ -1217,6 +1218,7 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_STREAMS_STMT: case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_USERS_STMT: + case QUERY_NODE_SHOW_USERS_FULL_STMT: case QUERY_NODE_SHOW_LICENCES_STMT: case QUERY_NODE_SHOW_VGROUPS_STMT: case QUERY_NODE_SHOW_TOPICS_STMT: diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 90c3753ed0..6c1fff05da 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -222,6 +222,7 @@ SNode* setAlterSuperTableType(SNode* pStmt); SNode* createUseDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName); SNode* setShowKind(SAstCreateContext* pCxt, SNode* pStmt, EShowKind showKind); SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type); +SNode* createShowStmtWithFull(SAstCreateContext* pCxt, ENodeType type); SNode* createShowStmtWithCond(SAstCreateContext* pCxt, ENodeType type, SNode* pDbName, SNode* pTbName, EOperatorType tableCondType); SNode* createShowTablesStmt(SAstCreateContext* pCxt, SShowTablesOption option, SNode* pTbName, @@ -234,7 +235,8 @@ SNode* createShowTableDistributedStmt(SAstCreateContext* pCxt, SNode* pRealTable SNode* createShowDnodeVariablesStmt(SAstCreateContext* pCxt, SNode* pDnodeId, SNode* pLikePattern); SNode* createShowVnodesStmt(SAstCreateContext* pCxt, SNode* pDnodeId, SNode* pDnodeEndpoint); SNode* createShowTableTagsStmt(SAstCreateContext* pCxt, SNode* pTbName, SNode* pDbName, SNodeList* pTags); -SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const SToken* pPassword, int8_t sysinfo); +SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const SToken* pPassword, int8_t sysinfo, + int8_t createdb, int8_t is_import); SNode* addCreateUserStmtWhiteList(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pIpRangesNodeList); SNode* createAlterUserStmt(SAstCreateContext* pCxt, SToken* pUserName, int8_t alterType, void* pAlterInfo); SNode* createDropUserStmt(SAstCreateContext* pCxt, SToken* pUserName); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 170d51b1bf..8a18a84fae 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -95,10 +95,19 @@ white_list(A) ::= HOST ip_range_list(B). white_list_opt(A) ::= . { A = NULL; } white_list_opt(A) ::= white_list(B). { A = B; } +%type is_import_opt { int8_t } +%destructor is_import_opt { } +is_import_opt(A) ::= . { A = 0; } +is_import_opt(A) ::= IS_IMPORT NK_INTEGER(B). { A = taosStr2Int8(B.z, NULL, 10); } + +%type is_createdb_opt { int8_t } +%destructor is_createdb_opt { } +is_createdb_opt(A) ::= . { A = 0; } +is_createdb_opt(A) ::= CREATEDB NK_INTEGER(B). { A = taosStr2Int8(B.z, NULL, 10); } /************************************************ create/alter/drop user **********************************************/ -cmd ::= CREATE USER user_name(A) PASS NK_STRING(B) sysinfo_opt(C) +cmd ::= CREATE USER user_name(A) PASS NK_STRING(B) sysinfo_opt(C) is_createdb_opt(F) is_import_opt(E) white_list_opt(D). { - pCxt->pRootNode = createCreateUserStmt(pCxt, &A, &B, C); + pCxt->pRootNode = createCreateUserStmt(pCxt, &A, &B, C, E, F); pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, D); } cmd ::= ALTER USER user_name(A) PASS NK_STRING(B). { pCxt->pRootNode = createAlterUserStmt(pCxt, &A, TSDB_ALTER_USER_PASSWD, &B); } @@ -494,6 +503,7 @@ col_name(A) ::= column_name(B). /************************************************ show ****************************************************************/ cmd ::= SHOW DNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } cmd ::= SHOW USERS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } +cmd ::= SHOW USERS FULL. { pCxt->pRootNode = createShowStmtWithFull(pCxt, QUERY_NODE_SHOW_USERS_FULL_STMT); } cmd ::= SHOW USER PRIVILEGES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } cmd ::= SHOW db_kind_opt(A) DATABASES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 64d1260719..a0b08df322 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2010,6 +2010,15 @@ SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type) { CHECK_PARSER_STATUS(pCxt); SShowStmt* pStmt = (SShowStmt*)nodesMakeNode(type); CHECK_OUT_OF_MEM(pStmt); + pStmt->withFull = false; + return (SNode*)pStmt; +} + +SNode* createShowStmtWithFull(SAstCreateContext* pCxt, ENodeType type) { + CHECK_PARSER_STATUS(pCxt); + SShowStmt* pStmt = (SShowStmt*)nodesMakeNode(type); + CHECK_OUT_OF_MEM(pStmt); + pStmt->withFull = true; return (SNode*)pStmt; } @@ -2250,7 +2259,8 @@ SNode* addCreateUserStmtWhiteList(SAstCreateContext* pCxt, SNode* pCreateUserStm return pCreateUserStmt; } -SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const SToken* pPassword, int8_t sysinfo) { +SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const SToken* pPassword, int8_t sysinfo, + int8_t createDb, int8_t is_import) { CHECK_PARSER_STATUS(pCxt); char password[TSDB_USET_PASSWORD_LEN + 3] = {0}; if (!checkUserName(pCxt, pUserName) || !checkPassword(pCxt, pPassword, password)) { @@ -2261,6 +2271,8 @@ SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const ST COPY_STRING_FORM_ID_TOKEN(pStmt->userName, pUserName); strcpy(pStmt->password, password); pStmt->sysinfo = sysinfo; + pStmt->createDb = createDb; + pStmt->isImport = is_import; return (SNode*)pStmt; } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 122118b71c..68248c9eac 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -557,6 +557,11 @@ static int32_t collectMetaKeyFromShowUsers(SCollectMetaKeyCxt* pCxt, SShowStmt* pCxt->pMetaCache); } +static int32_t collectMetaKeyFromShowUsersFull(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_USERS_FULL, + pCxt->pMetaCache); +} + static int32_t collectMetaKeyFromShowLicence(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_LICENCES, pCxt->pMetaCache); @@ -896,6 +901,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowStableTags(pCxt, (SShowTableTagsStmt*)pStmt); case QUERY_NODE_SHOW_USERS_STMT: return collectMetaKeyFromShowUsers(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_USERS_FULL_STMT: + return collectMetaKeyFromShowUsersFull(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_LICENCES_STMT: return collectMetaKeyFromShowLicence(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_VGROUPS_STMT: diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index cf389e249f..5490d0dc49 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_VNODES_STMT: case QUERY_NODE_SHOW_SCORES_STMT: case QUERY_NODE_SHOW_USERS_STMT: + case QUERY_NODE_SHOW_USERS_FULL_STMT: case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: case QUERY_NODE_SHOW_GRANTS_FULL_STMT: case QUERY_NODE_SHOW_GRANTS_LOGS_STMT: diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 326ec092a9..ff48f81fc1 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -334,6 +334,7 @@ static SKeyword keywordTable[] = { {"COMPRESS", TK_COMPRESS}, {"LEVEL", TK_LEVEL}, {"ARBGROUPS", TK_ARBGROUPS}, + {"IS_IMPORT", TK_IS_IMPORT}, }; // clang-format on diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 335324c86f..ece491fb38 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -183,6 +183,13 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .numOfShowCols = 1, .pShowCols = {"*"} }, + { + .showType = QUERY_NODE_SHOW_USERS_FULL_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_USERS_FULL, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, { .showType = QUERY_NODE_SHOW_LICENCES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, @@ -8494,6 +8501,8 @@ static int32_t translateCreateUser(STranslateContext* pCxt, SCreateUserStmt* pSt createReq.sysInfo = pStmt->sysinfo; createReq.enable = 1; strcpy(createReq.pass, pStmt->password); + createReq.isImport = pStmt->isImport; + createReq.createDb = pStmt->createDb; createReq.numIpRanges = pStmt->numIpRanges; if (pStmt->numIpRanges > 0) { @@ -13372,6 +13381,7 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_STABLES_STMT: case QUERY_NODE_SHOW_USERS_STMT: + case QUERY_NODE_SHOW_USERS_FULL_STMT: case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index bc409dd6cf..ade8c2d94a 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1,3 +1,5 @@ +/* This file is automatically generated by Lemon from input grammar +** source file "sql.y". */ /* ** 2000-05-29 ** @@ -22,10 +24,7 @@ ** The following is the concatenation of all %include directives from the ** input grammar file: */ -#include -#include /************ Begin %include sections from the grammar ************************/ - #include #include #include @@ -42,11 +41,388 @@ #define YYSTACKDEPTH 0 /**************** End of %include directives **********************************/ -/* 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 ***************************/ +/* 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_IS_IMPORT 35 +#define TK_NK_INTEGER 36 +#define TK_CREATEDB 37 +#define TK_USER 38 +#define TK_ENABLE 39 +#define TK_SYSINFO 40 +#define TK_ADD 41 +#define TK_DROP 42 +#define TK_GRANT 43 +#define TK_ON 44 +#define TK_TO 45 +#define TK_REVOKE 46 +#define TK_FROM 47 +#define TK_SUBSCRIBE 48 +#define TK_READ 49 +#define TK_WRITE 50 +#define TK_NK_DOT 51 +#define TK_WITH 52 +#define TK_ENCRYPT_KEY 53 +#define TK_DNODE 54 +#define TK_PORT 55 +#define TK_DNODES 56 +#define TK_RESTORE 57 +#define TK_NK_IPTOKEN 58 +#define TK_FORCE 59 +#define TK_UNSAFE 60 +#define TK_CLUSTER 61 +#define TK_LOCAL 62 +#define TK_QNODE 63 +#define TK_BNODE 64 +#define TK_SNODE 65 +#define TK_MNODE 66 +#define TK_VNODE 67 +#define TK_DATABASE 68 +#define TK_USE 69 +#define TK_FLUSH 70 +#define TK_TRIM 71 +#define TK_S3MIGRATE 72 +#define TK_COMPACT 73 +#define TK_IF 74 +#define TK_NOT 75 +#define TK_EXISTS 76 +#define TK_BUFFER 77 +#define TK_CACHEMODEL 78 +#define TK_CACHESIZE 79 +#define TK_COMP 80 +#define TK_DURATION 81 +#define TK_NK_VARIABLE 82 +#define TK_MAXROWS 83 +#define TK_MINROWS 84 +#define TK_KEEP 85 +#define TK_PAGES 86 +#define TK_PAGESIZE 87 +#define TK_TSDB_PAGESIZE 88 +#define TK_PRECISION 89 +#define TK_REPLICA 90 +#define TK_VGROUPS 91 +#define TK_SINGLE_STABLE 92 +#define TK_RETENTIONS 93 +#define TK_SCHEMALESS 94 +#define TK_WAL_LEVEL 95 +#define TK_WAL_FSYNC_PERIOD 96 +#define TK_WAL_RETENTION_PERIOD 97 +#define TK_WAL_RETENTION_SIZE 98 +#define TK_WAL_ROLL_PERIOD 99 +#define TK_WAL_SEGMENT_SIZE 100 +#define TK_STT_TRIGGER 101 +#define TK_TABLE_PREFIX 102 +#define TK_TABLE_SUFFIX 103 +#define TK_S3_CHUNKSIZE 104 +#define TK_S3_KEEPLOCAL 105 +#define TK_S3_COMPACT 106 +#define TK_KEEP_TIME_OFFSET 107 +#define TK_ENCRYPT_ALGORITHM 108 +#define TK_NK_COLON 109 +#define TK_BWLIMIT 110 +#define TK_START 111 +#define TK_TIMESTAMP 112 +#define TK_END 113 +#define TK_TABLE 114 +#define TK_NK_LP 115 +#define TK_NK_RP 116 +#define TK_STABLE 117 +#define TK_COLUMN 118 +#define TK_MODIFY 119 +#define TK_RENAME 120 +#define TK_TAG 121 +#define TK_SET 122 +#define TK_NK_EQ 123 +#define TK_USING 124 +#define TK_TAGS 125 +#define TK_BOOL 126 +#define TK_TINYINT 127 +#define TK_SMALLINT 128 +#define TK_INT 129 +#define TK_INTEGER 130 +#define TK_BIGINT 131 +#define TK_FLOAT 132 +#define TK_DOUBLE 133 +#define TK_BINARY 134 +#define TK_NCHAR 135 +#define TK_UNSIGNED 136 +#define TK_JSON 137 +#define TK_VARCHAR 138 +#define TK_MEDIUMBLOB 139 +#define TK_BLOB 140 +#define TK_VARBINARY 141 +#define TK_GEOMETRY 142 +#define TK_DECIMAL 143 +#define TK_COMMENT 144 +#define TK_MAX_DELAY 145 +#define TK_WATERMARK 146 +#define TK_ROLLUP 147 +#define TK_TTL 148 +#define TK_SMA 149 +#define TK_DELETE_MARK 150 +#define TK_FIRST 151 +#define TK_LAST 152 +#define TK_SHOW 153 +#define TK_FULL 154 +#define TK_PRIVILEGES 155 +#define TK_DATABASES 156 +#define TK_TABLES 157 +#define TK_STABLES 158 +#define TK_MNODES 159 +#define TK_QNODES 160 +#define TK_ARBGROUPS 161 +#define TK_FUNCTIONS 162 +#define TK_INDEXES 163 +#define TK_ACCOUNTS 164 +#define TK_APPS 165 +#define TK_CONNECTIONS 166 +#define TK_LICENCES 167 +#define TK_GRANTS 168 +#define TK_LOGS 169 +#define TK_MACHINES 170 +#define TK_ENCRYPTIONS 171 +#define TK_QUERIES 172 +#define TK_SCORES 173 +#define TK_TOPICS 174 +#define TK_VARIABLES 175 +#define TK_BNODES 176 +#define TK_SNODES 177 +#define TK_TRANSACTIONS 178 +#define TK_DISTRIBUTED 179 +#define TK_CONSUMERS 180 +#define TK_SUBSCRIPTIONS 181 +#define TK_VNODES 182 +#define TK_ALIVE 183 +#define TK_VIEWS 184 +#define TK_VIEW 185 +#define TK_COMPACTS 186 +#define TK_NORMAL 187 +#define TK_CHILD 188 +#define TK_LIKE 189 +#define TK_TBNAME 190 +#define TK_QTAGS 191 +#define TK_AS 192 +#define TK_SYSTEM 193 +#define TK_TSMA 194 +#define TK_INTERVAL 195 +#define TK_RECURSIVE 196 +#define TK_TSMAS 197 +#define TK_FUNCTION 198 +#define TK_INDEX 199 +#define TK_COUNT 200 +#define TK_LAST_ROW 201 +#define TK_META 202 +#define TK_ONLY 203 +#define TK_TOPIC 204 +#define TK_CONSUMER 205 +#define TK_GROUP 206 +#define TK_DESC 207 +#define TK_DESCRIBE 208 +#define TK_RESET 209 +#define TK_QUERY 210 +#define TK_CACHE 211 +#define TK_EXPLAIN 212 +#define TK_ANALYZE 213 +#define TK_VERBOSE 214 +#define TK_NK_BOOL 215 +#define TK_RATIO 216 +#define TK_NK_FLOAT 217 +#define TK_OUTPUTTYPE 218 +#define TK_AGGREGATE 219 +#define TK_BUFSIZE 220 +#define TK_LANGUAGE 221 +#define TK_REPLACE 222 +#define TK_STREAM 223 +#define TK_INTO 224 +#define TK_PAUSE 225 +#define TK_RESUME 226 +#define TK_PRIMARY 227 +#define TK_KEY 228 +#define TK_TRIGGER 229 +#define TK_AT_ONCE 230 +#define TK_WINDOW_CLOSE 231 +#define TK_IGNORE 232 +#define TK_EXPIRED 233 +#define TK_FILL_HISTORY 234 +#define TK_UPDATE 235 +#define TK_SUBTABLE 236 +#define TK_UNTREATED 237 +#define TK_KILL 238 +#define TK_CONNECTION 239 +#define TK_TRANSACTION 240 +#define TK_BALANCE 241 +#define TK_VGROUP 242 +#define TK_LEADER 243 +#define TK_MERGE 244 +#define TK_REDISTRIBUTE 245 +#define TK_SPLIT 246 +#define TK_DELETE 247 +#define TK_INSERT 248 +#define TK_NK_BIN 249 +#define TK_NK_HEX 250 +#define TK_NULL 251 +#define TK_NK_QUESTION 252 +#define TK_NK_ALIAS 253 +#define TK_NK_ARROW 254 +#define TK_ROWTS 255 +#define TK_QSTART 256 +#define TK_QEND 257 +#define TK_QDURATION 258 +#define TK_WSTART 259 +#define TK_WEND 260 +#define TK_WDURATION 261 +#define TK_IROWTS 262 +#define TK_ISFILLED 263 +#define TK_CAST 264 +#define TK_NOW 265 +#define TK_TODAY 266 +#define TK_TIMEZONE 267 +#define TK_CLIENT_VERSION 268 +#define TK_SERVER_VERSION 269 +#define TK_SERVER_STATUS 270 +#define TK_CURRENT_USER 271 +#define TK_CASE 272 +#define TK_WHEN 273 +#define TK_THEN 274 +#define TK_ELSE 275 +#define TK_BETWEEN 276 +#define TK_IS 277 +#define TK_NK_LT 278 +#define TK_NK_GT 279 +#define TK_NK_LE 280 +#define TK_NK_GE 281 +#define TK_NK_NE 282 +#define TK_MATCH 283 +#define TK_NMATCH 284 +#define TK_CONTAINS 285 +#define TK_IN 286 +#define TK_JOIN 287 +#define TK_INNER 288 +#define TK_LEFT 289 +#define TK_RIGHT 290 +#define TK_OUTER 291 +#define TK_SEMI 292 +#define TK_ANTI 293 +#define TK_ASOF 294 +#define TK_WINDOW 295 +#define TK_WINDOW_OFFSET 296 +#define TK_JLIMIT 297 +#define TK_SELECT 298 +#define TK_NK_HINT 299 +#define TK_DISTINCT 300 +#define TK_WHERE 301 +#define TK_PARTITION 302 +#define TK_BY 303 +#define TK_SESSION 304 +#define TK_STATE_WINDOW 305 +#define TK_EVENT_WINDOW 306 +#define TK_COUNT_WINDOW 307 +#define TK_SLIDING 308 +#define TK_FILL 309 +#define TK_VALUE 310 +#define TK_VALUE_F 311 +#define TK_NONE 312 +#define TK_PREV 313 +#define TK_NULL_F 314 +#define TK_LINEAR 315 +#define TK_NEXT 316 +#define TK_HAVING 317 +#define TK_RANGE 318 +#define TK_EVERY 319 +#define TK_ORDER 320 +#define TK_SLIMIT 321 +#define TK_SOFFSET 322 +#define TK_LIMIT 323 +#define TK_OFFSET 324 +#define TK_ASC 325 +#define TK_NULLS 326 +#define TK_ABORT 327 +#define TK_AFTER 328 +#define TK_ATTACH 329 +#define TK_BEFORE 330 +#define TK_BEGIN 331 +#define TK_BITAND 332 +#define TK_BITNOT 333 +#define TK_BITOR 334 +#define TK_BLOCKS 335 +#define TK_CHANGE 336 +#define TK_COMMA 337 +#define TK_CONCAT 338 +#define TK_CONFLICT 339 +#define TK_COPY 340 +#define TK_DEFERRED 341 +#define TK_DELIMITERS 342 +#define TK_DETACH 343 +#define TK_DIVIDE 344 +#define TK_DOT 345 +#define TK_EACH 346 +#define TK_FAIL 347 +#define TK_FILE 348 +#define TK_FOR 349 +#define TK_GLOB 350 +#define TK_ID 351 +#define TK_IMMEDIATE 352 +#define TK_IMPORT 353 +#define TK_INITIALLY 354 +#define TK_INSTEAD 355 +#define TK_ISNULL 356 +#define TK_MODULES 357 +#define TK_NK_BITNOT 358 +#define TK_NK_SEMI 359 +#define TK_NOTNULL 360 +#define TK_OF 361 +#define TK_PLUS 362 +#define TK_PRIVILEGE 363 +#define TK_RAISE 364 +#define TK_RESTRICT 365 +#define TK_ROW 366 +#define TK_STAR 367 +#define TK_STATEMENT 368 +#define TK_STRICT 369 +#define TK_STRING 370 +#define TK_TIMES 371 +#define TK_VALUES 372 +#define TK_VARIABLE 373 +#define TK_WAL 374 +#define TK_ENCODE 375 +#define TK_COMPRESS 376 +#define TK_LEVEL 377 +#endif +/**************** End token definitions ***************************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. @@ -104,30 +480,30 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 555 +#define YYNOCODE 558 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SNodeList* yy34; - EShowKind yy39; - int32_t yy100; - EJoinType yy162; - int8_t yy323; - SShowTablesOption yy397; - bool yy437; - EOperatorType yy440; - EJoinSubType yy444; - SNode* yy452; - SAlterOption yy455; - SToken yy479; - EOrder yy548; - int64_t yy579; - STokenPair yy687; - ENullOrder yy817; - SDataType yy874; - EFillMode yy984; + SAlterOption yy101; + bool yy209; + SNodeList* yy316; + SNode* yy416; + EOrder yy506; + EJoinSubType yy630; + EShowKind yy681; + int32_t yy820; + EOperatorType yy848; + STokenPair yy849; + EFillMode yy882; + SShowTablesOption yy925; + SDataType yy952; + EJoinType yy972; + int8_t yy1043; + ENullOrder yy1045; + int64_t yy1089; + SToken yy1109; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -143,18 +519,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 967 -#define YYNRULE 749 -#define YYNRULE_WITH_ACTION 749 -#define YYNTOKEN 377 -#define YY_MAX_SHIFT 966 -#define YY_MIN_SHIFTREDUCE 1434 -#define YY_MAX_SHIFTREDUCE 2182 -#define YY_ERROR_ACTION 2183 -#define YY_ACCEPT_ACTION 2184 -#define YY_NO_ACTION 2185 -#define YY_MIN_REDUCE 2186 -#define YY_MAX_REDUCE 2934 +#define YYNSTATE 972 +#define YYNRULE 754 +#define YYNRULE_WITH_ACTION 754 +#define YYNTOKEN 378 +#define YY_MAX_SHIFT 971 +#define YY_MIN_SHIFTREDUCE 1441 +#define YY_MAX_SHIFTREDUCE 2194 +#define YY_ERROR_ACTION 2195 +#define YY_ACCEPT_ACTION 2196 +#define YY_NO_ACTION 2197 +#define YY_MIN_REDUCE 2198 +#define YY_MAX_REDUCE 2951 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -221,951 +597,905 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3285) +#define YY_ACTTAB_COUNT (3045) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 792, 37, 338, 2543, 190, 2380, 315, 2905, 2900, 804, - /* 10 */ 155, 2449, 47, 45, 2099, 2900, 859, 2389, 2668, 464, - /* 20 */ 471, 487, 1920, 2186, 2541, 849, 791, 217, 661, 2710, - /* 30 */ 2447, 2901, 793, 182, 2904, 2008, 146, 1918, 2901, 2903, - /* 40 */ 197, 2323, 807, 687, 804, 155, 3, 145, 144, 143, - /* 50 */ 142, 141, 140, 139, 138, 137, 40, 39, 9, 53, - /* 60 */ 46, 44, 43, 42, 41, 1475, 439, 2003, 2516, 476, - /* 70 */ 2728, 40, 39, 781, 19, 46, 44, 43, 42, 41, - /* 80 */ 863, 1926, 476, 2449, 1482, 2543, 2675, 2530, 844, 662, - /* 90 */ 183, 437, 2198, 863, 496, 495, 804, 155, 859, 2389, - /* 100 */ 466, 2728, 2447, 122, 1934, 66, 2540, 849, 1477, 1480, - /* 110 */ 1481, 963, 489, 2391, 15, 2209, 2710, 2008, 221, 1927, - /* 120 */ 40, 39, 377, 2628, 46, 44, 43, 42, 41, 845, - /* 130 */ 806, 185, 2810, 2811, 2709, 153, 2815, 2748, 782, 553, - /* 140 */ 2512, 119, 2711, 848, 2713, 2714, 843, 1945, 863, 2003, - /* 150 */ 2010, 2011, 252, 199, 2124, 2802, 644, 2728, 2238, 467, - /* 160 */ 2798, 804, 155, 1926, 455, 2590, 192, 2810, 803, 2125, - /* 170 */ 147, 802, 2675, 2675, 780, 844, 858, 758, 2900, 218, - /* 180 */ 792, 516, 2074, 454, 2590, 2900, 431, 2849, 2900, 1981, - /* 190 */ 1991, 641, 232, 832, 642, 2230, 791, 217, 858, 2009, - /* 200 */ 2012, 2901, 793, 2906, 217, 223, 791, 217, 2901, 793, - /* 210 */ 658, 2901, 793, 2123, 1921, 62, 1919, 2905, 125, 2810, - /* 220 */ 2811, 2709, 153, 2815, 2748, 2900, 98, 777, 119, 2711, - /* 230 */ 848, 2713, 2714, 843, 2037, 863, 869, 2393, 157, 123, - /* 240 */ 166, 2773, 2802, 441, 2904, 62, 467, 2798, 2901, 2902, - /* 250 */ 1924, 1925, 1978, 2384, 1980, 1983, 1984, 1985, 1986, 1987, - /* 260 */ 1988, 1989, 1990, 840, 861, 860, 2002, 2004, 2005, 2006, - /* 270 */ 2007, 2, 47, 45, 659, 2536, 1502, 415, 1501, 1943, - /* 280 */ 471, 741, 1920, 186, 2810, 2811, 588, 153, 2815, 609, - /* 290 */ 496, 495, 50, 151, 608, 2008, 1935, 1918, 1930, 738, - /* 300 */ 2038, 2822, 2071, 2072, 2073, 2822, 2822, 2822, 2822, 2822, - /* 310 */ 646, 33, 567, 1503, 610, 1927, 643, 40, 39, 416, - /* 320 */ 569, 46, 44, 43, 42, 41, 649, 2003, 664, 642, - /* 330 */ 2230, 547, 1938, 1940, 19, 2187, 783, 778, 771, 767, - /* 340 */ 12, 1926, 10, 858, 742, 180, 861, 860, 2002, 2004, - /* 350 */ 2005, 2006, 2007, 236, 489, 2391, 136, 657, 2074, 135, - /* 360 */ 134, 133, 132, 131, 130, 129, 128, 127, 51, 289, - /* 370 */ 1978, 963, 440, 288, 15, 900, 172, 171, 897, 896, - /* 380 */ 895, 169, 98, 555, 868, 867, 866, 36, 469, 2032, - /* 390 */ 2033, 2034, 2035, 2036, 2040, 2041, 2042, 2043, 322, 92, - /* 400 */ 40, 39, 91, 660, 46, 44, 43, 42, 41, 2385, - /* 410 */ 2010, 2011, 1949, 2523, 2502, 739, 596, 595, 594, 593, - /* 420 */ 592, 587, 586, 585, 584, 423, 651, 2582, 322, 574, - /* 430 */ 573, 572, 571, 570, 564, 563, 562, 50, 557, 556, - /* 440 */ 438, 2074, 2373, 418, 548, 1754, 1755, 101, 181, 1981, - /* 450 */ 1991, 1773, 426, 390, 1945, 453, 62, 730, 136, 2009, - /* 460 */ 2012, 135, 134, 133, 132, 131, 130, 129, 128, 127, - /* 470 */ 90, 388, 76, 728, 1921, 75, 1919, 2822, 2071, 2072, - /* 480 */ 2073, 2822, 2822, 2822, 2822, 2822, 417, 828, 726, 2774, - /* 490 */ 724, 722, 286, 285, 1930, 2710, 1949, 210, 250, 623, - /* 500 */ 621, 618, 616, 2076, 2077, 2078, 2079, 2080, 807, 197, - /* 510 */ 1924, 1925, 1978, 2436, 1980, 1983, 1984, 1985, 1986, 1987, - /* 520 */ 1988, 1989, 1990, 840, 861, 860, 2002, 2004, 2005, 2006, - /* 530 */ 2007, 2, 12, 47, 45, 1946, 2728, 2517, 1920, 2208, - /* 540 */ 1945, 471, 544, 1920, 62, 46, 44, 43, 42, 41, - /* 550 */ 1654, 322, 2675, 1918, 844, 535, 2008, 534, 1918, 521, - /* 560 */ 2485, 2071, 2072, 2073, 1645, 892, 891, 890, 1649, 889, - /* 570 */ 1651, 1652, 888, 885, 2710, 1660, 882, 1662, 1663, 879, - /* 580 */ 876, 873, 63, 213, 2543, 474, 2132, 845, 2003, 533, - /* 590 */ 835, 606, 604, 179, 411, 19, 2675, 1926, 230, 473, - /* 600 */ 2709, 834, 1926, 2748, 2394, 2540, 849, 119, 2711, 848, - /* 610 */ 2713, 2714, 843, 1946, 863, 2728, 445, 444, 691, 199, - /* 620 */ 322, 2802, 690, 1766, 1767, 467, 2798, 963, 559, 2512, - /* 630 */ 180, 2675, 963, 844, 62, 15, 86, 85, 540, 322, - /* 640 */ 2392, 229, 2669, 2817, 1950, 774, 773, 2130, 2131, 2133, - /* 650 */ 2134, 2135, 902, 2850, 532, 530, 40, 39, 859, 2389, - /* 660 */ 46, 44, 43, 42, 41, 1793, 1794, 414, 12, 2814, - /* 670 */ 519, 2010, 2011, 515, 511, 507, 504, 533, 146, 2709, - /* 680 */ 491, 234, 2748, 2442, 2444, 692, 119, 2711, 848, 2713, - /* 690 */ 2714, 843, 2905, 863, 443, 442, 525, 689, 2777, 1502, - /* 700 */ 2802, 1501, 859, 2389, 467, 2798, 476, 117, 2468, 1948, - /* 710 */ 1981, 1991, 2103, 1482, 1792, 1795, 1945, 863, 1945, 691, - /* 720 */ 2009, 2012, 55, 690, 158, 527, 523, 322, 1950, 581, - /* 730 */ 1921, 1654, 1919, 2381, 580, 1921, 1503, 1919, 1480, 1481, - /* 740 */ 600, 2685, 579, 1693, 1694, 1645, 892, 891, 890, 1649, - /* 750 */ 889, 1651, 1652, 839, 838, 2710, 1660, 837, 1662, 1663, - /* 760 */ 836, 876, 873, 2143, 1949, 757, 1924, 1925, 845, 2689, - /* 770 */ 2240, 1924, 1925, 1978, 377, 1980, 1983, 1984, 1985, 1986, - /* 780 */ 1987, 1988, 1989, 1990, 840, 861, 860, 2002, 2004, 2005, - /* 790 */ 2006, 2007, 2, 47, 45, 2013, 2728, 482, 2710, 590, - /* 800 */ 2512, 471, 148, 1920, 2167, 916, 241, 485, 43, 42, - /* 810 */ 41, 845, 2675, 2857, 844, 88, 2008, 322, 1918, 2365, - /* 820 */ 2691, 2694, 40, 39, 1926, 2710, 46, 44, 43, 42, - /* 830 */ 41, 863, 599, 240, 715, 1949, 2591, 2018, 845, 2728, - /* 840 */ 2870, 638, 830, 1945, 2774, 2207, 597, 2206, 2003, 729, - /* 850 */ 636, 2817, 239, 632, 628, 2675, 2363, 844, 859, 2389, - /* 860 */ 2709, 919, 1926, 2748, 2349, 287, 2728, 119, 2711, 848, - /* 870 */ 2713, 2714, 843, 918, 863, 583, 582, 2813, 541, 2920, - /* 880 */ 320, 2802, 2675, 718, 844, 467, 2798, 1982, 859, 2389, - /* 890 */ 712, 710, 963, 2685, 254, 48, 893, 284, 644, 2449, - /* 900 */ 2238, 2449, 2675, 2709, 2675, 60, 2748, 475, 542, 490, - /* 910 */ 119, 2711, 848, 2713, 2714, 843, 755, 863, 2447, 1484, - /* 920 */ 2447, 2689, 2920, 1948, 2802, 1944, 492, 2039, 467, 2798, - /* 930 */ 2709, 2010, 2011, 2748, 179, 208, 2629, 119, 2711, 848, - /* 940 */ 2713, 2714, 843, 72, 863, 2394, 71, 742, 1979, 2920, - /* 950 */ 1979, 2802, 1945, 40, 39, 467, 2798, 46, 44, 43, - /* 960 */ 42, 41, 900, 172, 171, 897, 896, 895, 169, 2710, - /* 970 */ 1981, 1991, 2691, 2693, 468, 2378, 1889, 2205, 29, 1593, - /* 980 */ 2009, 2012, 845, 863, 769, 2096, 1888, 859, 2389, 2364, - /* 990 */ 758, 859, 2389, 859, 2389, 1921, 1950, 1919, 2900, 900, - /* 1000 */ 172, 171, 897, 896, 895, 169, 212, 561, 481, 480, - /* 1010 */ 2728, 575, 1982, 576, 34, 2184, 2906, 217, 484, 483, - /* 1020 */ 2174, 2901, 793, 1595, 2044, 2596, 2675, 372, 844, 744, - /* 1030 */ 2582, 1924, 1925, 1978, 2675, 1980, 1983, 1984, 1985, 1986, - /* 1040 */ 1987, 1988, 1989, 1990, 840, 861, 860, 2002, 2004, 2005, - /* 1050 */ 2006, 2007, 2, 47, 45, 2710, 2443, 2444, 2204, 1588, - /* 1060 */ 2144, 471, 902, 1920, 1505, 1506, 156, 1950, 845, 2773, - /* 1070 */ 2893, 2904, 859, 2389, 2709, 1979, 2008, 2748, 1918, 2261, - /* 1080 */ 290, 119, 2711, 848, 2713, 2714, 843, 291, 863, 859, - /* 1090 */ 2389, 2710, 577, 2920, 320, 2802, 2728, 14, 13, 467, - /* 1100 */ 2798, 709, 502, 1589, 845, 2203, 2834, 501, 2003, 663, - /* 1110 */ 859, 2389, 2675, 1605, 844, 2675, 708, 707, 706, 859, - /* 1120 */ 2389, 1982, 1926, 698, 152, 702, 329, 330, 1604, 701, - /* 1130 */ 2386, 328, 2728, 2817, 700, 705, 448, 447, 2173, 292, - /* 1140 */ 699, 859, 2389, 2202, 446, 695, 694, 693, 2675, 2199, - /* 1150 */ 844, 786, 963, 859, 2389, 48, 758, 2201, 735, 2812, - /* 1160 */ 2709, 300, 2675, 2748, 2900, 1847, 1848, 119, 2711, 848, - /* 1170 */ 2713, 2714, 843, 810, 863, 859, 2389, 859, 2389, 2920, - /* 1180 */ 2200, 2802, 2906, 217, 1979, 467, 2798, 2901, 793, 859, - /* 1190 */ 2389, 2010, 2011, 859, 2389, 333, 2709, 824, 102, 2748, - /* 1200 */ 2675, 1609, 611, 119, 2711, 848, 2713, 2714, 843, 340, - /* 1210 */ 863, 2051, 758, 856, 2675, 2920, 1608, 2802, 2197, 2085, - /* 1220 */ 2900, 467, 2798, 421, 420, 859, 2389, 859, 2389, 2710, - /* 1230 */ 1981, 1991, 1821, 477, 859, 2389, 211, 2675, 2906, 217, - /* 1240 */ 2009, 2012, 845, 2901, 793, 857, 2008, 368, 486, 2376, - /* 1250 */ 683, 682, 685, 684, 493, 1921, 2615, 1919, 111, 2196, - /* 1260 */ 2449, 2195, 2194, 2193, 704, 703, 2449, 2192, 2191, 2190, - /* 1270 */ 2728, 2189, 930, 928, 170, 2675, 2710, 537, 2003, 811, - /* 1280 */ 2095, 2324, 536, 179, 2382, 819, 2675, 2619, 844, 845, - /* 1290 */ 613, 1924, 1925, 1978, 2395, 1980, 1983, 1984, 1985, 1986, - /* 1300 */ 1987, 1988, 1989, 1990, 840, 861, 860, 2002, 2004, 2005, - /* 1310 */ 2006, 2007, 2, 47, 45, 78, 2675, 2728, 2675, 2675, - /* 1320 */ 2675, 471, 2495, 1920, 2675, 2675, 2675, 894, 2675, 796, - /* 1330 */ 2440, 758, 2449, 2675, 2709, 844, 2008, 2748, 1918, 2900, - /* 1340 */ 509, 119, 2711, 848, 2713, 2714, 843, 384, 863, 743, - /* 1350 */ 2426, 2448, 2366, 2775, 2259, 2802, 54, 2906, 217, 467, - /* 1360 */ 2798, 898, 2901, 793, 2440, 551, 40, 39, 2003, 89, - /* 1370 */ 46, 44, 43, 42, 41, 899, 711, 808, 2440, 2214, - /* 1380 */ 958, 2709, 1926, 277, 2748, 161, 275, 795, 119, 2711, - /* 1390 */ 848, 2713, 2714, 843, 279, 863, 281, 278, 283, 280, - /* 1400 */ 829, 282, 2802, 758, 696, 162, 467, 2798, 697, 799, - /* 1410 */ 35, 2900, 963, 2710, 2250, 15, 40, 39, 2248, 376, - /* 1420 */ 46, 44, 43, 42, 41, 1911, 845, 1887, 1586, 2906, - /* 1430 */ 217, 758, 1584, 301, 2901, 793, 713, 162, 765, 2900, - /* 1440 */ 716, 732, 49, 731, 2176, 2177, 14, 13, 833, 49, - /* 1450 */ 2696, 2010, 2011, 297, 2728, 200, 170, 2906, 217, 479, - /* 1460 */ 478, 1912, 2901, 793, 327, 77, 64, 49, 49, 383, - /* 1470 */ 2675, 2393, 844, 2115, 1929, 861, 860, 2002, 2004, 2005, - /* 1480 */ 2006, 2007, 103, 347, 346, 349, 348, 1837, 351, 350, - /* 1490 */ 1981, 1991, 77, 167, 170, 353, 352, 190, 207, 316, - /* 1500 */ 2009, 2012, 2274, 355, 354, 357, 356, 359, 358, 361, - /* 1510 */ 360, 363, 362, 2863, 2698, 1921, 775, 1919, 2709, 1845, - /* 1520 */ 2119, 2748, 365, 364, 2129, 120, 2711, 848, 2713, 2714, - /* 1530 */ 843, 2128, 863, 367, 366, 308, 74, 306, 809, 2802, - /* 1540 */ 805, 871, 1928, 2801, 2798, 168, 331, 816, 2045, 1992, - /* 1550 */ 1790, 1924, 1925, 1978, 150, 1980, 1983, 1984, 1985, 1986, - /* 1560 */ 1987, 1988, 1989, 1990, 840, 861, 860, 2002, 2004, 2005, - /* 1570 */ 2006, 2007, 2, 170, 1780, 343, 1636, 149, 936, 935, - /* 1580 */ 934, 933, 499, 167, 932, 931, 160, 926, 925, 924, - /* 1590 */ 923, 922, 921, 920, 159, 914, 913, 912, 498, 497, - /* 1600 */ 909, 908, 907, 196, 195, 906, 494, 905, 904, 903, - /* 1610 */ 740, 2729, 1566, 910, 911, 2242, 1539, 797, 382, 2316, - /* 1620 */ 116, 2315, 2710, 1667, 2029, 2521, 2231, 1675, 966, 113, - /* 1630 */ 2853, 772, 456, 460, 779, 845, 813, 1558, 1556, 500, - /* 1640 */ 518, 2237, 2522, 2437, 374, 751, 2854, 2864, 787, 788, - /* 1650 */ 318, 2710, 313, 1932, 321, 1682, 1567, 2350, 503, 1680, - /* 1660 */ 1540, 956, 206, 2728, 845, 173, 508, 5, 435, 954, - /* 1670 */ 1943, 952, 948, 944, 940, 517, 371, 1953, 529, 2675, - /* 1680 */ 528, 844, 224, 225, 531, 227, 1814, 375, 1944, 545, - /* 1690 */ 238, 552, 2728, 554, 565, 558, 560, 602, 578, 800, - /* 1700 */ 589, 2514, 598, 591, 601, 603, 614, 612, 2675, 615, - /* 1710 */ 844, 244, 243, 617, 619, 620, 247, 622, 624, 1951, - /* 1720 */ 639, 1931, 118, 4, 647, 344, 640, 2709, 650, 648, - /* 1730 */ 2748, 255, 94, 1946, 120, 2711, 848, 2713, 2714, 843, - /* 1740 */ 2277, 863, 652, 258, 1952, 653, 1954, 261, 2802, 2710, - /* 1750 */ 656, 654, 831, 2798, 263, 1955, 846, 820, 95, 2748, - /* 1760 */ 96, 1956, 842, 120, 2711, 848, 2713, 2714, 843, 2531, - /* 1770 */ 863, 2537, 97, 2710, 665, 686, 270, 2802, 124, 719, - /* 1780 */ 720, 430, 2798, 688, 2379, 274, 845, 409, 734, 2375, - /* 1790 */ 2728, 276, 2605, 736, 175, 100, 378, 2602, 121, 2377, - /* 1800 */ 2372, 176, 342, 1947, 826, 177, 2675, 325, 844, 293, - /* 1810 */ 163, 2583, 324, 746, 2728, 745, 708, 707, 706, 296, - /* 1820 */ 2601, 747, 753, 698, 152, 702, 750, 298, 776, 701, - /* 1830 */ 2675, 294, 844, 2869, 700, 705, 448, 447, 762, 814, - /* 1840 */ 699, 8, 2710, 785, 446, 695, 694, 693, 2841, 2868, - /* 1850 */ 752, 763, 303, 307, 2709, 845, 305, 2748, 761, 2710, - /* 1860 */ 309, 406, 2711, 848, 2713, 2714, 843, 841, 863, 827, - /* 1870 */ 2767, 760, 845, 790, 311, 189, 310, 312, 2709, 789, - /* 1880 */ 461, 2748, 2923, 2728, 314, 184, 2711, 848, 2713, 2714, - /* 1890 */ 843, 801, 863, 2899, 798, 1948, 317, 154, 2818, 2675, - /* 1900 */ 2728, 844, 2093, 812, 2091, 2821, 323, 203, 272, 379, - /* 1910 */ 164, 380, 2551, 817, 2550, 2549, 2675, 1, 844, 219, - /* 1920 */ 818, 465, 165, 822, 61, 336, 191, 852, 2783, 850, - /* 1930 */ 341, 825, 759, 2860, 854, 681, 677, 673, 669, 2710, - /* 1940 */ 271, 381, 110, 855, 2390, 112, 1458, 2709, 865, 957, - /* 1950 */ 2748, 2667, 845, 2666, 187, 2711, 848, 2713, 2714, 843, - /* 1960 */ 370, 863, 960, 962, 2709, 2662, 2661, 2748, 385, 174, - /* 1970 */ 2627, 120, 2711, 848, 2713, 2714, 843, 410, 863, 2653, - /* 1980 */ 2728, 389, 2652, 2644, 2643, 2802, 99, 52, 2626, 269, - /* 1990 */ 2799, 2659, 387, 2658, 2650, 2649, 2675, 2638, 844, 2637, - /* 2000 */ 2656, 2655, 2647, 2646, 2635, 2634, 397, 427, 2632, 2631, - /* 2010 */ 2441, 419, 422, 794, 2921, 2625, 2620, 408, 738, 398, - /* 2020 */ 83, 505, 506, 1871, 1872, 510, 222, 2618, 512, 513, - /* 2030 */ 514, 1870, 2710, 436, 2614, 520, 2613, 522, 2612, 524, - /* 2040 */ 428, 2617, 2616, 2611, 2709, 845, 526, 2748, 1858, 2587, - /* 2050 */ 226, 184, 2711, 848, 2713, 2714, 843, 257, 863, 2586, - /* 2060 */ 228, 1817, 84, 1816, 2564, 2563, 268, 538, 539, 2561, - /* 2070 */ 259, 266, 2562, 2728, 2560, 2504, 264, 655, 543, 1753, - /* 2080 */ 2501, 546, 2500, 2494, 549, 550, 2491, 231, 2490, 2675, - /* 2090 */ 2489, 844, 87, 2488, 2493, 256, 235, 566, 233, 2861, - /* 2100 */ 2492, 2487, 2486, 2484, 2483, 2482, 2481, 568, 2479, 2478, - /* 2110 */ 2477, 2710, 2476, 2475, 458, 2499, 2474, 2473, 2472, 2497, - /* 2120 */ 2480, 2471, 2470, 2469, 845, 2467, 2466, 2465, 2464, 2463, - /* 2130 */ 2710, 2462, 2461, 93, 237, 2460, 2459, 2709, 2458, 2457, - /* 2140 */ 2748, 2529, 2498, 845, 407, 2711, 848, 2713, 2714, 843, - /* 2150 */ 2496, 863, 2728, 2456, 2710, 2455, 1759, 2454, 242, 2453, - /* 2160 */ 605, 2452, 2451, 607, 2450, 1606, 1610, 845, 2675, 2281, - /* 2170 */ 844, 2728, 2280, 2279, 245, 424, 2278, 1602, 246, 2276, - /* 2180 */ 2273, 425, 625, 2272, 2265, 2252, 629, 2675, 2226, 844, - /* 2190 */ 627, 633, 251, 459, 631, 2728, 1483, 2225, 2585, 2710, - /* 2200 */ 248, 626, 637, 635, 249, 630, 80, 198, 2695, 634, - /* 2210 */ 253, 2675, 842, 844, 81, 2581, 2709, 209, 645, 2748, - /* 2220 */ 2571, 2559, 2558, 407, 2711, 848, 2713, 2714, 843, 260, - /* 2230 */ 863, 262, 2535, 2528, 2367, 2709, 2275, 265, 2748, 267, - /* 2240 */ 2728, 2271, 400, 2711, 848, 2713, 2714, 843, 666, 863, - /* 2250 */ 1532, 2710, 667, 668, 2269, 670, 2675, 671, 844, 2709, - /* 2260 */ 672, 2267, 2748, 674, 845, 675, 187, 2711, 848, 2713, - /* 2270 */ 2714, 843, 2264, 863, 676, 678, 679, 2247, 680, 2245, - /* 2280 */ 2246, 2244, 2222, 2369, 1687, 1686, 2368, 1592, 1591, 2710, - /* 2290 */ 273, 2262, 2728, 784, 1590, 1587, 1574, 1585, 2260, 73, - /* 2300 */ 927, 1583, 845, 1582, 2709, 1581, 1580, 2748, 2675, 929, - /* 2310 */ 844, 406, 2711, 848, 2713, 2714, 843, 449, 863, 2710, - /* 2320 */ 2768, 1579, 1576, 450, 1575, 1573, 2922, 2251, 451, 2249, - /* 2330 */ 2728, 452, 845, 470, 717, 2221, 2710, 2220, 2219, 721, - /* 2340 */ 2218, 723, 2217, 2216, 714, 725, 2675, 727, 844, 845, - /* 2350 */ 126, 1852, 1854, 1851, 1856, 2584, 2709, 28, 67, 2748, - /* 2360 */ 2728, 2580, 295, 407, 2711, 848, 2713, 2714, 843, 56, - /* 2370 */ 863, 472, 1825, 1823, 2570, 748, 2675, 2728, 844, 2557, - /* 2380 */ 2556, 2905, 20, 57, 30, 302, 749, 1802, 2146, 764, - /* 2390 */ 2120, 1801, 766, 2675, 2709, 844, 457, 2748, 299, 17, - /* 2400 */ 770, 407, 2711, 848, 2713, 2714, 843, 737, 863, 754, - /* 2410 */ 756, 178, 768, 2710, 1827, 6, 7, 21, 1842, 22, - /* 2420 */ 304, 202, 2127, 214, 733, 2114, 845, 2748, 32, 2086, - /* 2430 */ 215, 402, 2711, 848, 2713, 2714, 843, 188, 863, 2696, - /* 2440 */ 201, 2709, 31, 2088, 2748, 82, 216, 2710, 392, 2711, - /* 2450 */ 848, 2713, 2714, 843, 2728, 863, 2084, 65, 24, 2166, - /* 2460 */ 845, 2167, 319, 2161, 2160, 462, 2165, 2164, 463, 2068, - /* 2470 */ 2675, 2067, 844, 59, 193, 2555, 2710, 2534, 105, 2533, - /* 2480 */ 104, 106, 326, 2122, 204, 332, 815, 2527, 2728, 845, - /* 2490 */ 69, 334, 58, 823, 107, 25, 821, 335, 11, 2020, - /* 2500 */ 13, 847, 2019, 1936, 2675, 23, 844, 18, 1995, 194, - /* 2510 */ 337, 1994, 2030, 878, 881, 884, 887, 2728, 2709, 38, - /* 2520 */ 205, 2748, 1993, 16, 26, 391, 2711, 848, 2713, 2714, - /* 2530 */ 843, 1963, 863, 2675, 1971, 844, 27, 70, 2526, 853, - /* 2540 */ 108, 113, 345, 864, 2182, 2181, 2180, 851, 339, 2179, - /* 2550 */ 109, 2753, 2709, 2752, 870, 2748, 1997, 862, 68, 393, - /* 2560 */ 2711, 848, 2713, 2714, 843, 1668, 863, 488, 1665, 872, - /* 2570 */ 2710, 875, 874, 1664, 877, 1661, 880, 883, 1655, 1653, - /* 2580 */ 886, 2709, 1659, 845, 2748, 369, 114, 1658, 399, 2711, - /* 2590 */ 848, 2713, 2714, 843, 2710, 863, 1657, 115, 1681, 79, - /* 2600 */ 1656, 1677, 1530, 901, 1570, 1569, 1568, 845, 1565, 2710, - /* 2610 */ 1562, 2728, 1561, 1560, 1559, 1557, 915, 1555, 1554, 917, - /* 2620 */ 1553, 220, 845, 1600, 1551, 1599, 1550, 2675, 1549, 844, - /* 2630 */ 1548, 1547, 1596, 1546, 1545, 2728, 1594, 1542, 1541, 2710, - /* 2640 */ 1538, 1537, 1536, 1535, 2270, 938, 937, 2268, 939, 941, - /* 2650 */ 2728, 2675, 845, 844, 943, 942, 2266, 947, 945, 2263, - /* 2660 */ 946, 949, 951, 950, 2243, 2241, 2675, 953, 844, 1472, - /* 2670 */ 955, 2215, 1459, 959, 373, 2709, 961, 2185, 2748, 1922, - /* 2680 */ 2728, 964, 403, 2711, 848, 2713, 2714, 843, 386, 863, - /* 2690 */ 965, 2710, 2185, 2185, 2185, 2185, 2675, 2185, 844, 2709, - /* 2700 */ 2185, 2185, 2748, 2185, 845, 2185, 394, 2711, 848, 2713, - /* 2710 */ 2714, 843, 2185, 863, 2709, 2185, 2185, 2748, 2185, 2185, - /* 2720 */ 2185, 404, 2711, 848, 2713, 2714, 843, 2710, 863, 2185, - /* 2730 */ 2185, 2185, 2728, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 2740 */ 845, 2185, 2185, 2185, 2709, 2185, 2185, 2748, 2675, 2185, - /* 2750 */ 844, 395, 2711, 848, 2713, 2714, 843, 2710, 863, 2185, - /* 2760 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2728, 2185, - /* 2770 */ 845, 2185, 2185, 2185, 2710, 2185, 2185, 2185, 2185, 2185, - /* 2780 */ 2185, 2185, 2185, 2185, 2675, 2185, 844, 845, 2185, 2185, - /* 2790 */ 2185, 2185, 2185, 2185, 2185, 2185, 2709, 2185, 2728, 2748, - /* 2800 */ 2185, 2185, 2185, 405, 2711, 848, 2713, 2714, 843, 2185, - /* 2810 */ 863, 2185, 2185, 2185, 2675, 2728, 844, 2185, 2185, 2185, - /* 2820 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 2830 */ 2185, 2675, 2709, 844, 2185, 2748, 2185, 2185, 2185, 396, - /* 2840 */ 2711, 848, 2713, 2714, 843, 2185, 863, 2185, 2185, 2185, - /* 2850 */ 2185, 2710, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 2860 */ 2185, 2185, 2709, 2185, 845, 2748, 2185, 2185, 2185, 412, - /* 2870 */ 2711, 848, 2713, 2714, 843, 2185, 863, 2185, 2185, 2709, - /* 2880 */ 2185, 2185, 2748, 2185, 2185, 2710, 413, 2711, 848, 2713, - /* 2890 */ 2714, 843, 2728, 863, 2185, 2185, 2185, 2185, 845, 2185, - /* 2900 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2675, 2185, - /* 2910 */ 844, 2185, 2185, 2185, 2710, 2185, 2185, 2185, 2185, 2185, - /* 2920 */ 2185, 2185, 2185, 2185, 2185, 2185, 2728, 845, 2185, 2185, - /* 2930 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 2940 */ 2185, 2185, 2675, 2185, 844, 2185, 2185, 2185, 2185, 2185, - /* 2950 */ 2185, 2185, 2185, 2185, 2185, 2728, 2709, 2185, 2185, 2748, - /* 2960 */ 2185, 2185, 2185, 2722, 2711, 848, 2713, 2714, 843, 2185, - /* 2970 */ 863, 2675, 2185, 844, 2185, 2710, 2185, 2185, 2185, 2185, - /* 2980 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 845, 2185, - /* 2990 */ 2709, 2185, 2185, 2748, 2185, 2185, 2185, 2721, 2711, 848, - /* 3000 */ 2713, 2714, 843, 2185, 863, 2185, 2185, 2185, 2710, 2185, - /* 3010 */ 2185, 2185, 2185, 2185, 2185, 2185, 2728, 2185, 2185, 2709, - /* 3020 */ 2185, 845, 2748, 2185, 2185, 2185, 2720, 2711, 848, 2713, - /* 3030 */ 2714, 843, 2675, 863, 844, 2185, 2185, 2185, 2185, 2185, - /* 3040 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2728, - /* 3050 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 3060 */ 2185, 2185, 2185, 2185, 2185, 2675, 2185, 844, 2185, 2185, - /* 3070 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 3080 */ 2709, 2185, 2185, 2748, 2185, 2710, 2185, 432, 2711, 848, - /* 3090 */ 2713, 2714, 843, 2185, 863, 2185, 2185, 2185, 845, 2185, - /* 3100 */ 2185, 2185, 2710, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 3110 */ 2185, 2185, 2185, 2709, 2185, 845, 2748, 2185, 2185, 2185, - /* 3120 */ 433, 2711, 848, 2713, 2714, 843, 2728, 863, 2710, 2185, - /* 3130 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 3140 */ 2185, 845, 2675, 2728, 844, 2185, 2185, 2185, 2185, 2185, - /* 3150 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2675, - /* 3160 */ 2185, 844, 2185, 2185, 2185, 2710, 2185, 2185, 2185, 2728, - /* 3170 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 845, 2185, - /* 3180 */ 2185, 2185, 2185, 2185, 2185, 2675, 2185, 844, 2185, 2185, - /* 3190 */ 2709, 2185, 2185, 2748, 2185, 2185, 2185, 429, 2711, 848, - /* 3200 */ 2713, 2714, 843, 2185, 863, 2185, 2728, 2709, 2185, 2185, - /* 3210 */ 2748, 2185, 2185, 2185, 434, 2711, 848, 2713, 2714, 843, - /* 3220 */ 2185, 863, 2675, 2185, 844, 2185, 2185, 2185, 2185, 2185, - /* 3230 */ 2185, 2185, 2185, 846, 2185, 2185, 2748, 2185, 2185, 2185, - /* 3240 */ 402, 2711, 848, 2713, 2714, 843, 2185, 863, 2185, 2185, - /* 3250 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 3260 */ 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, 2185, - /* 3270 */ 2709, 2185, 2185, 2748, 2185, 2185, 2185, 401, 2711, 848, - /* 3280 */ 2713, 2714, 843, 2185, 863, + /* 0 */ 644, 2409, 652, 645, 2246, 645, 2246, 494, 37, 338, + /* 10 */ 2458, 2460, 47, 45, 2111, 2394, 2685, 862, 2405, 490, + /* 20 */ 474, 2199, 1932, 40, 39, 2645, 861, 46, 44, 43, + /* 30 */ 42, 41, 2632, 795, 862, 2405, 1930, 146, 2020, 2290, + /* 40 */ 1957, 2917, 136, 2727, 690, 135, 134, 133, 132, 131, + /* 50 */ 130, 129, 128, 127, 221, 807, 155, 9, 810, 794, + /* 60 */ 217, 807, 155, 741, 2918, 796, 40, 39, 2015, 2465, + /* 70 */ 46, 44, 43, 42, 41, 19, 2922, 439, 1961, 761, + /* 80 */ 479, 182, 1938, 111, 2917, 861, 2745, 2917, 2463, 2339, + /* 90 */ 136, 866, 2560, 135, 134, 133, 132, 131, 130, 129, + /* 100 */ 128, 127, 2692, 2921, 847, 2923, 217, 2918, 2920, 2398, + /* 110 */ 2918, 796, 968, 2558, 852, 15, 939, 938, 937, 936, + /* 120 */ 502, 50, 935, 934, 160, 929, 928, 927, 926, 925, + /* 130 */ 924, 923, 159, 917, 916, 915, 501, 500, 912, 911, + /* 140 */ 910, 196, 195, 909, 497, 908, 907, 906, 2389, 420, + /* 150 */ 2726, 2022, 2023, 2765, 661, 2485, 2136, 119, 2728, 851, + /* 160 */ 2730, 2731, 846, 190, 866, 315, 795, 2086, 197, 199, + /* 170 */ 2137, 2819, 98, 2396, 2917, 470, 2815, 192, 2827, 806, + /* 180 */ 50, 147, 805, 125, 2827, 2828, 210, 153, 2832, 2917, + /* 190 */ 1993, 2003, 794, 217, 441, 218, 2533, 2918, 796, 2401, + /* 200 */ 2021, 2024, 2452, 2866, 807, 155, 98, 794, 217, 66, + /* 210 */ 1778, 1779, 2918, 796, 2198, 1933, 2135, 1931, 662, 2553, + /* 220 */ 1957, 2834, 2186, 444, 40, 39, 556, 2529, 46, 44, + /* 230 */ 43, 42, 41, 2400, 2727, 861, 547, 479, 145, 144, + /* 240 */ 143, 142, 141, 140, 139, 138, 137, 2831, 866, 848, + /* 250 */ 213, 1936, 1937, 1990, 2086, 1992, 1995, 1996, 1997, 1998, + /* 260 */ 1999, 2000, 2001, 2002, 843, 864, 863, 2014, 2016, 2017, + /* 270 */ 2018, 2019, 2, 47, 45, 207, 649, 2745, 417, 232, + /* 280 */ 1955, 474, 646, 1932, 540, 609, 607, 591, 413, 539, + /* 290 */ 443, 433, 230, 2692, 1513, 847, 1512, 1930, 611, 2020, + /* 300 */ 2839, 2083, 2084, 2085, 2839, 2839, 2839, 2839, 2839, 586, + /* 310 */ 151, 1962, 2196, 1958, 570, 183, 613, 2210, 2144, 197, + /* 320 */ 62, 418, 572, 62, 585, 809, 185, 2827, 2828, 2015, + /* 330 */ 153, 2832, 1514, 550, 485, 1957, 19, 2465, 761, 2049, + /* 340 */ 2185, 2726, 117, 1938, 2765, 467, 2917, 2534, 119, 2728, + /* 350 */ 851, 2730, 2731, 846, 744, 866, 2463, 1958, 157, 158, + /* 360 */ 166, 2790, 2819, 322, 2923, 217, 470, 2815, 2397, 2918, + /* 370 */ 796, 289, 1960, 968, 442, 288, 15, 777, 776, 2142, + /* 380 */ 2143, 2145, 2146, 2147, 745, 558, 2380, 2839, 2083, 2084, + /* 390 */ 2085, 2839, 2839, 2839, 2839, 2839, 2088, 2089, 2090, 2091, + /* 400 */ 2092, 505, 660, 40, 39, 2050, 504, 46, 44, 43, + /* 410 */ 42, 41, 2022, 2023, 2502, 1932, 2540, 2519, 2086, 599, + /* 420 */ 598, 597, 596, 595, 590, 589, 588, 587, 425, 1930, + /* 430 */ 62, 577, 576, 575, 574, 573, 567, 566, 565, 663, + /* 440 */ 560, 559, 440, 785, 1704, 1705, 551, 1766, 1767, 101, + /* 450 */ 51, 1993, 2003, 1785, 428, 761, 760, 456, 33, 733, + /* 460 */ 905, 2021, 2024, 2917, 40, 39, 654, 2599, 46, 44, + /* 470 */ 43, 42, 41, 838, 667, 1938, 1933, 2922, 1931, 448, + /* 480 */ 447, 2923, 217, 780, 837, 2917, 2918, 796, 1805, 1806, + /* 490 */ 862, 2405, 36, 472, 2044, 2045, 2046, 2047, 2048, 2052, + /* 500 */ 2053, 2054, 2055, 322, 2921, 968, 322, 2921, 2918, 2919, + /* 510 */ 55, 2155, 1936, 1937, 1990, 1901, 1992, 1995, 1996, 1997, + /* 520 */ 1998, 1999, 2000, 2001, 2002, 843, 864, 863, 2014, 2016, + /* 530 */ 2017, 2018, 2019, 2, 12, 47, 45, 1804, 1807, 1604, + /* 540 */ 2727, 122, 2108, 474, 320, 1932, 180, 484, 483, 1665, + /* 550 */ 492, 2407, 2083, 2084, 2085, 810, 2408, 446, 445, 1930, + /* 560 */ 692, 2020, 2465, 1656, 895, 894, 893, 1660, 892, 1662, + /* 570 */ 1663, 891, 888, 2727, 1671, 885, 1673, 1674, 882, 879, + /* 580 */ 876, 814, 694, 2745, 584, 1606, 693, 488, 848, 583, + /* 590 */ 2256, 2015, 786, 781, 774, 770, 60, 582, 19, 2692, + /* 600 */ 2381, 847, 458, 2607, 12, 1938, 10, 758, 1933, 922, + /* 610 */ 1931, 2379, 2365, 322, 40, 39, 2745, 379, 46, 44, + /* 620 */ 43, 42, 41, 40, 39, 745, 2922, 46, 44, 43, + /* 630 */ 42, 41, 2692, 322, 847, 968, 62, 116, 15, 29, + /* 640 */ 2686, 1961, 1957, 1960, 1936, 1937, 113, 2726, 2560, 831, + /* 650 */ 2765, 2791, 718, 2702, 119, 2728, 851, 2730, 2731, 846, + /* 660 */ 603, 866, 2221, 469, 905, 2115, 199, 732, 2819, 2557, + /* 670 */ 852, 1957, 470, 2815, 2022, 2023, 1990, 731, 252, 2608, + /* 680 */ 2726, 2706, 647, 2765, 2254, 742, 287, 119, 2728, 851, + /* 690 */ 2730, 2731, 846, 725, 866, 729, 727, 286, 285, 2937, + /* 700 */ 2867, 2819, 721, 12, 479, 470, 2815, 747, 2599, 715, + /* 710 */ 713, 2727, 519, 1993, 2003, 866, 284, 524, 499, 498, + /* 720 */ 180, 2692, 2156, 2021, 2024, 2834, 848, 241, 2874, 492, + /* 730 */ 2407, 2127, 2708, 2710, 471, 538, 223, 537, 1933, 2179, + /* 740 */ 1931, 379, 1939, 866, 903, 172, 171, 900, 899, 898, + /* 750 */ 169, 2830, 602, 240, 2745, 903, 172, 171, 900, 899, + /* 760 */ 898, 169, 72, 2459, 2460, 71, 600, 254, 1900, 536, + /* 770 */ 2692, 647, 847, 2254, 1936, 1937, 1990, 2702, 1992, 1995, + /* 780 */ 1996, 1997, 1998, 1999, 2000, 2001, 2002, 843, 864, 863, + /* 790 */ 2014, 2016, 2017, 2018, 2019, 2, 47, 45, 2025, 2727, + /* 800 */ 487, 486, 457, 2607, 474, 2706, 1932, 46, 44, 43, + /* 810 */ 42, 41, 1994, 208, 848, 320, 2887, 2646, 2726, 322, + /* 820 */ 1930, 2765, 2020, 784, 798, 119, 2728, 851, 2730, 2731, + /* 830 */ 846, 1961, 866, 2727, 664, 1516, 1517, 2937, 2107, 2819, + /* 840 */ 2560, 1994, 2745, 470, 2815, 862, 2405, 872, 848, 1938, + /* 850 */ 772, 2745, 2015, 2220, 528, 476, 2708, 2711, 2692, 236, + /* 860 */ 847, 2557, 852, 499, 498, 146, 1938, 866, 833, 641, + /* 870 */ 2791, 761, 695, 1946, 1962, 1991, 2745, 896, 639, 2917, + /* 880 */ 2219, 635, 631, 530, 526, 2392, 2051, 1939, 2465, 2020, + /* 890 */ 862, 2405, 2692, 2547, 847, 665, 968, 2923, 217, 48, + /* 900 */ 562, 2529, 2918, 796, 1991, 92, 2726, 822, 91, 2765, + /* 910 */ 544, 1486, 2692, 119, 2728, 851, 2730, 2731, 846, 2015, + /* 920 */ 866, 862, 2405, 1942, 783, 2937, 738, 2819, 593, 2529, + /* 930 */ 1493, 470, 2815, 1938, 156, 2022, 2023, 2790, 746, 2692, + /* 940 */ 2726, 545, 1493, 2765, 862, 2405, 2218, 119, 2728, 851, + /* 950 */ 2730, 2731, 846, 234, 866, 1488, 1491, 1492, 2217, 2937, + /* 960 */ 2834, 2819, 2216, 835, 564, 470, 2815, 1961, 1491, 1492, + /* 970 */ 862, 2405, 2727, 34, 1993, 2003, 90, 290, 862, 2405, + /* 980 */ 761, 239, 2277, 2056, 2021, 2024, 2829, 848, 2917, 2910, + /* 990 */ 578, 372, 761, 862, 2405, 871, 870, 869, 579, 1933, + /* 1000 */ 2917, 1931, 2030, 212, 712, 2692, 2923, 217, 1957, 862, + /* 1010 */ 2405, 2918, 796, 580, 1495, 2745, 919, 2692, 2923, 217, + /* 1020 */ 1956, 2692, 378, 2918, 796, 807, 155, 329, 330, 666, + /* 1030 */ 2613, 2692, 328, 847, 694, 1936, 1937, 1990, 693, 1992, + /* 1040 */ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 843, 864, + /* 1050 */ 863, 2014, 2016, 2017, 2018, 2019, 2, 47, 45, 686, + /* 1060 */ 685, 477, 1859, 1860, 1962, 474, 1947, 1932, 1942, 179, + /* 1070 */ 903, 172, 171, 900, 899, 898, 169, 862, 2405, 2726, + /* 1080 */ 2410, 1930, 2765, 2020, 2293, 921, 119, 2728, 851, 2730, + /* 1090 */ 2731, 846, 291, 866, 297, 2727, 2215, 2402, 2937, 385, + /* 1100 */ 2819, 3, 1950, 1952, 470, 2815, 862, 2405, 688, 687, + /* 1110 */ 848, 2409, 2851, 2015, 1665, 53, 864, 863, 2014, 2016, + /* 1120 */ 2017, 2018, 2019, 170, 2214, 102, 292, 1938, 1656, 895, + /* 1130 */ 894, 893, 1660, 892, 1662, 1663, 842, 841, 2745, 1671, + /* 1140 */ 840, 1673, 1674, 839, 879, 876, 789, 186, 2827, 2828, + /* 1150 */ 386, 153, 2832, 2442, 2692, 2692, 847, 968, 2727, 1833, + /* 1160 */ 48, 711, 710, 709, 862, 2405, 862, 2405, 701, 152, + /* 1170 */ 705, 707, 706, 848, 704, 862, 2405, 1957, 1994, 703, + /* 1180 */ 708, 451, 450, 2692, 300, 702, 813, 862, 2405, 449, + /* 1190 */ 698, 697, 696, 2226, 961, 333, 2022, 2023, 862, 2405, + /* 1200 */ 1962, 2745, 2726, 933, 931, 2765, 54, 827, 2213, 119, + /* 1210 */ 2728, 851, 2730, 2731, 846, 2097, 866, 2692, 340, 847, + /* 1220 */ 735, 2937, 734, 2819, 2212, 40, 39, 470, 2815, 46, + /* 1230 */ 44, 43, 42, 41, 2465, 1993, 2003, 862, 2405, 862, + /* 1240 */ 2405, 1991, 478, 862, 2405, 2021, 2024, 2465, 14, 13, + /* 1250 */ 495, 862, 2405, 2463, 1513, 493, 1512, 859, 179, 860, + /* 1260 */ 1933, 2209, 1931, 368, 2208, 2726, 2463, 2692, 2765, 2410, + /* 1270 */ 2636, 496, 119, 2728, 851, 2730, 2731, 846, 211, 866, + /* 1280 */ 1616, 1620, 2207, 2692, 2794, 148, 2819, 43, 42, 41, + /* 1290 */ 470, 2815, 1514, 78, 1615, 1619, 1936, 1937, 1990, 88, + /* 1300 */ 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 843, + /* 1310 */ 864, 863, 2014, 2016, 2017, 2018, 2019, 2, 47, 45, + /* 1320 */ 2692, 179, 2727, 2692, 512, 181, 474, 2206, 1932, 2465, + /* 1330 */ 392, 897, 2411, 2205, 2456, 2204, 2203, 848, 2340, 811, + /* 1340 */ 2202, 2692, 1930, 2201, 2020, 35, 2467, 89, 2464, 390, + /* 1350 */ 76, 40, 39, 75, 2727, 46, 44, 43, 42, 41, + /* 1360 */ 2512, 1599, 799, 2063, 419, 2745, 699, 802, 162, 848, + /* 1370 */ 614, 616, 901, 2382, 2015, 2456, 250, 626, 624, 621, + /* 1380 */ 619, 2692, 902, 847, 277, 2456, 2692, 275, 1938, 1597, + /* 1390 */ 423, 422, 2692, 761, 2692, 2692, 170, 2745, 162, 2692, + /* 1400 */ 480, 2917, 2692, 836, 554, 279, 161, 1600, 278, 123, + /* 1410 */ 1991, 700, 768, 2692, 489, 847, 2020, 2211, 968, 2923, + /* 1420 */ 217, 15, 62, 281, 2918, 796, 280, 283, 2258, 2726, + /* 1430 */ 282, 2275, 2765, 2880, 1595, 301, 119, 2728, 851, 2730, + /* 1440 */ 2731, 846, 49, 866, 2266, 2264, 2015, 49, 2792, 1941, + /* 1450 */ 2819, 1849, 200, 714, 470, 2815, 2713, 2022, 2023, 327, + /* 1460 */ 63, 2726, 2188, 2189, 2765, 913, 716, 719, 119, 2728, + /* 1470 */ 851, 2730, 2731, 846, 743, 866, 14, 13, 1940, 812, + /* 1480 */ 832, 1857, 2819, 957, 103, 1577, 470, 2815, 1569, 347, + /* 1490 */ 346, 190, 971, 349, 348, 2131, 1993, 2003, 77, 914, + /* 1500 */ 612, 64, 49, 49, 316, 77, 2021, 2024, 778, 167, + /* 1510 */ 1550, 376, 308, 808, 86, 85, 543, 150, 2746, 229, + /* 1520 */ 2715, 1933, 1567, 1931, 74, 2141, 959, 206, 2332, 170, + /* 1530 */ 2140, 1578, 535, 533, 2331, 306, 955, 951, 947, 943, + /* 1540 */ 874, 371, 331, 351, 350, 416, 353, 352, 522, 168, + /* 1550 */ 170, 518, 514, 510, 507, 536, 1551, 1936, 1937, 1990, + /* 1560 */ 2538, 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, + /* 1570 */ 843, 864, 863, 2014, 2016, 2017, 2018, 2019, 2, 2041, + /* 1580 */ 149, 819, 355, 354, 2057, 2004, 1802, 118, 1792, 2247, + /* 1590 */ 344, 2727, 343, 1923, 2870, 1899, 40, 39, 357, 356, + /* 1600 */ 46, 44, 43, 42, 41, 322, 848, 384, 359, 358, + /* 1610 */ 361, 360, 1647, 363, 362, 365, 364, 367, 366, 775, + /* 1620 */ 167, 463, 823, 1678, 782, 459, 816, 482, 481, 1924, + /* 1630 */ 1944, 503, 1686, 1693, 2745, 521, 2539, 2253, 2453, 754, + /* 1640 */ 2871, 2881, 790, 864, 863, 2014, 2016, 2017, 2018, 2019, + /* 1650 */ 2692, 800, 847, 791, 318, 313, 2727, 321, 803, 1943, + /* 1660 */ 2366, 506, 5, 1691, 511, 437, 1955, 342, 1965, 829, + /* 1670 */ 532, 848, 325, 520, 224, 531, 225, 324, 227, 534, + /* 1680 */ 1826, 377, 1956, 548, 238, 2727, 555, 557, 561, 563, + /* 1690 */ 605, 568, 581, 594, 592, 2531, 294, 601, 2726, 2745, + /* 1700 */ 848, 2765, 604, 173, 617, 120, 2728, 851, 2730, 2731, + /* 1710 */ 846, 606, 866, 615, 244, 2692, 618, 847, 620, 2819, + /* 1720 */ 243, 622, 623, 2818, 2815, 247, 2727, 625, 2745, 1963, + /* 1730 */ 711, 710, 709, 627, 4, 642, 643, 701, 152, 705, + /* 1740 */ 650, 845, 651, 704, 2692, 255, 847, 653, 703, 708, + /* 1750 */ 451, 450, 94, 258, 702, 1958, 655, 1964, 449, 698, + /* 1760 */ 697, 696, 1966, 2726, 657, 2727, 2765, 656, 261, 2745, + /* 1770 */ 120, 2728, 851, 2730, 2731, 846, 263, 866, 659, 1967, + /* 1780 */ 848, 2554, 1968, 668, 2819, 2692, 95, 847, 834, 2815, + /* 1790 */ 2548, 96, 849, 97, 270, 2765, 2727, 124, 689, 120, + /* 1800 */ 2728, 851, 2730, 2731, 846, 722, 866, 691, 2745, 2395, + /* 1810 */ 274, 848, 411, 2819, 723, 2391, 276, 432, 2815, 175, + /* 1820 */ 121, 2393, 739, 2388, 2692, 176, 847, 177, 737, 100, + /* 1830 */ 1959, 293, 163, 2726, 2622, 380, 2765, 2600, 749, 2745, + /* 1840 */ 408, 2728, 851, 2730, 2731, 846, 844, 866, 830, 2784, + /* 1850 */ 750, 2619, 2618, 748, 756, 2692, 298, 847, 753, 779, + /* 1860 */ 765, 2886, 817, 2885, 788, 303, 8, 2858, 296, 305, + /* 1870 */ 307, 766, 2726, 309, 755, 2765, 764, 189, 2727, 184, + /* 1880 */ 2728, 851, 2730, 2731, 846, 763, 866, 793, 314, 310, + /* 1890 */ 312, 311, 464, 848, 804, 2838, 792, 801, 154, 2940, + /* 1900 */ 1960, 2835, 2105, 2726, 815, 317, 2765, 1, 2103, 2916, + /* 1910 */ 187, 2728, 851, 2730, 2731, 846, 203, 866, 2727, 381, + /* 1920 */ 323, 2745, 272, 164, 2568, 2567, 762, 2877, 2566, 468, + /* 1930 */ 219, 165, 382, 848, 820, 825, 821, 2692, 191, 847, + /* 1940 */ 336, 828, 61, 2727, 2800, 855, 853, 684, 680, 676, + /* 1950 */ 672, 2684, 271, 857, 858, 341, 383, 110, 848, 2406, + /* 1960 */ 2683, 2745, 2679, 2678, 2670, 2669, 2661, 2660, 2676, 797, + /* 1970 */ 2938, 112, 2675, 2667, 868, 2666, 387, 2692, 1465, 847, + /* 1980 */ 2655, 2654, 2673, 2672, 2664, 2726, 2745, 370, 2765, 963, + /* 1990 */ 964, 2663, 120, 2728, 851, 2730, 2731, 846, 99, 866, + /* 2000 */ 2652, 269, 2692, 965, 847, 2651, 2819, 2649, 2648, 2727, + /* 2010 */ 174, 2816, 2457, 373, 960, 421, 374, 967, 429, 52, + /* 2020 */ 424, 430, 399, 391, 848, 2726, 741, 461, 2765, 2644, + /* 2030 */ 410, 2727, 184, 2728, 851, 2730, 2731, 846, 400, 866, + /* 2040 */ 2643, 412, 389, 2642, 83, 2637, 848, 508, 509, 1883, + /* 2050 */ 2726, 2727, 2745, 2765, 1884, 222, 513, 409, 2728, 851, + /* 2060 */ 2730, 2731, 846, 2635, 866, 517, 848, 515, 2692, 257, + /* 2070 */ 847, 516, 1882, 2634, 2745, 438, 2631, 523, 268, 2633, + /* 2080 */ 2878, 2630, 259, 266, 525, 2629, 527, 2628, 264, 658, + /* 2090 */ 2692, 529, 847, 462, 2745, 1870, 2604, 226, 2603, 228, + /* 2100 */ 2581, 84, 1829, 1828, 2580, 2579, 541, 256, 542, 2578, + /* 2110 */ 2692, 2577, 847, 546, 2727, 2521, 2726, 1765, 2518, 2765, + /* 2120 */ 549, 2517, 2511, 409, 2728, 851, 2730, 2731, 846, 845, + /* 2130 */ 866, 552, 553, 2508, 231, 2507, 2727, 87, 2726, 2506, + /* 2140 */ 2505, 2765, 2510, 233, 2509, 402, 2728, 851, 2730, 2731, + /* 2150 */ 846, 848, 866, 2504, 2503, 2501, 2727, 2745, 2726, 2500, + /* 2160 */ 2499, 2765, 235, 569, 2498, 187, 2728, 851, 2730, 2731, + /* 2170 */ 846, 848, 866, 2692, 571, 847, 2496, 2495, 2494, 2745, + /* 2180 */ 237, 2478, 2477, 2727, 2493, 2492, 2516, 2491, 2490, 2489, + /* 2190 */ 2514, 2497, 2488, 2487, 2486, 2692, 787, 847, 848, 2745, + /* 2200 */ 2484, 2483, 2482, 2481, 2480, 2479, 2476, 2475, 93, 2474, + /* 2210 */ 2546, 2515, 2513, 2473, 2472, 2692, 2471, 847, 1771, 2470, + /* 2220 */ 473, 2726, 242, 608, 2765, 2939, 2745, 2469, 408, 2728, + /* 2230 */ 851, 2730, 2731, 846, 2468, 866, 2466, 2785, 2297, 1617, + /* 2240 */ 475, 610, 2692, 2726, 847, 1621, 2765, 426, 2296, 2295, + /* 2250 */ 409, 2728, 851, 2730, 2731, 846, 1613, 866, 2294, 2292, + /* 2260 */ 427, 2289, 628, 2726, 2727, 2288, 2765, 245, 632, 630, + /* 2270 */ 409, 2728, 851, 2730, 2731, 846, 629, 866, 2281, 848, + /* 2280 */ 636, 634, 633, 246, 637, 638, 248, 2268, 2727, 640, + /* 2290 */ 736, 80, 249, 2765, 2242, 198, 2712, 404, 2728, 851, + /* 2300 */ 2730, 2731, 846, 848, 866, 209, 1494, 2745, 648, 2727, + /* 2310 */ 251, 2241, 253, 81, 2602, 2598, 2588, 2576, 260, 262, + /* 2320 */ 2575, 265, 2552, 2692, 848, 847, 267, 2545, 2383, 2727, + /* 2330 */ 670, 2745, 1543, 2291, 2287, 669, 2285, 671, 673, 674, + /* 2340 */ 675, 2283, 677, 678, 848, 679, 2280, 2692, 681, 847, + /* 2350 */ 2263, 2727, 2745, 683, 682, 2261, 2262, 2260, 2238, 2385, + /* 2360 */ 1698, 273, 73, 2384, 1697, 1603, 848, 1602, 2692, 1585, + /* 2370 */ 847, 2726, 2745, 1601, 2765, 1598, 1596, 930, 394, 2728, + /* 2380 */ 851, 2730, 2731, 846, 1594, 866, 2278, 1593, 2692, 1592, + /* 2390 */ 847, 452, 2276, 2267, 2745, 2726, 1591, 1590, 2765, 932, + /* 2400 */ 1587, 1586, 393, 2728, 851, 2730, 2731, 846, 1584, 866, + /* 2410 */ 2692, 453, 847, 454, 2727, 2265, 2726, 455, 717, 2765, + /* 2420 */ 720, 2237, 2236, 395, 2728, 851, 2730, 2731, 846, 848, + /* 2430 */ 866, 2235, 2234, 724, 2727, 726, 2726, 2233, 728, 2765, + /* 2440 */ 2232, 730, 1864, 401, 2728, 851, 2730, 2731, 846, 848, + /* 2450 */ 866, 1868, 1866, 126, 1863, 2601, 2727, 2745, 2726, 1854, + /* 2460 */ 28, 2765, 740, 56, 67, 405, 2728, 851, 2730, 2731, + /* 2470 */ 846, 848, 866, 2692, 1839, 847, 295, 2745, 2597, 1835, + /* 2480 */ 57, 1837, 2587, 751, 178, 2574, 2573, 752, 299, 1814, + /* 2490 */ 2922, 20, 30, 2692, 2158, 847, 1813, 302, 767, 2745, + /* 2500 */ 757, 17, 460, 2132, 6, 759, 7, 21, 22, 769, + /* 2510 */ 202, 771, 773, 32, 214, 2692, 304, 847, 2713, 2139, + /* 2520 */ 188, 2726, 201, 31, 2765, 2126, 82, 2098, 396, 2728, + /* 2530 */ 851, 2730, 2731, 846, 215, 866, 23, 65, 216, 2727, + /* 2540 */ 2096, 2726, 2100, 2178, 2765, 2179, 24, 2173, 406, 2728, + /* 2550 */ 851, 2730, 2731, 846, 848, 866, 2172, 465, 18, 2177, + /* 2560 */ 2176, 2727, 466, 2726, 2080, 2079, 2765, 319, 58, 59, + /* 2570 */ 397, 2728, 851, 2730, 2731, 846, 848, 866, 2727, 193, + /* 2580 */ 2572, 2551, 2745, 104, 105, 326, 2134, 204, 332, 2550, + /* 2590 */ 106, 2544, 107, 848, 69, 25, 2032, 824, 2692, 818, + /* 2600 */ 847, 13, 2727, 335, 2745, 2031, 11, 826, 337, 334, + /* 2610 */ 1948, 2007, 2006, 881, 884, 887, 194, 848, 2042, 890, + /* 2620 */ 2692, 2745, 847, 38, 205, 2005, 1975, 16, 1983, 26, + /* 2630 */ 850, 2543, 27, 856, 70, 345, 108, 2692, 854, 847, + /* 2640 */ 339, 2194, 109, 2193, 2770, 2745, 2726, 2769, 865, 2765, + /* 2650 */ 2192, 873, 68, 407, 2728, 851, 2730, 2731, 846, 113, + /* 2660 */ 866, 2692, 2191, 847, 867, 2009, 1679, 875, 2726, 491, + /* 2670 */ 1676, 2765, 2727, 877, 878, 398, 2728, 851, 2730, 2731, + /* 2680 */ 846, 880, 866, 1675, 1672, 2726, 883, 848, 2765, 2727, + /* 2690 */ 1666, 886, 414, 2728, 851, 2730, 2731, 846, 1664, 866, + /* 2700 */ 889, 114, 1670, 369, 848, 1669, 1668, 1667, 115, 2726, + /* 2710 */ 1692, 2727, 2765, 79, 1688, 2745, 415, 2728, 851, 2730, + /* 2720 */ 2731, 846, 1541, 866, 904, 1581, 848, 1580, 220, 1579, + /* 2730 */ 1576, 2692, 2745, 847, 1573, 1572, 1571, 1570, 1568, 1611, + /* 2740 */ 1566, 1565, 1564, 918, 1610, 920, 1562, 1561, 2692, 1560, + /* 2750 */ 847, 1559, 2727, 1558, 2745, 1557, 1556, 1607, 1605, 1553, + /* 2760 */ 1552, 1549, 1548, 1547, 1546, 2286, 940, 848, 941, 2284, + /* 2770 */ 2692, 942, 847, 944, 2282, 945, 946, 2727, 948, 2726, + /* 2780 */ 950, 2279, 2765, 952, 954, 949, 2739, 2728, 851, 2730, + /* 2790 */ 2731, 846, 848, 866, 2727, 2745, 2726, 953, 2259, 2765, + /* 2800 */ 956, 2257, 958, 2738, 2728, 851, 2730, 2731, 846, 848, + /* 2810 */ 866, 2692, 1483, 847, 2231, 1466, 962, 375, 2726, 1934, + /* 2820 */ 2745, 2765, 1471, 1473, 966, 2737, 2728, 851, 2730, 2731, + /* 2830 */ 846, 388, 866, 969, 2197, 970, 2692, 2745, 847, 2197, + /* 2840 */ 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, + /* 2850 */ 2197, 2197, 2197, 2692, 2197, 847, 2197, 2727, 2197, 2726, + /* 2860 */ 2197, 2197, 2765, 2197, 2197, 2197, 434, 2728, 851, 2730, + /* 2870 */ 2731, 846, 848, 866, 2197, 2197, 2197, 2197, 2197, 2197, + /* 2880 */ 2197, 2197, 2197, 2197, 2726, 2197, 2197, 2765, 2197, 2197, + /* 2890 */ 2197, 435, 2728, 851, 2730, 2731, 846, 2197, 866, 2727, + /* 2900 */ 2745, 2726, 2197, 2197, 2765, 2197, 2197, 2197, 431, 2728, + /* 2910 */ 851, 2730, 2731, 846, 848, 866, 2692, 2197, 847, 2197, + /* 2920 */ 2197, 2197, 2197, 2727, 2197, 2197, 2197, 2197, 2197, 2197, + /* 2930 */ 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 848, 2197, + /* 2940 */ 2197, 2197, 2745, 2197, 2197, 2197, 2197, 2197, 2197, 2197, + /* 2950 */ 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2692, 2197, + /* 2960 */ 847, 2197, 2197, 2197, 2726, 2197, 2745, 2765, 2197, 2197, + /* 2970 */ 2197, 436, 2728, 851, 2730, 2731, 846, 2197, 866, 2197, + /* 2980 */ 2197, 2197, 2692, 2197, 847, 2197, 2197, 2197, 2197, 2197, + /* 2990 */ 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, + /* 3000 */ 2197, 2197, 2197, 2197, 2197, 2197, 849, 2197, 2197, 2765, + /* 3010 */ 2197, 2197, 2197, 404, 2728, 851, 2730, 2731, 846, 2197, + /* 3020 */ 866, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, 2197, + /* 3030 */ 2726, 2197, 2197, 2765, 2197, 2197, 2197, 403, 2728, 851, + /* 3040 */ 2730, 2731, 846, 2197, 866, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 518, 507, 508, 439, 520, 424, 522, 518, 526, 392, - /* 10 */ 393, 421, 12, 13, 14, 526, 392, 393, 424, 429, - /* 20 */ 20, 427, 22, 0, 460, 461, 544, 545, 392, 380, - /* 30 */ 440, 549, 550, 402, 545, 35, 412, 37, 549, 550, - /* 40 */ 421, 410, 393, 419, 392, 393, 33, 24, 25, 26, - /* 50 */ 27, 28, 29, 30, 31, 32, 8, 9, 43, 46, - /* 60 */ 12, 13, 14, 15, 16, 4, 447, 67, 449, 488, - /* 70 */ 421, 8, 9, 393, 74, 12, 13, 14, 15, 16, - /* 80 */ 499, 81, 488, 421, 23, 439, 437, 451, 439, 453, - /* 90 */ 379, 429, 381, 499, 12, 13, 392, 393, 392, 393, - /* 100 */ 454, 421, 440, 421, 22, 4, 460, 461, 47, 48, - /* 110 */ 49, 111, 430, 431, 114, 380, 380, 35, 412, 37, - /* 120 */ 8, 9, 421, 464, 12, 13, 14, 15, 16, 393, - /* 130 */ 513, 514, 515, 516, 485, 518, 519, 488, 20, 392, - /* 140 */ 393, 492, 493, 494, 495, 496, 497, 20, 499, 67, - /* 150 */ 150, 151, 388, 504, 22, 506, 392, 421, 394, 510, - /* 160 */ 511, 392, 393, 81, 482, 483, 514, 515, 516, 37, - /* 170 */ 518, 519, 437, 437, 494, 439, 20, 518, 526, 530, - /* 180 */ 518, 43, 167, 482, 483, 526, 74, 538, 526, 189, - /* 190 */ 190, 387, 445, 111, 390, 391, 544, 545, 20, 199, - /* 200 */ 200, 549, 550, 544, 545, 67, 544, 545, 549, 550, - /* 210 */ 392, 549, 550, 81, 214, 114, 216, 518, 514, 515, - /* 220 */ 516, 485, 518, 519, 488, 526, 401, 194, 492, 493, - /* 230 */ 494, 495, 496, 497, 122, 499, 226, 422, 502, 191, - /* 240 */ 504, 505, 506, 418, 545, 114, 510, 511, 549, 550, - /* 250 */ 250, 251, 252, 428, 254, 255, 256, 257, 258, 259, + /* 0 */ 390, 425, 390, 393, 394, 393, 394, 438, 510, 511, + /* 10 */ 441, 442, 12, 13, 14, 425, 427, 395, 396, 430, + /* 20 */ 20, 0, 22, 8, 9, 467, 20, 12, 13, 14, + /* 30 */ 15, 16, 0, 521, 395, 396, 36, 415, 38, 0, + /* 40 */ 20, 529, 21, 381, 422, 24, 25, 26, 27, 28, + /* 50 */ 29, 30, 31, 32, 415, 395, 396, 44, 396, 547, + /* 60 */ 548, 395, 396, 487, 552, 553, 8, 9, 68, 424, + /* 70 */ 12, 13, 14, 15, 16, 75, 521, 432, 20, 521, + /* 80 */ 491, 405, 82, 402, 529, 20, 424, 529, 443, 413, + /* 90 */ 21, 502, 442, 24, 25, 26, 27, 28, 29, 30, + /* 100 */ 31, 32, 440, 548, 442, 547, 548, 552, 553, 428, + /* 110 */ 552, 553, 112, 463, 464, 115, 77, 78, 79, 80, + /* 120 */ 81, 115, 83, 84, 85, 86, 87, 88, 89, 90, + /* 130 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + /* 140 */ 101, 102, 103, 104, 105, 106, 107, 108, 425, 426, + /* 150 */ 488, 151, 152, 491, 395, 0, 22, 495, 496, 497, + /* 160 */ 498, 499, 500, 523, 502, 525, 521, 154, 424, 507, + /* 170 */ 36, 509, 404, 427, 529, 513, 514, 517, 518, 519, + /* 180 */ 115, 521, 522, 517, 518, 519, 423, 521, 522, 529, + /* 190 */ 190, 191, 547, 548, 450, 533, 452, 552, 553, 431, + /* 200 */ 200, 201, 439, 541, 395, 396, 404, 547, 548, 4, + /* 210 */ 190, 191, 552, 553, 0, 215, 82, 217, 459, 460, + /* 220 */ 20, 494, 207, 421, 8, 9, 395, 396, 12, 13, + /* 230 */ 14, 15, 16, 431, 381, 20, 395, 491, 24, 25, + /* 240 */ 26, 27, 28, 29, 30, 31, 32, 520, 502, 396, + /* 250 */ 192, 251, 252, 253, 154, 255, 256, 257, 258, 259, /* 260 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - /* 270 */ 270, 271, 12, 13, 456, 457, 20, 18, 22, 20, - /* 280 */ 20, 20, 22, 514, 515, 516, 27, 518, 519, 30, - /* 290 */ 12, 13, 114, 37, 35, 35, 214, 37, 216, 484, - /* 300 */ 188, 286, 287, 288, 289, 290, 291, 292, 293, 294, - /* 310 */ 14, 2, 53, 57, 55, 37, 20, 8, 9, 60, - /* 320 */ 61, 12, 13, 14, 15, 16, 387, 67, 73, 390, - /* 330 */ 391, 72, 250, 251, 74, 0, 303, 304, 305, 306, - /* 340 */ 272, 81, 274, 20, 392, 421, 264, 265, 266, 267, - /* 350 */ 268, 269, 270, 67, 430, 431, 21, 20, 167, 24, - /* 360 */ 25, 26, 27, 28, 29, 30, 31, 32, 114, 145, - /* 370 */ 252, 111, 113, 149, 114, 143, 144, 145, 146, 147, - /* 380 */ 148, 149, 401, 124, 374, 375, 376, 275, 276, 277, - /* 390 */ 278, 279, 280, 281, 282, 283, 284, 285, 297, 113, - /* 400 */ 8, 9, 116, 20, 12, 13, 14, 15, 16, 428, - /* 410 */ 150, 151, 20, 154, 155, 124, 157, 158, 159, 160, - /* 420 */ 161, 162, 163, 164, 165, 166, 474, 475, 297, 170, - /* 430 */ 171, 172, 173, 174, 175, 176, 177, 114, 179, 180, - /* 440 */ 181, 167, 422, 423, 185, 186, 187, 223, 18, 189, - /* 450 */ 190, 192, 228, 23, 20, 231, 114, 233, 21, 199, - /* 460 */ 200, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 470 */ 184, 41, 42, 21, 214, 45, 216, 286, 287, 288, - /* 480 */ 289, 290, 291, 292, 293, 294, 56, 503, 36, 505, - /* 490 */ 38, 39, 40, 41, 216, 380, 20, 420, 68, 69, - /* 500 */ 70, 71, 72, 290, 291, 292, 293, 294, 393, 421, - /* 510 */ 250, 251, 252, 436, 254, 255, 256, 257, 258, 259, - /* 520 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - /* 530 */ 270, 271, 272, 12, 13, 20, 421, 449, 22, 380, - /* 540 */ 20, 20, 392, 22, 114, 12, 13, 14, 15, 16, - /* 550 */ 111, 297, 437, 37, 439, 213, 35, 215, 37, 72, - /* 560 */ 0, 287, 288, 289, 125, 126, 127, 128, 129, 130, - /* 570 */ 131, 132, 133, 134, 380, 136, 137, 138, 139, 140, - /* 580 */ 141, 142, 152, 191, 439, 413, 250, 393, 67, 247, - /* 590 */ 422, 441, 442, 421, 444, 74, 437, 81, 448, 454, - /* 600 */ 485, 433, 81, 488, 432, 460, 461, 492, 493, 494, - /* 610 */ 495, 496, 497, 20, 499, 421, 40, 41, 143, 504, - /* 620 */ 297, 506, 147, 189, 190, 510, 511, 111, 392, 393, - /* 630 */ 421, 437, 111, 439, 114, 114, 206, 207, 208, 297, - /* 640 */ 431, 211, 424, 491, 252, 309, 310, 311, 312, 313, - /* 650 */ 314, 315, 73, 538, 224, 225, 8, 9, 392, 393, - /* 660 */ 12, 13, 14, 15, 16, 150, 151, 237, 272, 517, - /* 670 */ 240, 150, 151, 243, 244, 245, 246, 247, 412, 485, - /* 680 */ 435, 445, 488, 438, 439, 419, 492, 493, 494, 495, - /* 690 */ 496, 497, 3, 499, 118, 119, 209, 121, 504, 20, - /* 700 */ 506, 22, 392, 393, 510, 511, 488, 399, 0, 20, - /* 710 */ 189, 190, 14, 23, 199, 200, 20, 499, 20, 143, - /* 720 */ 199, 200, 412, 147, 416, 238, 239, 297, 252, 169, - /* 730 */ 214, 111, 216, 425, 174, 214, 57, 216, 48, 49, - /* 740 */ 90, 409, 182, 150, 151, 125, 126, 127, 128, 129, - /* 750 */ 130, 131, 132, 133, 134, 380, 136, 137, 138, 139, - /* 760 */ 140, 141, 142, 115, 20, 51, 250, 251, 393, 437, - /* 770 */ 395, 250, 251, 252, 421, 254, 255, 256, 257, 258, - /* 780 */ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - /* 790 */ 269, 270, 271, 12, 13, 14, 421, 37, 380, 392, - /* 800 */ 393, 20, 33, 22, 115, 13, 156, 37, 14, 15, - /* 810 */ 16, 393, 437, 395, 439, 46, 35, 297, 37, 0, - /* 820 */ 488, 489, 8, 9, 81, 380, 12, 13, 14, 15, - /* 830 */ 16, 499, 182, 183, 4, 20, 483, 14, 393, 421, - /* 840 */ 395, 53, 503, 20, 505, 380, 196, 380, 67, 19, - /* 850 */ 62, 491, 445, 65, 66, 437, 0, 439, 392, 393, - /* 860 */ 485, 408, 81, 488, 411, 35, 421, 492, 493, 494, - /* 870 */ 495, 496, 497, 81, 499, 167, 168, 517, 412, 504, - /* 880 */ 191, 506, 437, 53, 439, 510, 511, 189, 392, 393, - /* 890 */ 60, 61, 111, 409, 388, 114, 124, 67, 392, 421, - /* 900 */ 394, 421, 437, 485, 437, 191, 488, 429, 412, 429, - /* 910 */ 492, 493, 494, 495, 496, 497, 202, 499, 440, 14, - /* 920 */ 440, 437, 504, 20, 506, 20, 413, 188, 510, 511, - /* 930 */ 485, 150, 151, 488, 421, 191, 464, 492, 493, 494, - /* 940 */ 495, 496, 497, 113, 499, 432, 116, 392, 252, 504, - /* 950 */ 252, 506, 20, 8, 9, 510, 511, 12, 13, 14, - /* 960 */ 15, 16, 143, 144, 145, 146, 147, 148, 149, 380, - /* 970 */ 189, 190, 488, 489, 490, 422, 216, 380, 33, 37, - /* 980 */ 199, 200, 393, 499, 395, 4, 216, 392, 393, 0, - /* 990 */ 518, 392, 393, 392, 393, 214, 252, 216, 526, 143, - /* 1000 */ 144, 145, 146, 147, 148, 149, 191, 412, 248, 249, - /* 1010 */ 421, 412, 189, 412, 275, 377, 544, 545, 248, 249, - /* 1020 */ 206, 549, 550, 81, 285, 417, 437, 34, 439, 474, - /* 1030 */ 475, 250, 251, 252, 437, 254, 255, 256, 257, 258, - /* 1040 */ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - /* 1050 */ 269, 270, 271, 12, 13, 380, 438, 439, 380, 37, - /* 1060 */ 115, 20, 73, 22, 58, 59, 502, 252, 393, 505, - /* 1070 */ 395, 3, 392, 393, 485, 252, 35, 488, 37, 0, - /* 1080 */ 144, 492, 493, 494, 495, 496, 497, 479, 499, 392, - /* 1090 */ 393, 380, 412, 504, 191, 506, 421, 1, 2, 510, - /* 1100 */ 511, 22, 464, 81, 393, 380, 395, 469, 67, 412, - /* 1110 */ 392, 393, 437, 22, 439, 437, 76, 77, 78, 392, - /* 1120 */ 393, 189, 81, 83, 84, 85, 144, 145, 37, 89, - /* 1130 */ 412, 149, 421, 491, 94, 95, 96, 97, 324, 412, - /* 1140 */ 100, 392, 393, 380, 104, 105, 106, 107, 437, 381, - /* 1150 */ 439, 13, 111, 392, 393, 114, 518, 380, 464, 517, - /* 1160 */ 485, 412, 437, 488, 526, 229, 230, 492, 493, 494, - /* 1170 */ 495, 496, 497, 412, 499, 392, 393, 392, 393, 504, - /* 1180 */ 380, 506, 544, 545, 252, 510, 511, 549, 550, 392, - /* 1190 */ 393, 150, 151, 392, 393, 412, 485, 412, 184, 488, - /* 1200 */ 437, 22, 111, 492, 493, 494, 495, 496, 497, 412, - /* 1210 */ 499, 115, 518, 412, 437, 504, 37, 506, 380, 81, - /* 1220 */ 526, 510, 511, 12, 13, 392, 393, 392, 393, 380, - /* 1230 */ 189, 190, 218, 22, 392, 393, 470, 437, 544, 545, - /* 1240 */ 199, 200, 393, 549, 550, 412, 35, 412, 37, 422, - /* 1250 */ 397, 398, 397, 398, 412, 214, 0, 216, 399, 380, - /* 1260 */ 421, 380, 380, 380, 406, 407, 421, 380, 380, 380, - /* 1270 */ 421, 380, 406, 407, 33, 437, 380, 464, 67, 440, - /* 1280 */ 299, 410, 469, 421, 425, 440, 437, 0, 439, 393, - /* 1290 */ 111, 250, 251, 252, 432, 254, 255, 256, 257, 258, - /* 1300 */ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - /* 1310 */ 269, 270, 271, 12, 13, 124, 437, 421, 437, 437, - /* 1320 */ 437, 20, 0, 22, 437, 437, 437, 434, 437, 33, - /* 1330 */ 437, 518, 421, 437, 485, 439, 35, 488, 37, 526, - /* 1340 */ 53, 492, 493, 494, 495, 496, 497, 414, 499, 464, - /* 1350 */ 417, 440, 0, 504, 0, 506, 115, 544, 545, 510, - /* 1360 */ 511, 434, 549, 550, 437, 43, 8, 9, 67, 178, - /* 1370 */ 12, 13, 14, 15, 16, 434, 22, 464, 437, 383, - /* 1380 */ 384, 485, 81, 117, 488, 33, 120, 319, 492, 493, - /* 1390 */ 494, 495, 496, 497, 117, 499, 117, 120, 117, 120, - /* 1400 */ 504, 120, 506, 518, 13, 33, 510, 511, 13, 33, - /* 1410 */ 2, 526, 111, 380, 0, 114, 8, 9, 0, 422, - /* 1420 */ 12, 13, 14, 15, 16, 214, 393, 216, 37, 544, - /* 1430 */ 545, 518, 37, 67, 549, 550, 22, 33, 33, 526, - /* 1440 */ 22, 232, 33, 234, 150, 151, 1, 2, 74, 33, - /* 1450 */ 50, 150, 151, 422, 421, 33, 33, 544, 545, 248, - /* 1460 */ 249, 250, 549, 550, 33, 33, 33, 33, 33, 422, - /* 1470 */ 437, 422, 439, 115, 37, 264, 265, 266, 267, 268, - /* 1480 */ 269, 270, 116, 12, 13, 12, 13, 115, 12, 13, - /* 1490 */ 189, 190, 33, 33, 33, 12, 13, 520, 242, 553, - /* 1500 */ 199, 200, 0, 12, 13, 12, 13, 12, 13, 12, - /* 1510 */ 13, 12, 13, 450, 114, 214, 542, 216, 485, 115, - /* 1520 */ 115, 488, 12, 13, 115, 492, 493, 494, 495, 496, - /* 1530 */ 497, 115, 499, 12, 13, 535, 33, 115, 115, 506, - /* 1540 */ 521, 33, 37, 510, 511, 33, 115, 115, 115, 115, - /* 1550 */ 115, 250, 251, 252, 396, 254, 255, 256, 257, 258, - /* 1560 */ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - /* 1570 */ 269, 270, 271, 33, 115, 115, 115, 33, 76, 77, - /* 1580 */ 78, 79, 80, 33, 82, 83, 84, 85, 86, 87, - /* 1590 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - /* 1600 */ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - /* 1610 */ 1, 421, 37, 13, 13, 0, 37, 321, 115, 409, - /* 1620 */ 114, 409, 380, 115, 250, 450, 391, 115, 19, 123, - /* 1630 */ 450, 541, 463, 541, 541, 393, 541, 37, 37, 396, - /* 1640 */ 486, 393, 450, 436, 35, 471, 450, 450, 525, 525, - /* 1650 */ 546, 380, 512, 216, 528, 115, 81, 411, 465, 115, - /* 1660 */ 81, 52, 53, 421, 393, 115, 53, 300, 487, 54, - /* 1670 */ 20, 62, 63, 64, 65, 392, 67, 20, 476, 437, - /* 1680 */ 231, 439, 481, 401, 476, 401, 212, 467, 20, 392, - /* 1690 */ 46, 393, 421, 446, 443, 393, 446, 188, 392, 323, - /* 1700 */ 393, 392, 443, 446, 443, 443, 112, 110, 437, 405, - /* 1710 */ 439, 392, 404, 392, 109, 403, 392, 392, 392, 20, - /* 1720 */ 385, 216, 113, 51, 385, 116, 389, 485, 476, 389, - /* 1730 */ 488, 401, 401, 20, 492, 493, 494, 495, 496, 497, - /* 1740 */ 0, 499, 439, 401, 20, 394, 20, 401, 506, 380, - /* 1750 */ 394, 466, 510, 511, 401, 20, 485, 148, 401, 488, - /* 1760 */ 401, 20, 393, 492, 493, 494, 495, 496, 497, 451, - /* 1770 */ 499, 457, 401, 380, 392, 385, 401, 506, 392, 383, - /* 1780 */ 383, 510, 511, 421, 421, 421, 393, 385, 235, 421, - /* 1790 */ 421, 421, 437, 480, 421, 114, 476, 437, 421, 421, - /* 1800 */ 421, 421, 193, 20, 195, 421, 437, 198, 439, 399, - /* 1810 */ 478, 475, 203, 220, 421, 219, 76, 77, 78, 472, - /* 1820 */ 437, 473, 392, 83, 84, 85, 439, 399, 308, 89, - /* 1830 */ 437, 222, 439, 534, 94, 95, 96, 97, 437, 307, - /* 1840 */ 100, 316, 380, 205, 104, 105, 106, 107, 537, 534, - /* 1850 */ 465, 318, 458, 536, 485, 393, 458, 488, 317, 380, - /* 1860 */ 533, 492, 493, 494, 495, 496, 497, 498, 499, 500, - /* 1870 */ 501, 301, 393, 296, 531, 534, 532, 465, 485, 295, - /* 1880 */ 325, 488, 554, 421, 523, 492, 493, 494, 495, 496, - /* 1890 */ 497, 322, 499, 548, 320, 20, 547, 393, 491, 437, - /* 1900 */ 421, 439, 124, 437, 298, 524, 399, 394, 35, 458, - /* 1910 */ 399, 458, 437, 197, 437, 437, 437, 529, 439, 527, - /* 1920 */ 455, 437, 399, 437, 114, 399, 53, 437, 509, 197, - /* 1930 */ 399, 451, 539, 540, 452, 62, 63, 64, 65, 380, - /* 1940 */ 67, 417, 399, 451, 393, 114, 22, 485, 426, 38, - /* 1950 */ 488, 437, 393, 437, 492, 493, 494, 495, 496, 497, - /* 1960 */ 399, 499, 382, 385, 485, 437, 437, 488, 392, 386, - /* 1970 */ 0, 492, 493, 494, 495, 496, 497, 477, 499, 437, - /* 1980 */ 421, 378, 437, 437, 437, 506, 113, 468, 0, 116, - /* 1990 */ 511, 437, 400, 437, 437, 437, 437, 437, 439, 437, - /* 2000 */ 437, 437, 437, 437, 437, 437, 415, 459, 437, 437, - /* 2010 */ 437, 423, 423, 551, 552, 0, 0, 415, 484, 415, - /* 2020 */ 46, 37, 241, 37, 37, 241, 37, 0, 37, 37, - /* 2030 */ 241, 37, 380, 241, 0, 37, 0, 37, 0, 22, - /* 2040 */ 459, 0, 0, 0, 485, 393, 37, 488, 236, 0, - /* 2050 */ 222, 492, 493, 494, 495, 496, 497, 184, 499, 0, - /* 2060 */ 222, 216, 223, 214, 0, 0, 193, 210, 209, 0, - /* 2070 */ 197, 198, 0, 421, 0, 155, 203, 204, 50, 50, - /* 2080 */ 0, 37, 0, 0, 37, 53, 0, 50, 0, 437, - /* 2090 */ 0, 439, 46, 0, 0, 222, 174, 37, 50, 540, - /* 2100 */ 0, 0, 0, 0, 0, 0, 0, 174, 0, 0, - /* 2110 */ 0, 380, 0, 0, 462, 0, 0, 0, 0, 0, - /* 2120 */ 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, - /* 2130 */ 380, 0, 0, 46, 50, 0, 0, 485, 0, 0, - /* 2140 */ 488, 0, 0, 393, 492, 493, 494, 495, 496, 497, - /* 2150 */ 0, 499, 421, 0, 380, 0, 22, 0, 155, 0, - /* 2160 */ 154, 0, 0, 153, 0, 22, 22, 393, 437, 0, - /* 2170 */ 439, 421, 0, 0, 67, 51, 0, 37, 67, 0, - /* 2180 */ 0, 51, 37, 0, 0, 0, 37, 437, 0, 439, - /* 2190 */ 43, 37, 46, 462, 43, 421, 14, 0, 0, 380, - /* 2200 */ 67, 53, 37, 43, 67, 53, 43, 33, 50, 53, - /* 2210 */ 44, 437, 393, 439, 43, 0, 485, 50, 50, 488, - /* 2220 */ 0, 0, 0, 492, 493, 494, 495, 496, 497, 43, - /* 2230 */ 499, 205, 0, 0, 0, 485, 0, 50, 488, 50, - /* 2240 */ 421, 0, 492, 493, 494, 495, 496, 497, 37, 499, - /* 2250 */ 75, 380, 53, 43, 0, 37, 437, 53, 439, 485, - /* 2260 */ 43, 0, 488, 37, 393, 53, 492, 493, 494, 495, - /* 2270 */ 496, 497, 0, 499, 43, 37, 53, 0, 43, 0, - /* 2280 */ 0, 0, 0, 0, 37, 22, 0, 22, 37, 380, - /* 2290 */ 120, 0, 421, 543, 37, 37, 22, 37, 0, 122, - /* 2300 */ 33, 37, 393, 37, 485, 37, 37, 488, 437, 33, - /* 2310 */ 439, 492, 493, 494, 495, 496, 497, 22, 499, 380, - /* 2320 */ 501, 37, 37, 22, 37, 37, 552, 0, 22, 0, - /* 2330 */ 421, 22, 393, 462, 37, 0, 380, 0, 0, 37, - /* 2340 */ 0, 37, 0, 0, 55, 37, 437, 22, 439, 393, - /* 2350 */ 20, 37, 37, 37, 115, 0, 485, 114, 114, 488, - /* 2360 */ 421, 0, 50, 492, 493, 494, 495, 496, 497, 191, - /* 2370 */ 499, 462, 22, 37, 0, 22, 437, 421, 439, 0, - /* 2380 */ 0, 3, 33, 191, 114, 114, 191, 191, 115, 37, - /* 2390 */ 115, 191, 114, 437, 485, 439, 37, 488, 197, 302, - /* 2400 */ 110, 492, 493, 494, 495, 496, 497, 226, 499, 201, - /* 2410 */ 201, 217, 112, 380, 221, 51, 51, 33, 227, 33, - /* 2420 */ 115, 33, 115, 50, 485, 115, 393, 488, 33, 81, - /* 2430 */ 33, 492, 493, 494, 495, 496, 497, 114, 499, 50, - /* 2440 */ 114, 485, 114, 37, 488, 114, 114, 380, 492, 493, - /* 2450 */ 494, 495, 496, 497, 421, 499, 115, 3, 33, 115, - /* 2460 */ 393, 115, 50, 37, 37, 37, 37, 37, 37, 115, - /* 2470 */ 437, 115, 439, 33, 50, 0, 380, 0, 43, 0, - /* 2480 */ 114, 43, 115, 115, 114, 114, 194, 0, 421, 393, - /* 2490 */ 114, 198, 286, 194, 43, 33, 115, 114, 273, 112, - /* 2500 */ 2, 253, 112, 22, 437, 302, 439, 302, 115, 50, - /* 2510 */ 193, 115, 250, 114, 114, 114, 114, 421, 485, 114, - /* 2520 */ 50, 488, 115, 114, 114, 492, 493, 494, 495, 496, - /* 2530 */ 497, 115, 499, 437, 22, 439, 114, 114, 0, 194, - /* 2540 */ 43, 123, 50, 124, 22, 22, 22, 115, 114, 227, - /* 2550 */ 114, 114, 485, 114, 37, 488, 115, 114, 114, 492, - /* 2560 */ 493, 494, 495, 496, 497, 115, 499, 37, 115, 114, - /* 2570 */ 380, 114, 37, 115, 37, 115, 37, 37, 115, 115, - /* 2580 */ 37, 485, 135, 393, 488, 33, 114, 135, 492, 493, - /* 2590 */ 494, 495, 496, 497, 380, 499, 135, 114, 37, 114, - /* 2600 */ 135, 22, 75, 74, 22, 37, 37, 393, 37, 380, - /* 2610 */ 37, 421, 37, 37, 37, 37, 108, 37, 37, 108, - /* 2620 */ 37, 33, 393, 81, 37, 81, 37, 437, 37, 439, - /* 2630 */ 22, 37, 81, 37, 37, 421, 37, 37, 37, 380, - /* 2640 */ 37, 37, 22, 37, 0, 53, 37, 0, 43, 37, - /* 2650 */ 421, 437, 393, 439, 43, 53, 0, 43, 37, 0, - /* 2660 */ 53, 37, 43, 53, 0, 0, 437, 37, 439, 37, - /* 2670 */ 22, 0, 22, 33, 22, 485, 21, 555, 488, 22, - /* 2680 */ 421, 21, 492, 493, 494, 495, 496, 497, 22, 499, - /* 2690 */ 20, 380, 555, 555, 555, 555, 437, 555, 439, 485, - /* 2700 */ 555, 555, 488, 555, 393, 555, 492, 493, 494, 495, - /* 2710 */ 496, 497, 555, 499, 485, 555, 555, 488, 555, 555, - /* 2720 */ 555, 492, 493, 494, 495, 496, 497, 380, 499, 555, - /* 2730 */ 555, 555, 421, 555, 555, 555, 555, 555, 555, 555, - /* 2740 */ 393, 555, 555, 555, 485, 555, 555, 488, 437, 555, - /* 2750 */ 439, 492, 493, 494, 495, 496, 497, 380, 499, 555, - /* 2760 */ 555, 555, 555, 555, 555, 555, 555, 555, 421, 555, - /* 2770 */ 393, 555, 555, 555, 380, 555, 555, 555, 555, 555, - /* 2780 */ 555, 555, 555, 555, 437, 555, 439, 393, 555, 555, - /* 2790 */ 555, 555, 555, 555, 555, 555, 485, 555, 421, 488, - /* 2800 */ 555, 555, 555, 492, 493, 494, 495, 496, 497, 555, - /* 2810 */ 499, 555, 555, 555, 437, 421, 439, 555, 555, 555, - /* 2820 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - /* 2830 */ 555, 437, 485, 439, 555, 488, 555, 555, 555, 492, - /* 2840 */ 493, 494, 495, 496, 497, 555, 499, 555, 555, 555, - /* 2850 */ 555, 380, 555, 555, 555, 555, 555, 555, 555, 555, - /* 2860 */ 555, 555, 485, 555, 393, 488, 555, 555, 555, 492, - /* 2870 */ 493, 494, 495, 496, 497, 555, 499, 555, 555, 485, - /* 2880 */ 555, 555, 488, 555, 555, 380, 492, 493, 494, 495, - /* 2890 */ 496, 497, 421, 499, 555, 555, 555, 555, 393, 555, - /* 2900 */ 555, 555, 555, 555, 555, 555, 555, 555, 437, 555, - /* 2910 */ 439, 555, 555, 555, 380, 555, 555, 555, 555, 555, - /* 2920 */ 555, 555, 555, 555, 555, 555, 421, 393, 555, 555, - /* 2930 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - /* 2940 */ 555, 555, 437, 555, 439, 555, 555, 555, 555, 555, - /* 2950 */ 555, 555, 555, 555, 555, 421, 485, 555, 555, 488, - /* 2960 */ 555, 555, 555, 492, 493, 494, 495, 496, 497, 555, - /* 2970 */ 499, 437, 555, 439, 555, 380, 555, 555, 555, 555, - /* 2980 */ 555, 555, 555, 555, 555, 555, 555, 555, 393, 555, - /* 2990 */ 485, 555, 555, 488, 555, 555, 555, 492, 493, 494, - /* 3000 */ 495, 496, 497, 555, 499, 555, 555, 555, 380, 555, - /* 3010 */ 555, 555, 555, 555, 555, 555, 421, 555, 555, 485, - /* 3020 */ 555, 393, 488, 555, 555, 555, 492, 493, 494, 495, - /* 3030 */ 496, 497, 437, 499, 439, 555, 555, 555, 555, 555, - /* 3040 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 421, - /* 3050 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - /* 3060 */ 555, 555, 555, 555, 555, 437, 555, 439, 555, 555, - /* 3070 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - /* 3080 */ 485, 555, 555, 488, 555, 380, 555, 492, 493, 494, - /* 3090 */ 495, 496, 497, 555, 499, 555, 555, 555, 393, 555, - /* 3100 */ 555, 555, 380, 555, 555, 555, 555, 555, 555, 555, - /* 3110 */ 555, 555, 555, 485, 555, 393, 488, 555, 555, 555, - /* 3120 */ 492, 493, 494, 495, 496, 497, 421, 499, 380, 555, - /* 3130 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - /* 3140 */ 555, 393, 437, 421, 439, 555, 555, 555, 555, 555, - /* 3150 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 437, - /* 3160 */ 555, 439, 555, 555, 555, 380, 555, 555, 555, 421, - /* 3170 */ 555, 555, 555, 555, 555, 555, 555, 555, 393, 555, - /* 3180 */ 555, 555, 555, 555, 555, 437, 555, 439, 555, 555, - /* 3190 */ 485, 555, 555, 488, 555, 555, 555, 492, 493, 494, - /* 3200 */ 495, 496, 497, 555, 499, 555, 421, 485, 555, 555, - /* 3210 */ 488, 555, 555, 555, 492, 493, 494, 495, 496, 497, - /* 3220 */ 555, 499, 437, 555, 439, 555, 555, 555, 555, 555, - /* 3230 */ 555, 555, 555, 485, 555, 555, 488, 555, 555, 555, - /* 3240 */ 492, 493, 494, 495, 496, 497, 555, 499, 555, 555, - /* 3250 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - /* 3260 */ 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - /* 3270 */ 485, 555, 555, 488, 555, 555, 555, 492, 493, 494, - /* 3280 */ 495, 496, 497, 555, 499, 377, 377, 377, 377, 377, - /* 3290 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3300 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3310 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3320 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3330 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3340 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3350 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3360 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3370 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3380 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3390 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3400 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3410 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3420 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3430 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3440 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3450 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3460 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3470 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3480 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3490 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3500 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3510 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3520 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3530 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3540 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3550 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3560 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3570 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3580 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3590 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3600 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3610 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3620 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3630 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3640 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3650 */ 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, - /* 3660 */ 377, 377, + /* 270 */ 270, 271, 272, 12, 13, 243, 14, 424, 18, 448, + /* 280 */ 20, 20, 20, 22, 467, 444, 445, 27, 447, 472, + /* 290 */ 30, 75, 451, 440, 20, 442, 22, 36, 38, 38, + /* 300 */ 287, 288, 289, 290, 291, 292, 293, 294, 295, 154, + /* 310 */ 36, 253, 378, 20, 54, 380, 56, 382, 251, 424, + /* 320 */ 115, 61, 62, 115, 169, 516, 517, 518, 519, 68, + /* 330 */ 521, 522, 58, 73, 36, 20, 75, 424, 521, 123, + /* 340 */ 325, 488, 402, 82, 491, 432, 529, 452, 495, 496, + /* 350 */ 497, 498, 499, 500, 20, 502, 443, 20, 505, 419, + /* 360 */ 507, 508, 509, 298, 547, 548, 513, 514, 428, 552, + /* 370 */ 553, 146, 20, 112, 114, 150, 115, 310, 311, 312, + /* 380 */ 313, 314, 315, 316, 395, 125, 0, 287, 288, 289, + /* 390 */ 290, 291, 292, 293, 294, 295, 291, 292, 293, 294, + /* 400 */ 295, 467, 20, 8, 9, 189, 472, 12, 13, 14, + /* 410 */ 15, 16, 151, 152, 0, 22, 156, 157, 154, 159, + /* 420 */ 160, 161, 162, 163, 164, 165, 166, 167, 168, 36, + /* 430 */ 115, 171, 172, 173, 174, 175, 176, 177, 178, 20, + /* 440 */ 180, 181, 182, 20, 151, 152, 186, 187, 188, 224, + /* 450 */ 115, 190, 191, 193, 229, 521, 52, 232, 2, 234, + /* 460 */ 74, 200, 201, 529, 8, 9, 477, 478, 12, 13, + /* 470 */ 14, 15, 16, 425, 74, 82, 215, 521, 217, 41, + /* 480 */ 42, 547, 548, 195, 436, 529, 552, 553, 151, 152, + /* 490 */ 395, 396, 276, 277, 278, 279, 280, 281, 282, 283, + /* 500 */ 284, 285, 286, 298, 548, 112, 298, 3, 552, 553, + /* 510 */ 415, 116, 251, 252, 253, 217, 255, 256, 257, 258, + /* 520 */ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, + /* 530 */ 269, 270, 271, 272, 273, 12, 13, 200, 201, 36, + /* 540 */ 381, 424, 4, 20, 192, 22, 424, 249, 250, 112, + /* 550 */ 433, 434, 288, 289, 290, 396, 434, 119, 120, 36, + /* 560 */ 122, 38, 424, 126, 127, 128, 129, 130, 131, 132, + /* 570 */ 133, 134, 135, 381, 137, 138, 139, 140, 141, 142, + /* 580 */ 143, 443, 144, 424, 170, 82, 148, 36, 396, 175, + /* 590 */ 398, 68, 304, 305, 306, 307, 192, 183, 75, 440, + /* 600 */ 0, 442, 485, 486, 273, 82, 275, 203, 215, 411, + /* 610 */ 217, 0, 414, 298, 8, 9, 424, 424, 12, 13, + /* 620 */ 14, 15, 16, 8, 9, 395, 3, 12, 13, 14, + /* 630 */ 15, 16, 440, 298, 442, 112, 115, 115, 115, 33, + /* 640 */ 427, 20, 20, 20, 251, 252, 124, 488, 442, 506, + /* 650 */ 491, 508, 4, 412, 495, 496, 497, 498, 499, 500, + /* 660 */ 91, 502, 381, 457, 74, 14, 507, 19, 509, 463, + /* 670 */ 464, 20, 513, 514, 151, 152, 253, 21, 391, 486, + /* 680 */ 488, 440, 395, 491, 397, 125, 38, 495, 496, 497, + /* 690 */ 498, 499, 500, 37, 502, 39, 40, 41, 42, 507, + /* 700 */ 541, 509, 54, 273, 491, 513, 514, 477, 478, 61, + /* 710 */ 62, 381, 44, 190, 191, 502, 68, 73, 12, 13, + /* 720 */ 424, 440, 116, 200, 201, 494, 396, 158, 398, 433, + /* 730 */ 434, 116, 491, 492, 493, 214, 68, 216, 215, 116, + /* 740 */ 217, 424, 36, 502, 144, 145, 146, 147, 148, 149, + /* 750 */ 150, 520, 183, 184, 424, 144, 145, 146, 147, 148, + /* 760 */ 149, 150, 114, 441, 442, 117, 197, 391, 217, 248, + /* 770 */ 440, 395, 442, 397, 251, 252, 253, 412, 255, 256, + /* 780 */ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + /* 790 */ 267, 268, 269, 270, 271, 272, 12, 13, 14, 381, + /* 800 */ 249, 250, 485, 486, 20, 440, 22, 12, 13, 14, + /* 810 */ 15, 16, 190, 192, 396, 192, 398, 467, 488, 298, + /* 820 */ 36, 491, 38, 396, 320, 495, 496, 497, 498, 499, + /* 830 */ 500, 20, 502, 381, 395, 59, 60, 507, 300, 509, + /* 840 */ 442, 190, 424, 513, 514, 395, 396, 227, 396, 82, + /* 850 */ 398, 424, 68, 381, 210, 457, 491, 492, 440, 68, + /* 860 */ 442, 463, 464, 12, 13, 415, 82, 502, 506, 54, + /* 870 */ 508, 521, 422, 22, 253, 253, 424, 125, 63, 529, + /* 880 */ 381, 66, 67, 239, 240, 425, 189, 36, 424, 38, + /* 890 */ 395, 396, 440, 454, 442, 456, 112, 547, 548, 115, + /* 900 */ 395, 396, 552, 553, 253, 114, 488, 443, 117, 491, + /* 910 */ 415, 4, 440, 495, 496, 497, 498, 499, 500, 68, + /* 920 */ 502, 395, 396, 217, 497, 507, 467, 509, 395, 396, + /* 930 */ 23, 513, 514, 82, 505, 151, 152, 508, 467, 440, + /* 940 */ 488, 415, 23, 491, 395, 396, 381, 495, 496, 497, + /* 950 */ 498, 499, 500, 448, 502, 48, 49, 50, 381, 507, + /* 960 */ 494, 509, 381, 112, 415, 513, 514, 20, 49, 50, + /* 970 */ 395, 396, 381, 276, 190, 191, 185, 145, 395, 396, + /* 980 */ 521, 448, 0, 286, 200, 201, 520, 396, 529, 398, + /* 990 */ 415, 34, 521, 395, 396, 375, 376, 377, 415, 215, + /* 1000 */ 529, 217, 14, 192, 22, 440, 547, 548, 20, 395, + /* 1010 */ 396, 552, 553, 415, 14, 424, 13, 440, 547, 548, + /* 1020 */ 20, 440, 425, 552, 553, 395, 396, 145, 146, 415, + /* 1030 */ 420, 440, 150, 442, 144, 251, 252, 253, 148, 255, + /* 1040 */ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + /* 1050 */ 266, 267, 268, 269, 270, 271, 272, 12, 13, 400, + /* 1060 */ 401, 416, 230, 231, 253, 20, 215, 22, 217, 424, + /* 1070 */ 144, 145, 146, 147, 148, 149, 150, 395, 396, 488, + /* 1080 */ 435, 36, 491, 38, 0, 82, 495, 496, 497, 498, + /* 1090 */ 499, 500, 482, 502, 425, 381, 381, 415, 507, 425, + /* 1100 */ 509, 33, 251, 252, 513, 514, 395, 396, 400, 401, + /* 1110 */ 396, 425, 398, 68, 112, 47, 265, 266, 267, 268, + /* 1120 */ 269, 270, 271, 33, 381, 185, 415, 82, 126, 127, + /* 1130 */ 128, 129, 130, 131, 132, 133, 134, 135, 424, 137, + /* 1140 */ 138, 139, 140, 141, 142, 143, 13, 517, 518, 519, + /* 1150 */ 417, 521, 522, 420, 440, 440, 442, 112, 381, 219, + /* 1160 */ 115, 77, 78, 79, 395, 396, 395, 396, 84, 85, + /* 1170 */ 86, 409, 410, 396, 90, 395, 396, 20, 190, 95, + /* 1180 */ 96, 97, 98, 440, 415, 101, 415, 395, 396, 105, + /* 1190 */ 106, 107, 108, 384, 385, 415, 151, 152, 395, 396, + /* 1200 */ 253, 424, 488, 409, 410, 491, 116, 415, 381, 495, + /* 1210 */ 496, 497, 498, 499, 500, 82, 502, 440, 415, 442, + /* 1220 */ 233, 507, 235, 509, 381, 8, 9, 513, 514, 12, + /* 1230 */ 13, 14, 15, 16, 424, 190, 191, 395, 396, 395, + /* 1240 */ 396, 253, 432, 395, 396, 200, 201, 424, 1, 2, + /* 1250 */ 416, 395, 396, 443, 20, 432, 22, 415, 424, 415, + /* 1260 */ 215, 381, 217, 415, 381, 488, 443, 440, 491, 435, + /* 1270 */ 0, 415, 495, 496, 497, 498, 499, 500, 473, 502, + /* 1280 */ 22, 22, 381, 440, 507, 33, 509, 14, 15, 16, + /* 1290 */ 513, 514, 58, 125, 36, 36, 251, 252, 253, 47, + /* 1300 */ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + /* 1310 */ 265, 266, 267, 268, 269, 270, 271, 272, 12, 13, + /* 1320 */ 440, 424, 381, 440, 54, 18, 20, 381, 22, 424, + /* 1330 */ 23, 437, 435, 381, 440, 381, 381, 396, 413, 467, + /* 1340 */ 381, 440, 36, 381, 38, 2, 0, 179, 443, 42, + /* 1350 */ 43, 8, 9, 46, 381, 12, 13, 14, 15, 16, + /* 1360 */ 0, 36, 33, 116, 57, 424, 13, 33, 33, 396, + /* 1370 */ 112, 112, 437, 0, 68, 440, 69, 70, 71, 72, + /* 1380 */ 73, 440, 437, 442, 118, 440, 440, 121, 82, 36, + /* 1390 */ 12, 13, 440, 521, 440, 440, 33, 424, 33, 440, + /* 1400 */ 22, 529, 440, 75, 44, 118, 33, 82, 121, 192, + /* 1410 */ 253, 13, 33, 440, 36, 442, 38, 382, 112, 547, + /* 1420 */ 548, 115, 115, 118, 552, 553, 121, 118, 0, 488, + /* 1430 */ 121, 0, 491, 453, 36, 68, 495, 496, 497, 498, + /* 1440 */ 499, 500, 33, 502, 0, 0, 68, 33, 507, 36, + /* 1450 */ 509, 116, 33, 22, 513, 514, 51, 151, 152, 33, + /* 1460 */ 153, 488, 151, 152, 491, 13, 22, 22, 495, 496, + /* 1470 */ 497, 498, 499, 500, 1, 502, 1, 2, 36, 116, + /* 1480 */ 507, 116, 509, 55, 117, 36, 513, 514, 36, 12, + /* 1490 */ 13, 523, 19, 12, 13, 116, 190, 191, 33, 13, + /* 1500 */ 154, 33, 33, 33, 556, 33, 200, 201, 545, 33, + /* 1510 */ 36, 38, 538, 524, 207, 208, 209, 399, 424, 212, + /* 1520 */ 115, 215, 36, 217, 33, 116, 53, 54, 412, 33, + /* 1530 */ 116, 82, 225, 226, 412, 116, 63, 64, 65, 66, + /* 1540 */ 33, 68, 116, 12, 13, 238, 12, 13, 241, 33, + /* 1550 */ 33, 244, 245, 246, 247, 248, 82, 251, 252, 253, + /* 1560 */ 453, 255, 256, 257, 258, 259, 260, 261, 262, 263, + /* 1570 */ 264, 265, 266, 267, 268, 269, 270, 271, 272, 251, + /* 1580 */ 33, 116, 12, 13, 116, 116, 116, 114, 116, 394, + /* 1590 */ 117, 381, 116, 215, 453, 217, 8, 9, 12, 13, + /* 1600 */ 12, 13, 14, 15, 16, 298, 396, 116, 12, 13, + /* 1610 */ 12, 13, 116, 12, 13, 12, 13, 12, 13, 544, + /* 1620 */ 33, 544, 149, 116, 544, 466, 544, 249, 250, 251, + /* 1630 */ 217, 399, 116, 116, 424, 489, 453, 396, 439, 474, + /* 1640 */ 453, 453, 528, 265, 266, 267, 268, 269, 270, 271, + /* 1650 */ 440, 322, 442, 528, 549, 515, 381, 531, 324, 217, + /* 1660 */ 414, 468, 301, 116, 54, 490, 20, 194, 20, 196, + /* 1670 */ 479, 396, 199, 395, 484, 232, 404, 204, 404, 479, + /* 1680 */ 213, 470, 20, 395, 47, 381, 396, 449, 396, 449, + /* 1690 */ 189, 446, 395, 449, 396, 395, 223, 446, 488, 424, + /* 1700 */ 396, 491, 446, 116, 113, 495, 496, 497, 498, 499, + /* 1710 */ 500, 446, 502, 111, 395, 440, 408, 442, 395, 509, + /* 1720 */ 407, 110, 406, 513, 514, 395, 381, 395, 424, 20, + /* 1730 */ 77, 78, 79, 395, 52, 388, 392, 84, 85, 86, + /* 1740 */ 388, 396, 392, 90, 440, 404, 442, 479, 95, 96, + /* 1750 */ 97, 98, 404, 404, 101, 20, 442, 20, 105, 106, + /* 1760 */ 107, 108, 20, 488, 469, 381, 491, 397, 404, 424, + /* 1770 */ 495, 496, 497, 498, 499, 500, 404, 502, 397, 20, + /* 1780 */ 396, 460, 20, 395, 509, 440, 404, 442, 513, 514, + /* 1790 */ 454, 404, 488, 404, 404, 491, 381, 395, 388, 495, + /* 1800 */ 496, 497, 498, 499, 500, 384, 502, 424, 424, 424, + /* 1810 */ 424, 396, 388, 509, 384, 424, 424, 513, 514, 424, + /* 1820 */ 424, 424, 483, 424, 440, 424, 442, 424, 236, 115, + /* 1830 */ 20, 402, 481, 488, 440, 479, 491, 478, 221, 424, + /* 1840 */ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, + /* 1850 */ 476, 440, 440, 220, 395, 440, 402, 442, 442, 309, + /* 1860 */ 440, 537, 308, 537, 206, 461, 317, 540, 475, 461, + /* 1870 */ 539, 319, 488, 536, 468, 491, 318, 537, 381, 495, + /* 1880 */ 496, 497, 498, 499, 500, 302, 502, 297, 526, 535, + /* 1890 */ 468, 534, 326, 396, 323, 527, 296, 321, 396, 557, + /* 1900 */ 20, 494, 125, 488, 440, 550, 491, 532, 299, 551, + /* 1910 */ 495, 496, 497, 498, 499, 500, 397, 502, 381, 461, + /* 1920 */ 402, 424, 38, 402, 440, 440, 542, 543, 440, 440, + /* 1930 */ 530, 402, 461, 396, 198, 440, 458, 440, 54, 442, + /* 1940 */ 402, 454, 115, 381, 512, 440, 198, 63, 64, 65, + /* 1950 */ 66, 440, 68, 455, 454, 402, 420, 402, 396, 396, + /* 1960 */ 440, 424, 440, 440, 440, 440, 440, 440, 440, 554, + /* 1970 */ 555, 115, 440, 440, 429, 440, 395, 440, 22, 442, + /* 1980 */ 440, 440, 440, 440, 440, 488, 424, 402, 491, 383, + /* 1990 */ 35, 440, 495, 496, 497, 498, 499, 500, 114, 502, + /* 2000 */ 440, 117, 440, 37, 442, 440, 509, 440, 440, 381, + /* 2010 */ 386, 514, 440, 387, 40, 426, 389, 388, 462, 471, + /* 2020 */ 426, 462, 418, 379, 396, 488, 487, 465, 491, 0, + /* 2030 */ 418, 381, 495, 496, 497, 498, 499, 500, 418, 502, + /* 2040 */ 0, 480, 403, 0, 47, 0, 396, 36, 242, 36, + /* 2050 */ 488, 381, 424, 491, 36, 36, 242, 495, 496, 497, + /* 2060 */ 498, 499, 500, 0, 502, 242, 396, 36, 440, 185, + /* 2070 */ 442, 36, 36, 0, 424, 242, 0, 36, 194, 0, + /* 2080 */ 543, 0, 198, 199, 36, 0, 22, 0, 204, 205, + /* 2090 */ 440, 36, 442, 465, 424, 237, 0, 223, 0, 223, + /* 2100 */ 0, 224, 217, 215, 0, 0, 211, 223, 210, 0, + /* 2110 */ 440, 0, 442, 51, 381, 157, 488, 51, 0, 491, + /* 2120 */ 36, 0, 0, 495, 496, 497, 498, 499, 500, 396, + /* 2130 */ 502, 36, 54, 0, 51, 0, 381, 47, 488, 0, + /* 2140 */ 0, 491, 0, 51, 0, 495, 496, 497, 498, 499, + /* 2150 */ 500, 396, 502, 0, 0, 0, 381, 424, 488, 0, + /* 2160 */ 0, 491, 175, 36, 0, 495, 496, 497, 498, 499, + /* 2170 */ 500, 396, 502, 440, 175, 442, 0, 0, 0, 424, + /* 2180 */ 51, 0, 0, 381, 0, 0, 0, 0, 0, 0, + /* 2190 */ 0, 0, 0, 0, 0, 440, 546, 442, 396, 424, + /* 2200 */ 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, + /* 2210 */ 0, 0, 0, 0, 0, 440, 0, 442, 22, 0, + /* 2220 */ 465, 488, 157, 156, 491, 555, 424, 0, 495, 496, + /* 2230 */ 497, 498, 499, 500, 0, 502, 0, 504, 0, 22, + /* 2240 */ 465, 155, 440, 488, 442, 22, 491, 52, 0, 0, + /* 2250 */ 495, 496, 497, 498, 499, 500, 36, 502, 0, 0, + /* 2260 */ 52, 0, 36, 488, 381, 0, 491, 68, 36, 44, + /* 2270 */ 495, 496, 497, 498, 499, 500, 54, 502, 0, 396, + /* 2280 */ 36, 44, 54, 68, 54, 44, 68, 0, 381, 36, + /* 2290 */ 488, 44, 68, 491, 0, 33, 51, 495, 496, 497, + /* 2300 */ 498, 499, 500, 396, 502, 51, 14, 424, 51, 381, + /* 2310 */ 47, 0, 45, 44, 0, 0, 0, 0, 44, 206, + /* 2320 */ 0, 51, 0, 440, 396, 442, 51, 0, 0, 381, + /* 2330 */ 54, 424, 76, 0, 0, 36, 0, 44, 36, 54, + /* 2340 */ 44, 0, 36, 54, 396, 44, 0, 440, 36, 442, + /* 2350 */ 0, 381, 424, 44, 54, 0, 0, 0, 0, 0, + /* 2360 */ 36, 121, 123, 0, 22, 22, 396, 36, 440, 22, + /* 2370 */ 442, 488, 424, 36, 491, 36, 36, 33, 495, 496, + /* 2380 */ 497, 498, 499, 500, 36, 502, 0, 36, 440, 36, + /* 2390 */ 442, 22, 0, 0, 424, 488, 36, 36, 491, 33, + /* 2400 */ 36, 36, 495, 496, 497, 498, 499, 500, 36, 502, + /* 2410 */ 440, 22, 442, 22, 381, 0, 488, 22, 56, 491, + /* 2420 */ 36, 0, 0, 495, 496, 497, 498, 499, 500, 396, + /* 2430 */ 502, 0, 0, 36, 381, 36, 488, 0, 36, 491, + /* 2440 */ 0, 22, 36, 495, 496, 497, 498, 499, 500, 396, + /* 2450 */ 502, 116, 36, 20, 36, 0, 381, 424, 488, 228, + /* 2460 */ 115, 491, 227, 192, 115, 495, 496, 497, 498, 499, + /* 2470 */ 500, 396, 502, 440, 222, 442, 51, 424, 0, 36, + /* 2480 */ 192, 22, 0, 22, 218, 0, 0, 192, 198, 192, + /* 2490 */ 3, 33, 115, 440, 116, 442, 192, 115, 36, 424, + /* 2500 */ 202, 303, 36, 116, 52, 202, 52, 33, 33, 115, + /* 2510 */ 33, 113, 111, 33, 51, 440, 116, 442, 51, 116, + /* 2520 */ 115, 488, 115, 115, 491, 116, 115, 82, 495, 496, + /* 2530 */ 497, 498, 499, 500, 33, 502, 303, 3, 115, 381, + /* 2540 */ 116, 488, 36, 116, 491, 116, 33, 36, 495, 496, + /* 2550 */ 497, 498, 499, 500, 396, 502, 36, 36, 303, 36, + /* 2560 */ 36, 381, 36, 488, 116, 116, 491, 51, 287, 33, + /* 2570 */ 495, 496, 497, 498, 499, 500, 396, 502, 381, 51, + /* 2580 */ 0, 0, 424, 115, 44, 116, 116, 115, 115, 0, + /* 2590 */ 44, 0, 44, 396, 115, 33, 113, 116, 440, 195, + /* 2600 */ 442, 2, 381, 115, 424, 113, 274, 195, 194, 199, + /* 2610 */ 22, 116, 116, 115, 115, 115, 51, 396, 251, 115, + /* 2620 */ 440, 424, 442, 115, 51, 116, 116, 115, 22, 115, + /* 2630 */ 254, 0, 115, 195, 115, 51, 44, 440, 116, 442, + /* 2640 */ 115, 22, 115, 22, 115, 424, 488, 115, 115, 491, + /* 2650 */ 22, 36, 115, 495, 496, 497, 498, 499, 500, 124, + /* 2660 */ 502, 440, 228, 442, 125, 116, 116, 115, 488, 36, + /* 2670 */ 116, 491, 381, 36, 115, 495, 496, 497, 498, 499, + /* 2680 */ 500, 36, 502, 116, 116, 488, 36, 396, 491, 381, + /* 2690 */ 116, 36, 495, 496, 497, 498, 499, 500, 116, 502, + /* 2700 */ 36, 115, 136, 33, 396, 136, 136, 136, 115, 488, + /* 2710 */ 36, 381, 491, 115, 22, 424, 495, 496, 497, 498, + /* 2720 */ 499, 500, 76, 502, 75, 22, 396, 36, 33, 36, + /* 2730 */ 36, 440, 424, 442, 36, 36, 36, 36, 36, 82, + /* 2740 */ 36, 36, 36, 109, 82, 109, 36, 36, 440, 36, + /* 2750 */ 442, 22, 381, 36, 424, 36, 36, 82, 36, 36, + /* 2760 */ 36, 36, 36, 22, 36, 0, 36, 396, 54, 0, + /* 2770 */ 440, 44, 442, 36, 0, 54, 44, 381, 36, 488, + /* 2780 */ 44, 0, 491, 36, 44, 54, 495, 496, 497, 498, + /* 2790 */ 499, 500, 396, 502, 381, 424, 488, 54, 0, 491, + /* 2800 */ 36, 0, 22, 495, 496, 497, 498, 499, 500, 396, + /* 2810 */ 502, 440, 36, 442, 0, 22, 33, 22, 488, 22, + /* 2820 */ 424, 491, 36, 36, 21, 495, 496, 497, 498, 499, + /* 2830 */ 500, 22, 502, 21, 558, 20, 440, 424, 442, 558, + /* 2840 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 2850 */ 558, 558, 558, 440, 558, 442, 558, 381, 558, 488, + /* 2860 */ 558, 558, 491, 558, 558, 558, 495, 496, 497, 498, + /* 2870 */ 499, 500, 396, 502, 558, 558, 558, 558, 558, 558, + /* 2880 */ 558, 558, 558, 558, 488, 558, 558, 491, 558, 558, + /* 2890 */ 558, 495, 496, 497, 498, 499, 500, 558, 502, 381, + /* 2900 */ 424, 488, 558, 558, 491, 558, 558, 558, 495, 496, + /* 2910 */ 497, 498, 499, 500, 396, 502, 440, 558, 442, 558, + /* 2920 */ 558, 558, 558, 381, 558, 558, 558, 558, 558, 558, + /* 2930 */ 558, 558, 558, 558, 558, 558, 558, 558, 396, 558, + /* 2940 */ 558, 558, 424, 558, 558, 558, 558, 558, 558, 558, + /* 2950 */ 558, 558, 558, 558, 558, 558, 558, 558, 440, 558, + /* 2960 */ 442, 558, 558, 558, 488, 558, 424, 491, 558, 558, + /* 2970 */ 558, 495, 496, 497, 498, 499, 500, 558, 502, 558, + /* 2980 */ 558, 558, 440, 558, 442, 558, 558, 558, 558, 558, + /* 2990 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3000 */ 558, 558, 558, 558, 558, 558, 488, 558, 558, 491, + /* 3010 */ 558, 558, 558, 495, 496, 497, 498, 499, 500, 558, + /* 3020 */ 502, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3030 */ 488, 558, 558, 491, 558, 558, 558, 495, 496, 497, + /* 3040 */ 498, 499, 500, 558, 502, 558, 558, 558, 558, 558, + /* 3050 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3060 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3070 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3080 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3090 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3100 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3110 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3120 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3130 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3140 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3150 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3160 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3170 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3180 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3190 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3200 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, + /* 3210 */ 558, 558, 558, 558, 378, 378, 378, 378, 378, 378, + /* 3220 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3230 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3240 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3250 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3260 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3270 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3280 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3290 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3300 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3310 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3320 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3330 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3340 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3350 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3360 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3370 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3380 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3390 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3400 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3410 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + /* 3420 */ 378, 378, 378, }; -#define YY_SHIFT_COUNT (966) +#define YY_SHIFT_COUNT (971) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2671) +#define YY_SHIFT_MAX (2815) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 430, 0, 260, 0, 521, 521, 521, 521, 521, 521, - /* 10 */ 521, 521, 521, 521, 521, 521, 781, 1041, 1041, 1301, - /* 20 */ 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, - /* 30 */ 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, - /* 40 */ 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, - /* 50 */ 323, 520, 342, 178, 131, 254, 131, 131, 178, 178, - /* 60 */ 131, 82, 131, 259, 82, 101, 131, 127, 1211, 515, - /* 70 */ 515, 156, 156, 1211, 1211, 61, 61, 515, 434, 593, - /* 80 */ 296, 296, 118, 156, 156, 156, 156, 156, 156, 156, - /* 90 */ 156, 156, 156, 156, 261, 337, 383, 156, 156, 255, - /* 100 */ 127, 156, 261, 156, 127, 156, 156, 156, 156, 127, - /* 110 */ 156, 156, 127, 156, 127, 127, 127, 156, 579, 112, - /* 120 */ 112, 439, 439, 620, 1040, 15, 437, 516, 516, 516, - /* 130 */ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, - /* 140 */ 516, 516, 516, 516, 516, 516, 576, 689, 434, 593, - /* 150 */ 1006, 1006, 942, 903, 903, 903, 68, 68, 989, 792, - /* 160 */ 942, 255, 127, 291, 127, 127, 396, 127, 127, 743, - /* 170 */ 127, 743, 743, 772, 993, 439, 439, 439, 439, 439, - /* 180 */ 439, 1609, 1740, 335, 392, 191, 191, 814, 336, 33, - /* 190 */ 213, 256, 274, 698, 823, 278, 278, 744, 690, 815, - /* 200 */ 132, 132, 132, 714, 132, 932, 679, 138, 476, 905, - /* 210 */ 475, 1014, 476, 476, 696, 1138, 1138, 1068, 13, 981, - /* 220 */ 792, 1367, 1613, 1650, 1657, 1449, 255, 1657, 255, 1474, - /* 230 */ 1650, 1668, 1644, 1668, 1644, 1509, 1650, 1668, 1650, 1644, - /* 240 */ 1509, 1509, 1509, 1594, 1597, 1650, 1650, 1605, 1650, 1650, - /* 250 */ 1650, 1699, 1672, 1699, 1672, 1657, 255, 255, 1713, 255, - /* 260 */ 1724, 1726, 255, 1724, 255, 1735, 255, 1741, 255, 255, - /* 270 */ 1650, 255, 1699, 127, 127, 127, 127, 127, 127, 127, - /* 280 */ 127, 127, 127, 127, 1650, 993, 993, 1699, 743, 743, - /* 290 */ 743, 1553, 1681, 1657, 579, 1783, 1593, 1596, 1713, 579, - /* 300 */ 1367, 1650, 743, 1520, 1532, 1520, 1532, 1525, 1638, 1520, - /* 310 */ 1533, 1541, 1570, 1367, 1577, 1584, 1555, 1569, 1574, 1668, - /* 320 */ 1875, 1778, 1606, 1724, 579, 579, 1532, 743, 743, 743, - /* 330 */ 743, 1532, 743, 1716, 579, 743, 1741, 579, 1810, 743, - /* 340 */ 1732, 1741, 579, 772, 579, 1668, 743, 743, 743, 743, - /* 350 */ 743, 743, 743, 743, 743, 743, 743, 743, 743, 743, - /* 360 */ 743, 743, 743, 743, 743, 743, 743, 743, 1831, 743, - /* 370 */ 1650, 579, 1924, 1911, 1699, 3285, 3285, 3285, 3285, 3285, - /* 380 */ 3285, 3285, 3285, 3285, 3285, 3285, 3285, 1502, 1873, 23, - /* 390 */ 830, 945, 648, 1358, 309, 1408, 48, 819, 856, 63, - /* 400 */ 63, 63, 63, 63, 63, 63, 63, 63, 232, 452, - /* 410 */ 224, 650, 533, 533, 487, 286, 560, 788, 10, 10, - /* 420 */ 760, 770, 10, 708, 1091, 1179, 936, 982, 982, 794, - /* 430 */ 1096, 739, 794, 794, 794, 1287, 1256, 1241, 1322, 769, - /* 440 */ 1191, 1352, 1266, 1277, 1279, 1281, 1022, 1391, 1395, 1079, - /* 450 */ 1354, 1414, 1418, 1209, 1372, 1404, 1366, 1405, 1409, 1416, - /* 460 */ 1422, 1294, 1296, 1376, 1423, 1431, 1432, 1445, 1433, 1374, - /* 470 */ 1434, 1400, 1435, 1459, 1460, 1461, 1471, 1473, 1476, 1483, - /* 480 */ 1491, 1493, 1495, 1497, 1499, 1510, 1521, 1503, 1508, 1512, - /* 490 */ 1540, 1544, 1550, 1506, 1575, 1437, 1505, 1600, 1601, 1579, - /* 500 */ 1615, 1970, 1988, 2015, 1974, 2016, 1984, 1781, 1986, 1987, - /* 510 */ 1989, 1784, 2027, 1991, 1992, 1789, 1994, 2041, 2042, 1792, - /* 520 */ 2034, 1998, 2036, 2000, 2038, 2017, 2043, 2009, 1812, 2049, - /* 530 */ 1828, 2059, 1838, 1839, 1845, 1849, 2064, 2065, 2072, 1857, - /* 540 */ 1859, 2069, 2074, 1920, 2028, 2029, 2080, 2044, 2082, 2083, - /* 550 */ 2047, 2032, 2086, 2037, 2088, 2046, 2090, 2093, 2094, 2048, - /* 560 */ 2100, 2101, 2102, 2103, 2104, 2105, 1922, 2060, 2106, 1933, - /* 570 */ 2108, 2109, 2110, 2112, 2113, 2115, 2116, 2117, 2118, 2119, - /* 580 */ 2120, 2121, 2122, 2123, 2125, 2126, 2127, 2128, 2129, 2131, - /* 590 */ 2084, 2132, 2087, 2135, 2136, 2138, 2139, 2141, 2142, 2150, - /* 600 */ 2153, 2155, 2134, 2157, 2003, 2159, 2006, 2161, 2010, 2162, - /* 610 */ 2164, 2143, 2124, 2144, 2130, 2169, 2107, 2172, 2111, 2140, - /* 620 */ 2173, 2133, 2176, 2137, 2179, 2180, 2145, 2148, 2147, 2183, - /* 630 */ 2149, 2152, 2151, 2184, 2154, 2156, 2160, 2185, 2165, 2188, - /* 640 */ 2146, 2163, 2174, 2158, 2167, 2182, 2168, 2197, 2166, 2171, - /* 650 */ 2198, 2215, 2220, 2221, 2186, 2026, 2222, 2158, 2187, 2232, - /* 660 */ 2158, 2189, 2233, 2234, 2175, 2236, 2241, 2211, 2199, 2210, - /* 670 */ 2254, 2218, 2204, 2217, 2261, 2226, 2212, 2231, 2272, 2238, - /* 680 */ 2223, 2235, 2277, 2279, 2280, 2281, 2282, 2283, 2177, 2170, - /* 690 */ 2247, 2263, 2286, 2265, 2251, 2257, 2258, 2260, 2264, 2266, - /* 700 */ 2268, 2269, 2284, 2267, 2276, 2285, 2287, 2274, 2288, 2291, - /* 710 */ 2295, 2298, 2301, 2327, 2306, 2289, 2329, 2309, 2297, 2335, - /* 720 */ 2337, 2338, 2302, 2340, 2304, 2342, 2308, 2343, 2325, 2330, - /* 730 */ 2314, 2315, 2316, 2239, 2243, 2355, 2178, 2191, 2181, 2244, - /* 740 */ 2193, 2158, 2312, 2361, 2192, 2336, 2350, 2374, 2194, 2353, - /* 750 */ 2195, 2201, 2379, 2380, 2196, 2208, 2200, 2209, 2378, 2349, - /* 760 */ 2097, 2270, 2273, 2271, 2275, 2352, 2359, 2278, 2364, 2300, - /* 770 */ 2365, 2290, 2305, 2384, 2386, 2307, 2323, 2326, 2328, 2310, - /* 780 */ 2388, 2373, 2389, 2331, 2395, 2203, 2348, 2341, 2397, 2332, - /* 790 */ 2406, 2344, 2346, 2454, 2425, 2205, 2426, 2427, 2428, 2429, - /* 800 */ 2430, 2431, 2354, 2356, 2412, 2206, 2440, 2424, 2475, 2477, - /* 810 */ 2366, 2435, 2367, 2368, 2370, 2371, 2292, 2376, 2479, 2438, - /* 820 */ 2293, 2487, 2381, 2383, 2299, 2451, 2317, 2462, 2387, 2225, - /* 830 */ 2390, 2498, 2481, 2262, 2393, 2396, 2399, 2400, 2401, 2402, - /* 840 */ 2405, 2407, 2459, 2409, 2410, 2470, 2416, 2512, 2248, 2422, - /* 850 */ 2423, 2538, 2432, 2434, 2345, 2497, 2436, 2418, 2158, 2492, - /* 860 */ 2437, 2439, 2441, 2443, 2444, 2419, 2522, 2523, 2524, 2322, - /* 870 */ 2450, 2517, 2530, 2455, 2453, 2535, 2457, 2458, 2537, 2399, - /* 880 */ 2460, 2539, 2400, 2463, 2540, 2401, 2464, 2543, 2402, 2447, - /* 890 */ 2452, 2461, 2465, 2472, 2552, 2483, 2561, 2485, 2552, 2552, - /* 900 */ 2579, 2527, 2529, 2582, 2568, 2569, 2571, 2573, 2575, 2576, - /* 910 */ 2577, 2578, 2580, 2581, 2583, 2542, 2508, 2544, 2511, 2588, - /* 920 */ 2587, 2589, 2591, 2608, 2594, 2596, 2597, 2551, 2267, 2599, - /* 930 */ 2276, 2600, 2601, 2603, 2604, 2620, 2606, 2644, 2609, 2592, - /* 940 */ 2605, 2647, 2612, 2602, 2611, 2656, 2621, 2607, 2614, 2659, - /* 950 */ 2624, 2610, 2619, 2664, 2630, 2665, 2648, 2632, 2671, 2650, - /* 960 */ 2640, 2652, 2655, 2657, 2666, 2660, 2670, + /* 0 */ 1307, 0, 261, 0, 523, 523, 523, 523, 523, 523, + /* 10 */ 523, 523, 523, 523, 523, 523, 784, 1045, 1045, 1306, + /* 20 */ 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, + /* 30 */ 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, + /* 40 */ 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, + /* 50 */ 65, 315, 521, 6, 208, 335, 208, 208, 6, 6, + /* 60 */ 208, 851, 208, 260, 851, 205, 208, 200, 1378, 337, + /* 70 */ 337, 215, 215, 1378, 1378, 907, 907, 337, 20, 293, + /* 80 */ 262, 262, 423, 215, 215, 215, 215, 215, 215, 215, + /* 90 */ 215, 215, 215, 215, 334, 382, 419, 215, 215, 400, + /* 100 */ 200, 215, 334, 215, 200, 215, 215, 215, 215, 200, + /* 110 */ 215, 215, 200, 215, 200, 200, 200, 215, 590, 216, + /* 120 */ 216, 437, 437, 1002, 1653, 13, 69, 393, 393, 393, + /* 130 */ 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + /* 140 */ 393, 393, 393, 393, 393, 393, 438, 623, 20, 293, + /* 150 */ 776, 776, 503, 352, 352, 352, 331, 331, 386, 1003, + /* 160 */ 503, 400, 200, 560, 200, 200, 430, 200, 200, 767, + /* 170 */ 200, 767, 767, 752, 957, 437, 437, 437, 437, 437, + /* 180 */ 437, 1473, 1084, 21, 58, 100, 100, 15, 67, 288, + /* 190 */ 105, 274, 264, 651, 988, 706, 706, 621, 919, 811, + /* 200 */ 134, 134, 134, 404, 134, 622, 1234, 668, 947, 1000, + /* 210 */ 890, 940, 947, 947, 1157, 1133, 1133, 504, 1068, 538, + /* 220 */ 1003, 1361, 1610, 1646, 1648, 1443, 400, 1648, 400, 1467, + /* 230 */ 1646, 1662, 1637, 1662, 1637, 1501, 1646, 1662, 1646, 1637, + /* 240 */ 1501, 1501, 1501, 1591, 1602, 1646, 1646, 1611, 1646, 1646, + /* 250 */ 1646, 1709, 1682, 1709, 1682, 1648, 400, 400, 1735, 400, + /* 260 */ 1737, 1742, 400, 1737, 400, 1759, 400, 1762, 400, 400, + /* 270 */ 1646, 400, 1709, 200, 200, 200, 200, 200, 200, 200, + /* 280 */ 200, 200, 200, 200, 1646, 957, 957, 1709, 767, 767, + /* 290 */ 767, 1592, 1714, 1648, 590, 1810, 1617, 1633, 1735, 590, + /* 300 */ 1361, 1646, 767, 1550, 1554, 1550, 1554, 1549, 1658, 1550, + /* 310 */ 1552, 1558, 1583, 1361, 1590, 1600, 1566, 1571, 1576, 1662, + /* 320 */ 1880, 1777, 1609, 1737, 590, 590, 1554, 767, 767, 767, + /* 330 */ 767, 1554, 767, 1736, 590, 767, 1762, 590, 1827, 767, + /* 340 */ 1748, 1762, 590, 752, 590, 1662, 767, 767, 767, 767, + /* 350 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, + /* 360 */ 767, 767, 767, 767, 767, 767, 767, 767, 1856, 767, + /* 370 */ 1646, 590, 1956, 1955, 1966, 1974, 1709, 3045, 3045, 3045, + /* 380 */ 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, 3045, 39, + /* 390 */ 1884, 214, 648, 606, 395, 615, 456, 1343, 1217, 600, + /* 400 */ 611, 1588, 1588, 1588, 1588, 1588, 1588, 1588, 1588, 1588, + /* 410 */ 926, 656, 225, 569, 795, 795, 644, 791, 414, 815, + /* 420 */ 620, 620, 298, 551, 620, 155, 1258, 1259, 832, 882, + /* 430 */ 882, 1273, 1247, 697, 1273, 1273, 1273, 1270, 32, 1090, + /* 440 */ 1360, 1252, 1168, 1346, 1373, 1266, 1287, 1305, 1309, 1325, + /* 450 */ 1353, 1398, 982, 1431, 1444, 1445, 987, 1335, 1365, 1367, + /* 460 */ 1379, 1409, 1414, 1419, 1311, 1329, 1334, 1363, 1426, 1465, + /* 470 */ 1475, 1468, 1328, 1469, 1405, 1470, 1472, 1476, 1496, 1477, + /* 480 */ 1481, 1531, 1534, 1570, 1586, 1596, 1598, 1601, 1603, 1605, + /* 490 */ 1491, 1507, 1516, 1517, 1547, 1587, 522, 1449, 1413, 1442, + /* 500 */ 1452, 1486, 1474, 1428, 2029, 2040, 2043, 1997, 2045, 2011, + /* 510 */ 1806, 2013, 2018, 2019, 1814, 2063, 2031, 2035, 1823, 2036, + /* 520 */ 2073, 2079, 1833, 2076, 2041, 2081, 2048, 2085, 2064, 2087, + /* 530 */ 2055, 1858, 2096, 1874, 2098, 1876, 1877, 1885, 1888, 2100, + /* 540 */ 2104, 2105, 1895, 1898, 2109, 2111, 1958, 2062, 2066, 2118, + /* 550 */ 2084, 2121, 2122, 2095, 2078, 2133, 2083, 2135, 2090, 2139, + /* 560 */ 2140, 2142, 2092, 2144, 2153, 2154, 2155, 2159, 2160, 1987, + /* 570 */ 2127, 2164, 1999, 2176, 2177, 2178, 2184, 2185, 2186, 2187, + /* 580 */ 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2200, 2201, 2202, + /* 590 */ 2203, 2204, 2205, 2129, 2181, 2161, 2182, 2206, 2207, 2209, + /* 600 */ 2210, 2211, 2212, 2213, 2214, 2196, 2216, 2065, 2219, 2067, + /* 610 */ 2227, 2086, 2234, 2236, 2217, 2195, 2223, 2208, 2238, 2199, + /* 620 */ 2248, 2215, 2220, 2249, 2218, 2258, 2224, 2259, 2261, 2226, + /* 630 */ 2222, 2225, 2265, 2232, 2228, 2237, 2278, 2244, 2230, 2241, + /* 640 */ 2287, 2253, 2294, 2263, 2247, 2262, 2245, 2254, 2292, 2257, + /* 650 */ 2311, 2267, 2269, 2314, 2315, 2316, 2317, 2274, 2113, 2320, + /* 660 */ 2245, 2270, 2322, 2245, 2275, 2327, 2328, 2256, 2333, 2334, + /* 670 */ 2299, 2276, 2293, 2336, 2302, 2285, 2296, 2341, 2306, 2289, + /* 680 */ 2301, 2346, 2312, 2300, 2309, 2350, 2355, 2356, 2357, 2358, + /* 690 */ 2359, 2239, 2240, 2324, 2342, 2363, 2343, 2331, 2337, 2339, + /* 700 */ 2340, 2348, 2351, 2353, 2360, 2361, 2344, 2366, 2364, 2365, + /* 710 */ 2347, 2372, 2386, 2369, 2392, 2389, 2393, 2391, 2362, 2415, + /* 720 */ 2395, 2384, 2421, 2422, 2431, 2397, 2432, 2399, 2437, 2402, + /* 730 */ 2440, 2419, 2433, 2406, 2416, 2418, 2335, 2345, 2455, 2271, + /* 740 */ 2231, 2235, 2349, 2252, 2245, 2425, 2478, 2288, 2443, 2459, + /* 750 */ 2482, 2266, 2461, 2295, 2290, 2485, 2486, 2297, 2298, 2304, + /* 760 */ 2303, 2487, 2458, 2198, 2377, 2378, 2382, 2387, 2462, 2466, + /* 770 */ 2394, 2452, 2398, 2454, 2401, 2400, 2474, 2475, 2403, 2405, + /* 780 */ 2407, 2408, 2409, 2477, 2463, 2467, 2411, 2480, 2233, 2445, + /* 790 */ 2424, 2501, 2423, 2506, 2427, 2429, 2534, 2513, 2255, 2511, + /* 800 */ 2520, 2521, 2523, 2524, 2526, 2448, 2449, 2516, 2281, 2536, + /* 810 */ 2528, 2580, 2581, 2468, 2540, 2469, 2470, 2472, 2473, 2404, + /* 820 */ 2479, 2589, 2546, 2410, 2591, 2481, 2488, 2412, 2548, 2414, + /* 830 */ 2562, 2483, 2332, 2492, 2599, 2588, 2367, 2495, 2496, 2498, + /* 840 */ 2499, 2500, 2504, 2508, 2509, 2565, 2512, 2514, 2573, 2510, + /* 850 */ 2606, 2376, 2517, 2519, 2631, 2522, 2525, 2438, 2592, 2527, + /* 860 */ 2535, 2245, 2584, 2529, 2532, 2549, 2533, 2537, 2539, 2619, + /* 870 */ 2621, 2628, 2434, 2550, 2615, 2633, 2552, 2554, 2637, 2559, + /* 880 */ 2567, 2645, 2498, 2568, 2650, 2499, 2574, 2655, 2500, 2582, + /* 890 */ 2664, 2504, 2566, 2569, 2570, 2571, 2586, 2670, 2593, 2674, + /* 900 */ 2598, 2670, 2670, 2692, 2646, 2649, 2703, 2691, 2693, 2694, + /* 910 */ 2698, 2699, 2700, 2701, 2702, 2704, 2705, 2706, 2657, 2634, + /* 920 */ 2662, 2636, 2695, 2710, 2711, 2713, 2729, 2717, 2719, 2720, + /* 930 */ 2675, 2344, 2722, 2366, 2723, 2724, 2725, 2726, 2741, 2728, + /* 940 */ 2765, 2730, 2714, 2727, 2769, 2737, 2721, 2732, 2774, 2742, + /* 950 */ 2731, 2736, 2781, 2747, 2743, 2740, 2798, 2764, 2801, 2780, + /* 960 */ 2776, 2814, 2793, 2783, 2786, 2787, 2795, 2803, 2797, 2809, + /* 970 */ 2812, 2815, }; -#define YY_REDUCE_COUNT (386) -#define YY_REDUCE_MIN (-518) -#define YY_REDUCE_MAX (2785) +#define YY_REDUCE_COUNT (388) +#define YY_REDUCE_MIN (-502) +#define YY_REDUCE_MAX (2542) static const short yy_reduce_ofst[] = { - /* 0 */ 638, -351, -264, 115, 375, 418, 445, 589, 675, 711, - /* 10 */ 194, 849, 896, 1033, 1242, 1271, 1369, 1393, 1462, 1479, - /* 20 */ 1559, 1652, 1731, 1750, 1774, 1819, 1871, 1909, 1939, 1956, - /* 30 */ 2033, 2067, 2096, 2190, 2214, 2229, 2259, 2311, 2347, 2377, - /* 40 */ 2394, 2471, 2505, 2534, 2595, 2628, 2705, 2722, 2748, 2785, - /* 50 */ -348, -338, 813, -383, -341, 472, 694, 885, -296, -231, - /* 60 */ 913, 484, -518, 150, 332, -511, -301, -318, -406, -354, - /* 70 */ 145, -376, 266, -419, 218, -196, -61, -436, -381, 245, - /* 80 */ -236, 506, -320, -294, 310, 466, 496, -253, 236, 595, - /* 90 */ 599, 601, 680, 407, -48, -182, -364, 697, 718, -175, - /* 100 */ -299, 727, 555, 749, -410, 761, 783, 785, 797, 172, - /* 110 */ 801, 833, 478, 835, -76, 480, 513, 842, 308, -506, - /* 120 */ -506, 20, -185, 168, -369, -516, -289, -265, 159, 465, - /* 130 */ 467, 597, 678, 725, 763, 777, 800, 838, 879, 881, - /* 140 */ 882, 883, 887, 888, 889, 891, 77, 152, 88, 618, - /* 150 */ 853, 855, 858, 152, 360, 642, -16, 339, 859, 453, - /* 160 */ 866, -19, 353, 608, 839, 845, 564, 862, 209, 893, - /* 170 */ 911, 927, 941, 933, 996, 553, 827, 997, 1031, 1047, - /* 180 */ 1049, 766, 871, 768, 1063, 977, 977, 946, 974, 1000, - /* 190 */ 1019, 1158, 977, 1190, 1190, 1210, 1212, 1175, 1235, 1180, - /* 200 */ 1090, 1092, 1093, 1169, 1095, 1190, 1243, 1154, 1192, 1248, - /* 210 */ 1207, 1174, 1196, 1197, 1190, 1123, 1124, 1104, 1140, 1126, - /* 220 */ 1246, 1193, 1181, 1283, 1202, 1201, 1282, 1208, 1284, 1220, - /* 230 */ 1297, 1298, 1247, 1302, 1250, 1251, 1306, 1307, 1309, 1257, - /* 240 */ 1259, 1261, 1262, 1304, 1308, 1319, 1321, 1312, 1324, 1325, - /* 250 */ 1326, 1335, 1337, 1339, 1340, 1252, 1330, 1331, 1303, 1342, - /* 260 */ 1351, 1285, 1346, 1356, 1353, 1314, 1357, 1318, 1359, 1371, - /* 270 */ 1382, 1375, 1390, 1362, 1363, 1364, 1368, 1370, 1373, 1377, - /* 280 */ 1378, 1379, 1380, 1384, 1386, 1396, 1397, 1402, 1355, 1360, - /* 290 */ 1383, 1313, 1332, 1320, 1410, 1336, 1348, 1347, 1387, 1428, - /* 300 */ 1385, 1430, 1401, 1299, 1394, 1315, 1398, 1311, 1317, 1341, - /* 310 */ 1327, 1344, 1343, 1412, 1381, 1361, 1328, 1345, 1349, 1504, - /* 320 */ 1407, 1388, 1392, 1513, 1507, 1511, 1451, 1466, 1475, 1477, - /* 330 */ 1478, 1453, 1484, 1465, 1523, 1486, 1480, 1526, 1419, 1490, - /* 340 */ 1482, 1492, 1531, 1524, 1543, 1551, 1514, 1516, 1528, 1529, - /* 350 */ 1542, 1545, 1546, 1547, 1554, 1556, 1557, 1558, 1560, 1562, - /* 360 */ 1563, 1564, 1565, 1566, 1567, 1568, 1571, 1572, 1522, 1573, - /* 370 */ 1576, 1561, 1580, 1583, 1578, 1519, 1588, 1534, 1500, 1548, - /* 380 */ 1581, 1591, 1602, 1589, 1604, 1592, 1603, + /* 0 */ -66, -338, -147, 159, 192, 330, 418, 452, 591, 714, + /* 10 */ 777, 941, 973, 1210, 1275, 1304, 1345, 1384, 1415, 1497, + /* 20 */ 1537, 1562, 1628, 1650, 1670, 1733, 1755, 1775, 1802, 1883, + /* 30 */ 1907, 1928, 1948, 1970, 2033, 2053, 2075, 2158, 2180, 2197, + /* 40 */ 2221, 2291, 2308, 2330, 2371, 2396, 2413, 2476, 2518, 2542, + /* 50 */ -340, -355, -183, -191, -442, 350, 459, 471, -334, 630, + /* 60 */ 872, 241, -488, -159, 365, -445, -44, 117, -411, 206, + /* 70 */ 398, -378, 450, -254, 213, -390, -388, -350, -256, -431, + /* 80 */ 287, 376, 427, -361, 95, 495, 526, -169, 505, 549, + /* 90 */ 575, 583, 598, 533, -11, -241, 439, 614, 682, -198, + /* 100 */ 317, 711, 230, 769, -87, 771, 780, 792, 803, 645, + /* 110 */ 842, 844, 810, 848, 296, 823, 834, 856, -60, -502, + /* 120 */ -502, -277, -424, 48, -324, -360, -65, 281, 472, 499, + /* 130 */ 565, 577, 581, 715, 743, 827, 843, 880, 883, 901, + /* 140 */ 946, 952, 954, 955, 959, 962, -237, -273, -105, 322, + /* 150 */ 659, 708, 762, -273, 231, 466, 143, 362, -319, 198, + /* 160 */ 794, -232, 193, 610, 138, 464, 429, 897, 122, 894, + /* 170 */ 905, 935, 945, 733, 809, -410, 460, 597, 669, 674, + /* 180 */ 686, 805, 925, 1035, 980, 968, 968, 948, 963, 974, + /* 190 */ 989, 1118, 968, 1094, 1094, 1116, 1122, 1107, 1195, 1141, + /* 200 */ 1075, 1077, 1080, 1159, 1082, 1094, 1232, 1146, 1183, 1241, + /* 210 */ 1199, 1165, 1187, 1188, 1094, 1114, 1125, 1105, 1140, 1126, + /* 220 */ 1246, 1193, 1175, 1278, 1191, 1190, 1272, 1200, 1274, 1211, + /* 230 */ 1288, 1290, 1238, 1292, 1240, 1245, 1297, 1298, 1300, 1244, + /* 240 */ 1251, 1256, 1265, 1308, 1313, 1319, 1323, 1316, 1330, 1332, + /* 250 */ 1338, 1347, 1344, 1352, 1350, 1268, 1341, 1348, 1314, 1349, + /* 260 */ 1370, 1295, 1364, 1381, 1372, 1321, 1382, 1336, 1387, 1389, + /* 270 */ 1388, 1390, 1410, 1383, 1385, 1386, 1391, 1392, 1395, 1396, + /* 280 */ 1397, 1399, 1401, 1403, 1402, 1421, 1430, 1424, 1394, 1411, + /* 290 */ 1412, 1339, 1351, 1356, 1429, 1359, 1374, 1393, 1416, 1454, + /* 300 */ 1406, 1459, 1420, 1324, 1404, 1326, 1408, 1327, 1331, 1340, + /* 310 */ 1337, 1354, 1357, 1422, 1368, 1362, 1342, 1358, 1355, 1502, + /* 320 */ 1407, 1375, 1400, 1519, 1518, 1521, 1458, 1464, 1484, 1485, + /* 330 */ 1488, 1471, 1489, 1478, 1529, 1495, 1487, 1538, 1432, 1505, + /* 340 */ 1498, 1500, 1553, 1536, 1555, 1563, 1511, 1520, 1522, 1523, + /* 350 */ 1524, 1525, 1526, 1527, 1528, 1532, 1533, 1535, 1540, 1541, + /* 360 */ 1542, 1543, 1544, 1551, 1560, 1565, 1567, 1568, 1545, 1572, + /* 370 */ 1581, 1585, 1606, 1624, 1626, 1627, 1629, 1548, 1589, 1539, + /* 380 */ 1561, 1556, 1559, 1604, 1612, 1594, 1620, 1639, 1644, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 10 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 20 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 30 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 40 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 50 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 60 */ 2552, 2183, 2183, 2508, 2183, 2183, 2183, 2183, 2183, 2183, - /* 70 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2515, 2183, - /* 80 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 90 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2285, - /* 100 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 110 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2283, 2804, - /* 120 */ 2183, 2930, 2593, 2183, 2183, 2833, 2183, 2183, 2183, 2183, - /* 130 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 140 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2816, 2183, 2183, - /* 150 */ 2256, 2256, 2183, 2816, 2816, 2816, 2776, 2776, 2283, 2183, - /* 160 */ 2183, 2285, 2183, 2595, 2183, 2183, 2183, 2183, 2183, 2183, - /* 170 */ 2183, 2183, 2183, 2425, 2213, 2183, 2183, 2183, 2183, 2183, - /* 180 */ 2183, 2578, 2183, 2183, 2862, 2808, 2809, 2924, 2183, 2865, - /* 190 */ 2827, 2183, 2822, 2183, 2183, 2183, 2183, 2520, 2183, 2852, - /* 200 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2621, 2183, 2183, - /* 210 */ 2370, 2572, 2183, 2183, 2183, 2183, 2183, 2908, 2806, 2846, - /* 220 */ 2183, 2856, 2183, 2183, 2183, 2609, 2285, 2183, 2285, 2565, - /* 230 */ 2503, 2183, 2513, 2183, 2513, 2510, 2183, 2183, 2183, 2513, - /* 240 */ 2510, 2510, 2510, 2359, 2355, 2183, 2183, 2353, 2183, 2183, - /* 250 */ 2183, 2183, 2239, 2183, 2239, 2183, 2285, 2285, 2183, 2285, - /* 260 */ 2183, 2183, 2285, 2183, 2285, 2183, 2285, 2183, 2285, 2285, - /* 270 */ 2183, 2285, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 280 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 290 */ 2183, 2607, 2588, 2183, 2283, 2183, 2576, 2574, 2183, 2283, - /* 300 */ 2856, 2183, 2183, 2878, 2873, 2878, 2873, 2892, 2888, 2878, - /* 310 */ 2897, 2894, 2858, 2856, 2839, 2835, 2927, 2914, 2910, 2183, - /* 320 */ 2183, 2844, 2842, 2183, 2283, 2283, 2873, 2183, 2183, 2183, - /* 330 */ 2183, 2873, 2183, 2183, 2283, 2183, 2183, 2283, 2183, 2183, - /* 340 */ 2183, 2183, 2283, 2183, 2283, 2183, 2183, 2183, 2183, 2183, - /* 350 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 360 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2387, 2183, - /* 370 */ 2183, 2283, 2183, 2223, 2183, 2567, 2930, 2593, 2598, 2548, - /* 380 */ 2548, 2428, 2428, 2930, 2428, 2286, 2188, 2183, 2183, 2183, - /* 390 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2891, - /* 400 */ 2890, 2727, 2183, 2780, 2779, 2778, 2769, 2726, 2383, 2183, - /* 410 */ 2183, 2183, 2725, 2724, 2183, 2183, 2183, 2183, 2374, 2371, - /* 420 */ 2183, 2183, 2396, 2183, 2183, 2183, 2183, 2539, 2538, 2718, - /* 430 */ 2183, 2183, 2719, 2717, 2716, 2183, 2183, 2183, 2183, 2183, - /* 440 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 450 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 460 */ 2183, 2183, 2911, 2915, 2183, 2183, 2183, 2805, 2183, 2183, - /* 470 */ 2183, 2697, 2183, 2183, 2183, 2183, 2665, 2660, 2651, 2642, - /* 480 */ 2657, 2648, 2636, 2654, 2645, 2633, 2630, 2183, 2183, 2183, - /* 490 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 500 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 510 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 520 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 530 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 540 */ 2183, 2183, 2183, 2509, 2183, 2183, 2183, 2183, 2183, 2183, - /* 550 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 560 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 570 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 580 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 590 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 600 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2524, 2183, - /* 610 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 620 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 630 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 640 */ 2183, 2183, 2228, 2704, 2183, 2183, 2183, 2183, 2183, 2183, - /* 650 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2707, 2183, 2183, - /* 660 */ 2708, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 670 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 680 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 690 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 700 */ 2183, 2183, 2183, 2330, 2329, 2183, 2183, 2183, 2183, 2183, - /* 710 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 720 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 730 */ 2183, 2183, 2183, 2709, 2183, 2183, 2183, 2183, 2592, 2183, - /* 740 */ 2183, 2699, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 750 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2907, 2859, - /* 760 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 770 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 780 */ 2183, 2183, 2697, 2183, 2889, 2183, 2183, 2183, 2183, 2183, - /* 790 */ 2183, 2183, 2905, 2183, 2909, 2183, 2183, 2183, 2183, 2183, - /* 800 */ 2183, 2183, 2815, 2811, 2183, 2183, 2807, 2183, 2183, 2183, - /* 810 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 820 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2766, 2183, 2183, - /* 830 */ 2183, 2800, 2183, 2183, 2183, 2183, 2424, 2423, 2422, 2421, - /* 840 */ 2183, 2183, 2183, 2183, 2183, 2183, 2709, 2183, 2712, 2183, - /* 850 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2696, 2183, - /* 860 */ 2751, 2750, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 870 */ 2183, 2183, 2183, 2418, 2183, 2183, 2183, 2183, 2183, 2183, - /* 880 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2402, - /* 890 */ 2400, 2399, 2398, 2183, 2435, 2183, 2183, 2183, 2431, 2430, - /* 900 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 910 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2304, - /* 920 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2296, 2183, - /* 930 */ 2295, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 940 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 950 */ 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, - /* 960 */ 2212, 2183, 2183, 2183, 2183, 2183, 2183, + /* 0 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 10 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 20 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 30 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 40 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 50 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 60 */ 2569, 2195, 2195, 2525, 2195, 2195, 2195, 2195, 2195, 2195, + /* 70 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2532, 2195, + /* 80 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 90 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2301, + /* 100 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 110 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2299, 2821, + /* 120 */ 2195, 2947, 2610, 2195, 2195, 2850, 2195, 2195, 2195, 2195, + /* 130 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 140 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2833, 2195, 2195, + /* 150 */ 2272, 2272, 2195, 2833, 2833, 2833, 2793, 2793, 2299, 2195, + /* 160 */ 2195, 2301, 2195, 2612, 2195, 2195, 2195, 2195, 2195, 2195, + /* 170 */ 2195, 2195, 2195, 2441, 2225, 2195, 2195, 2195, 2195, 2195, + /* 180 */ 2195, 2595, 2195, 2195, 2879, 2825, 2826, 2941, 2195, 2882, + /* 190 */ 2844, 2195, 2839, 2195, 2195, 2195, 2195, 2537, 2195, 2869, + /* 200 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2638, 2195, 2195, + /* 210 */ 2386, 2589, 2195, 2195, 2195, 2195, 2195, 2925, 2823, 2863, + /* 220 */ 2195, 2873, 2195, 2195, 2195, 2626, 2301, 2195, 2301, 2582, + /* 230 */ 2520, 2195, 2530, 2195, 2530, 2527, 2195, 2195, 2195, 2530, + /* 240 */ 2527, 2527, 2527, 2375, 2371, 2195, 2195, 2369, 2195, 2195, + /* 250 */ 2195, 2195, 2255, 2195, 2255, 2195, 2301, 2301, 2195, 2301, + /* 260 */ 2195, 2195, 2301, 2195, 2301, 2195, 2301, 2195, 2301, 2301, + /* 270 */ 2195, 2301, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 280 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 290 */ 2195, 2624, 2605, 2195, 2299, 2195, 2593, 2591, 2195, 2299, + /* 300 */ 2873, 2195, 2195, 2895, 2890, 2895, 2890, 2909, 2905, 2895, + /* 310 */ 2914, 2911, 2875, 2873, 2856, 2852, 2944, 2931, 2927, 2195, + /* 320 */ 2195, 2861, 2859, 2195, 2299, 2299, 2890, 2195, 2195, 2195, + /* 330 */ 2195, 2890, 2195, 2195, 2299, 2195, 2195, 2299, 2195, 2195, + /* 340 */ 2195, 2195, 2299, 2195, 2299, 2195, 2195, 2195, 2195, 2195, + /* 350 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 360 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2403, 2195, + /* 370 */ 2195, 2299, 2195, 2227, 2229, 2239, 2195, 2584, 2947, 2610, + /* 380 */ 2615, 2565, 2565, 2444, 2444, 2947, 2444, 2302, 2200, 2195, + /* 390 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 400 */ 2195, 2908, 2907, 2744, 2195, 2797, 2796, 2795, 2786, 2743, + /* 410 */ 2399, 2195, 2195, 2195, 2742, 2741, 2195, 2195, 2195, 2195, + /* 420 */ 2390, 2387, 2195, 2195, 2412, 2195, 2195, 2195, 2195, 2556, + /* 430 */ 2555, 2735, 2195, 2195, 2736, 2734, 2733, 2195, 2195, 2195, + /* 440 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 450 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 460 */ 2195, 2195, 2195, 2195, 2195, 2928, 2932, 2195, 2195, 2195, + /* 470 */ 2822, 2195, 2195, 2195, 2714, 2195, 2195, 2195, 2195, 2682, + /* 480 */ 2677, 2668, 2659, 2674, 2665, 2653, 2671, 2662, 2650, 2647, + /* 490 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 500 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 510 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 520 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 530 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 540 */ 2195, 2195, 2195, 2195, 2195, 2195, 2526, 2195, 2195, 2195, + /* 550 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 560 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 570 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 580 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 590 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 600 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 610 */ 2195, 2541, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 620 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 630 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 640 */ 2195, 2195, 2195, 2195, 2195, 2244, 2721, 2195, 2195, 2195, + /* 650 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 660 */ 2724, 2195, 2195, 2725, 2195, 2195, 2195, 2195, 2195, 2195, + /* 670 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 680 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 690 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 700 */ 2195, 2195, 2195, 2195, 2195, 2195, 2346, 2345, 2195, 2195, + /* 710 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 720 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 730 */ 2195, 2195, 2195, 2195, 2195, 2195, 2726, 2195, 2195, 2195, + /* 740 */ 2195, 2609, 2195, 2195, 2716, 2195, 2195, 2195, 2195, 2195, + /* 750 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 760 */ 2195, 2924, 2876, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 770 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 780 */ 2195, 2195, 2195, 2195, 2195, 2714, 2195, 2906, 2195, 2195, + /* 790 */ 2195, 2195, 2195, 2195, 2195, 2922, 2195, 2926, 2195, 2195, + /* 800 */ 2195, 2195, 2195, 2195, 2195, 2832, 2828, 2195, 2195, 2824, + /* 810 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 820 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 830 */ 2783, 2195, 2195, 2195, 2817, 2195, 2195, 2195, 2195, 2440, + /* 840 */ 2439, 2438, 2437, 2195, 2195, 2195, 2195, 2195, 2195, 2726, + /* 850 */ 2195, 2729, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 860 */ 2195, 2713, 2195, 2768, 2767, 2195, 2195, 2195, 2195, 2195, + /* 870 */ 2195, 2195, 2195, 2195, 2195, 2195, 2434, 2195, 2195, 2195, + /* 880 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 890 */ 2195, 2195, 2418, 2416, 2415, 2414, 2195, 2451, 2195, 2195, + /* 900 */ 2195, 2447, 2446, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 910 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 920 */ 2195, 2195, 2320, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 930 */ 2195, 2312, 2195, 2311, 2195, 2195, 2195, 2195, 2195, 2195, + /* 940 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 950 */ 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, + /* 960 */ 2195, 2195, 2195, 2224, 2195, 2195, 2195, 2195, 2195, 2195, + /* 970 */ 2195, 2195, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1220,11 +1550,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* STATE => nothing */ 0, /* NK_COMMA => nothing */ 0, /* HOST => nothing */ + 0, /* IS_IMPORT => nothing */ + 0, /* NK_INTEGER => nothing */ + 0, /* CREATEDB => nothing */ 0, /* USER => nothing */ 0, /* ENABLE => nothing */ - 0, /* NK_INTEGER => nothing */ 0, /* SYSINFO => nothing */ - 0, /* CREATEDB => nothing */ 0, /* ADD => nothing */ 0, /* DROP => nothing */ 0, /* GRANT => nothing */ @@ -1297,7 +1628,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 326, /* END => ABORT */ + 327, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ @@ -1338,6 +1669,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* FIRST => nothing */ 0, /* LAST => nothing */ 0, /* SHOW => nothing */ + 0, /* FULL => nothing */ 0, /* PRIVILEGES => nothing */ 0, /* DATABASES => nothing */ 0, /* TABLES => nothing */ @@ -1352,7 +1684,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* CONNECTIONS => nothing */ 0, /* LICENCES => nothing */ 0, /* GRANTS => nothing */ - 0, /* FULL => nothing */ 0, /* LOGS => nothing */ 0, /* MACHINES => nothing */ 0, /* ENCRYPTIONS => nothing */ @@ -1369,7 +1700,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 326, /* VIEW => ABORT */ + 327, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1412,7 +1743,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* PAUSE => nothing */ 0, /* RESUME => nothing */ 0, /* PRIMARY => nothing */ - 326, /* KEY => ABORT */ + 327, /* KEY => ABORT */ 0, /* TRIGGER => nothing */ 0, /* AT_ONCE => nothing */ 0, /* WINDOW_CLOSE => nothing */ @@ -1476,7 +1807,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* LEFT => nothing */ 0, /* RIGHT => nothing */ 0, /* OUTER => nothing */ - 326, /* SEMI => ABORT */ + 327, /* SEMI => ABORT */ 0, /* ANTI => nothing */ 0, /* ASOF => nothing */ 0, /* WINDOW => nothing */ @@ -1512,53 +1843,53 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 326, /* AFTER => ABORT */ - 326, /* ATTACH => ABORT */ - 326, /* BEFORE => ABORT */ - 326, /* BEGIN => ABORT */ - 326, /* BITAND => ABORT */ - 326, /* BITNOT => ABORT */ - 326, /* BITOR => ABORT */ - 326, /* BLOCKS => ABORT */ - 326, /* CHANGE => ABORT */ - 326, /* COMMA => ABORT */ - 326, /* CONCAT => ABORT */ - 326, /* CONFLICT => ABORT */ - 326, /* COPY => ABORT */ - 326, /* DEFERRED => ABORT */ - 326, /* DELIMITERS => ABORT */ - 326, /* DETACH => ABORT */ - 326, /* DIVIDE => ABORT */ - 326, /* DOT => ABORT */ - 326, /* EACH => ABORT */ - 326, /* FAIL => ABORT */ - 326, /* FILE => ABORT */ - 326, /* FOR => ABORT */ - 326, /* GLOB => ABORT */ - 326, /* ID => ABORT */ - 326, /* IMMEDIATE => ABORT */ - 326, /* IMPORT => ABORT */ - 326, /* INITIALLY => ABORT */ - 326, /* INSTEAD => ABORT */ - 326, /* ISNULL => ABORT */ - 326, /* MODULES => ABORT */ - 326, /* NK_BITNOT => ABORT */ - 326, /* NK_SEMI => ABORT */ - 326, /* NOTNULL => ABORT */ - 326, /* OF => ABORT */ - 326, /* PLUS => ABORT */ - 326, /* PRIVILEGE => ABORT */ - 326, /* RAISE => ABORT */ - 326, /* RESTRICT => ABORT */ - 326, /* ROW => ABORT */ - 326, /* STAR => ABORT */ - 326, /* STATEMENT => ABORT */ - 326, /* STRICT => ABORT */ - 326, /* STRING => ABORT */ - 326, /* TIMES => ABORT */ - 326, /* VALUES => ABORT */ - 326, /* VARIABLE => ABORT */ - 326, /* WAL => ABORT */ + 327, /* AFTER => ABORT */ + 327, /* ATTACH => ABORT */ + 327, /* BEFORE => ABORT */ + 327, /* BEGIN => ABORT */ + 327, /* BITAND => ABORT */ + 327, /* BITNOT => ABORT */ + 327, /* BITOR => ABORT */ + 327, /* BLOCKS => ABORT */ + 327, /* CHANGE => ABORT */ + 327, /* COMMA => ABORT */ + 327, /* CONCAT => ABORT */ + 327, /* CONFLICT => ABORT */ + 327, /* COPY => ABORT */ + 327, /* DEFERRED => ABORT */ + 327, /* DELIMITERS => ABORT */ + 327, /* DETACH => ABORT */ + 327, /* DIVIDE => ABORT */ + 327, /* DOT => ABORT */ + 327, /* EACH => ABORT */ + 327, /* FAIL => ABORT */ + 327, /* FILE => ABORT */ + 327, /* FOR => ABORT */ + 327, /* GLOB => ABORT */ + 327, /* ID => ABORT */ + 327, /* IMMEDIATE => ABORT */ + 327, /* IMPORT => ABORT */ + 327, /* INITIALLY => ABORT */ + 327, /* INSTEAD => ABORT */ + 327, /* ISNULL => ABORT */ + 327, /* MODULES => ABORT */ + 327, /* NK_BITNOT => ABORT */ + 327, /* NK_SEMI => ABORT */ + 327, /* NOTNULL => ABORT */ + 327, /* OF => ABORT */ + 327, /* PLUS => ABORT */ + 327, /* PRIVILEGE => ABORT */ + 327, /* RAISE => ABORT */ + 327, /* RESTRICT => ABORT */ + 327, /* ROW => ABORT */ + 327, /* STAR => ABORT */ + 327, /* STATEMENT => ABORT */ + 327, /* STRICT => ABORT */ + 327, /* STRING => ABORT */ + 327, /* TIMES => ABORT */ + 327, /* VALUES => ABORT */ + 327, /* VARIABLE => ABORT */ + 327, /* WAL => ABORT */ 0, /* ENCODE => nothing */ 0, /* COMPRESS => nothing */ 0, /* LEVEL => nothing */ @@ -1613,6 +1944,7 @@ struct yyParser { }; typedef struct yyParser yyParser; +#include #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; @@ -1684,526 +2016,529 @@ static const char *const yyTokenName[] = { /* 32 */ "STATE", /* 33 */ "NK_COMMA", /* 34 */ "HOST", - /* 35 */ "USER", - /* 36 */ "ENABLE", - /* 37 */ "NK_INTEGER", - /* 38 */ "SYSINFO", - /* 39 */ "CREATEDB", - /* 40 */ "ADD", - /* 41 */ "DROP", - /* 42 */ "GRANT", - /* 43 */ "ON", - /* 44 */ "TO", - /* 45 */ "REVOKE", - /* 46 */ "FROM", - /* 47 */ "SUBSCRIBE", - /* 48 */ "READ", - /* 49 */ "WRITE", - /* 50 */ "NK_DOT", - /* 51 */ "WITH", - /* 52 */ "ENCRYPT_KEY", - /* 53 */ "DNODE", - /* 54 */ "PORT", - /* 55 */ "DNODES", - /* 56 */ "RESTORE", - /* 57 */ "NK_IPTOKEN", - /* 58 */ "FORCE", - /* 59 */ "UNSAFE", - /* 60 */ "CLUSTER", - /* 61 */ "LOCAL", - /* 62 */ "QNODE", - /* 63 */ "BNODE", - /* 64 */ "SNODE", - /* 65 */ "MNODE", - /* 66 */ "VNODE", - /* 67 */ "DATABASE", - /* 68 */ "USE", - /* 69 */ "FLUSH", - /* 70 */ "TRIM", - /* 71 */ "S3MIGRATE", - /* 72 */ "COMPACT", - /* 73 */ "IF", - /* 74 */ "NOT", - /* 75 */ "EXISTS", - /* 76 */ "BUFFER", - /* 77 */ "CACHEMODEL", - /* 78 */ "CACHESIZE", - /* 79 */ "COMP", - /* 80 */ "DURATION", - /* 81 */ "NK_VARIABLE", - /* 82 */ "MAXROWS", - /* 83 */ "MINROWS", - /* 84 */ "KEEP", - /* 85 */ "PAGES", - /* 86 */ "PAGESIZE", - /* 87 */ "TSDB_PAGESIZE", - /* 88 */ "PRECISION", - /* 89 */ "REPLICA", - /* 90 */ "VGROUPS", - /* 91 */ "SINGLE_STABLE", - /* 92 */ "RETENTIONS", - /* 93 */ "SCHEMALESS", - /* 94 */ "WAL_LEVEL", - /* 95 */ "WAL_FSYNC_PERIOD", - /* 96 */ "WAL_RETENTION_PERIOD", - /* 97 */ "WAL_RETENTION_SIZE", - /* 98 */ "WAL_ROLL_PERIOD", - /* 99 */ "WAL_SEGMENT_SIZE", - /* 100 */ "STT_TRIGGER", - /* 101 */ "TABLE_PREFIX", - /* 102 */ "TABLE_SUFFIX", - /* 103 */ "S3_CHUNKSIZE", - /* 104 */ "S3_KEEPLOCAL", - /* 105 */ "S3_COMPACT", - /* 106 */ "KEEP_TIME_OFFSET", - /* 107 */ "ENCRYPT_ALGORITHM", - /* 108 */ "NK_COLON", - /* 109 */ "BWLIMIT", - /* 110 */ "START", - /* 111 */ "TIMESTAMP", - /* 112 */ "END", - /* 113 */ "TABLE", - /* 114 */ "NK_LP", - /* 115 */ "NK_RP", - /* 116 */ "STABLE", - /* 117 */ "COLUMN", - /* 118 */ "MODIFY", - /* 119 */ "RENAME", - /* 120 */ "TAG", - /* 121 */ "SET", - /* 122 */ "NK_EQ", - /* 123 */ "USING", - /* 124 */ "TAGS", - /* 125 */ "BOOL", - /* 126 */ "TINYINT", - /* 127 */ "SMALLINT", - /* 128 */ "INT", - /* 129 */ "INTEGER", - /* 130 */ "BIGINT", - /* 131 */ "FLOAT", - /* 132 */ "DOUBLE", - /* 133 */ "BINARY", - /* 134 */ "NCHAR", - /* 135 */ "UNSIGNED", - /* 136 */ "JSON", - /* 137 */ "VARCHAR", - /* 138 */ "MEDIUMBLOB", - /* 139 */ "BLOB", - /* 140 */ "VARBINARY", - /* 141 */ "GEOMETRY", - /* 142 */ "DECIMAL", - /* 143 */ "COMMENT", - /* 144 */ "MAX_DELAY", - /* 145 */ "WATERMARK", - /* 146 */ "ROLLUP", - /* 147 */ "TTL", - /* 148 */ "SMA", - /* 149 */ "DELETE_MARK", - /* 150 */ "FIRST", - /* 151 */ "LAST", - /* 152 */ "SHOW", - /* 153 */ "PRIVILEGES", - /* 154 */ "DATABASES", - /* 155 */ "TABLES", - /* 156 */ "STABLES", - /* 157 */ "MNODES", - /* 158 */ "QNODES", - /* 159 */ "ARBGROUPS", - /* 160 */ "FUNCTIONS", - /* 161 */ "INDEXES", - /* 162 */ "ACCOUNTS", - /* 163 */ "APPS", - /* 164 */ "CONNECTIONS", - /* 165 */ "LICENCES", - /* 166 */ "GRANTS", - /* 167 */ "FULL", - /* 168 */ "LOGS", - /* 169 */ "MACHINES", - /* 170 */ "ENCRYPTIONS", - /* 171 */ "QUERIES", - /* 172 */ "SCORES", - /* 173 */ "TOPICS", - /* 174 */ "VARIABLES", - /* 175 */ "BNODES", - /* 176 */ "SNODES", - /* 177 */ "TRANSACTIONS", - /* 178 */ "DISTRIBUTED", - /* 179 */ "CONSUMERS", - /* 180 */ "SUBSCRIPTIONS", - /* 181 */ "VNODES", - /* 182 */ "ALIVE", - /* 183 */ "VIEWS", - /* 184 */ "VIEW", - /* 185 */ "COMPACTS", - /* 186 */ "NORMAL", - /* 187 */ "CHILD", - /* 188 */ "LIKE", - /* 189 */ "TBNAME", - /* 190 */ "QTAGS", - /* 191 */ "AS", - /* 192 */ "SYSTEM", - /* 193 */ "TSMA", - /* 194 */ "INTERVAL", - /* 195 */ "RECURSIVE", - /* 196 */ "TSMAS", - /* 197 */ "FUNCTION", - /* 198 */ "INDEX", - /* 199 */ "COUNT", - /* 200 */ "LAST_ROW", - /* 201 */ "META", - /* 202 */ "ONLY", - /* 203 */ "TOPIC", - /* 204 */ "CONSUMER", - /* 205 */ "GROUP", - /* 206 */ "DESC", - /* 207 */ "DESCRIBE", - /* 208 */ "RESET", - /* 209 */ "QUERY", - /* 210 */ "CACHE", - /* 211 */ "EXPLAIN", - /* 212 */ "ANALYZE", - /* 213 */ "VERBOSE", - /* 214 */ "NK_BOOL", - /* 215 */ "RATIO", - /* 216 */ "NK_FLOAT", - /* 217 */ "OUTPUTTYPE", - /* 218 */ "AGGREGATE", - /* 219 */ "BUFSIZE", - /* 220 */ "LANGUAGE", - /* 221 */ "REPLACE", - /* 222 */ "STREAM", - /* 223 */ "INTO", - /* 224 */ "PAUSE", - /* 225 */ "RESUME", - /* 226 */ "PRIMARY", - /* 227 */ "KEY", - /* 228 */ "TRIGGER", - /* 229 */ "AT_ONCE", - /* 230 */ "WINDOW_CLOSE", - /* 231 */ "IGNORE", - /* 232 */ "EXPIRED", - /* 233 */ "FILL_HISTORY", - /* 234 */ "UPDATE", - /* 235 */ "SUBTABLE", - /* 236 */ "UNTREATED", - /* 237 */ "KILL", - /* 238 */ "CONNECTION", - /* 239 */ "TRANSACTION", - /* 240 */ "BALANCE", - /* 241 */ "VGROUP", - /* 242 */ "LEADER", - /* 243 */ "MERGE", - /* 244 */ "REDISTRIBUTE", - /* 245 */ "SPLIT", - /* 246 */ "DELETE", - /* 247 */ "INSERT", - /* 248 */ "NK_BIN", - /* 249 */ "NK_HEX", - /* 250 */ "NULL", - /* 251 */ "NK_QUESTION", - /* 252 */ "NK_ALIAS", - /* 253 */ "NK_ARROW", - /* 254 */ "ROWTS", - /* 255 */ "QSTART", - /* 256 */ "QEND", - /* 257 */ "QDURATION", - /* 258 */ "WSTART", - /* 259 */ "WEND", - /* 260 */ "WDURATION", - /* 261 */ "IROWTS", - /* 262 */ "ISFILLED", - /* 263 */ "CAST", - /* 264 */ "NOW", - /* 265 */ "TODAY", - /* 266 */ "TIMEZONE", - /* 267 */ "CLIENT_VERSION", - /* 268 */ "SERVER_VERSION", - /* 269 */ "SERVER_STATUS", - /* 270 */ "CURRENT_USER", - /* 271 */ "CASE", - /* 272 */ "WHEN", - /* 273 */ "THEN", - /* 274 */ "ELSE", - /* 275 */ "BETWEEN", - /* 276 */ "IS", - /* 277 */ "NK_LT", - /* 278 */ "NK_GT", - /* 279 */ "NK_LE", - /* 280 */ "NK_GE", - /* 281 */ "NK_NE", - /* 282 */ "MATCH", - /* 283 */ "NMATCH", - /* 284 */ "CONTAINS", - /* 285 */ "IN", - /* 286 */ "JOIN", - /* 287 */ "INNER", - /* 288 */ "LEFT", - /* 289 */ "RIGHT", - /* 290 */ "OUTER", - /* 291 */ "SEMI", - /* 292 */ "ANTI", - /* 293 */ "ASOF", - /* 294 */ "WINDOW", - /* 295 */ "WINDOW_OFFSET", - /* 296 */ "JLIMIT", - /* 297 */ "SELECT", - /* 298 */ "NK_HINT", - /* 299 */ "DISTINCT", - /* 300 */ "WHERE", - /* 301 */ "PARTITION", - /* 302 */ "BY", - /* 303 */ "SESSION", - /* 304 */ "STATE_WINDOW", - /* 305 */ "EVENT_WINDOW", - /* 306 */ "COUNT_WINDOW", - /* 307 */ "SLIDING", - /* 308 */ "FILL", - /* 309 */ "VALUE", - /* 310 */ "VALUE_F", - /* 311 */ "NONE", - /* 312 */ "PREV", - /* 313 */ "NULL_F", - /* 314 */ "LINEAR", - /* 315 */ "NEXT", - /* 316 */ "HAVING", - /* 317 */ "RANGE", - /* 318 */ "EVERY", - /* 319 */ "ORDER", - /* 320 */ "SLIMIT", - /* 321 */ "SOFFSET", - /* 322 */ "LIMIT", - /* 323 */ "OFFSET", - /* 324 */ "ASC", - /* 325 */ "NULLS", - /* 326 */ "ABORT", - /* 327 */ "AFTER", - /* 328 */ "ATTACH", - /* 329 */ "BEFORE", - /* 330 */ "BEGIN", - /* 331 */ "BITAND", - /* 332 */ "BITNOT", - /* 333 */ "BITOR", - /* 334 */ "BLOCKS", - /* 335 */ "CHANGE", - /* 336 */ "COMMA", - /* 337 */ "CONCAT", - /* 338 */ "CONFLICT", - /* 339 */ "COPY", - /* 340 */ "DEFERRED", - /* 341 */ "DELIMITERS", - /* 342 */ "DETACH", - /* 343 */ "DIVIDE", - /* 344 */ "DOT", - /* 345 */ "EACH", - /* 346 */ "FAIL", - /* 347 */ "FILE", - /* 348 */ "FOR", - /* 349 */ "GLOB", - /* 350 */ "ID", - /* 351 */ "IMMEDIATE", - /* 352 */ "IMPORT", - /* 353 */ "INITIALLY", - /* 354 */ "INSTEAD", - /* 355 */ "ISNULL", - /* 356 */ "MODULES", - /* 357 */ "NK_BITNOT", - /* 358 */ "NK_SEMI", - /* 359 */ "NOTNULL", - /* 360 */ "OF", - /* 361 */ "PLUS", - /* 362 */ "PRIVILEGE", - /* 363 */ "RAISE", - /* 364 */ "RESTRICT", - /* 365 */ "ROW", - /* 366 */ "STAR", - /* 367 */ "STATEMENT", - /* 368 */ "STRICT", - /* 369 */ "STRING", - /* 370 */ "TIMES", - /* 371 */ "VALUES", - /* 372 */ "VARIABLE", - /* 373 */ "WAL", - /* 374 */ "ENCODE", - /* 375 */ "COMPRESS", - /* 376 */ "LEVEL", - /* 377 */ "cmd", - /* 378 */ "account_options", - /* 379 */ "alter_account_options", - /* 380 */ "literal", - /* 381 */ "alter_account_option", - /* 382 */ "ip_range_list", - /* 383 */ "white_list", - /* 384 */ "white_list_opt", - /* 385 */ "user_name", - /* 386 */ "sysinfo_opt", - /* 387 */ "privileges", - /* 388 */ "priv_level", - /* 389 */ "with_opt", - /* 390 */ "priv_type_list", - /* 391 */ "priv_type", - /* 392 */ "db_name", - /* 393 */ "table_name", - /* 394 */ "topic_name", - /* 395 */ "search_condition", - /* 396 */ "dnode_endpoint", - /* 397 */ "force_opt", - /* 398 */ "unsafe_opt", - /* 399 */ "not_exists_opt", - /* 400 */ "db_options", - /* 401 */ "exists_opt", - /* 402 */ "alter_db_options", - /* 403 */ "speed_opt", - /* 404 */ "start_opt", - /* 405 */ "end_opt", - /* 406 */ "integer_list", - /* 407 */ "variable_list", - /* 408 */ "retention_list", - /* 409 */ "signed", - /* 410 */ "alter_db_option", - /* 411 */ "retention", - /* 412 */ "full_table_name", - /* 413 */ "column_def_list", - /* 414 */ "tags_def_opt", - /* 415 */ "table_options", - /* 416 */ "multi_create_clause", - /* 417 */ "tags_def", - /* 418 */ "multi_drop_clause", - /* 419 */ "alter_table_clause", - /* 420 */ "alter_table_options", - /* 421 */ "column_name", - /* 422 */ "type_name", - /* 423 */ "column_options", - /* 424 */ "tags_literal", - /* 425 */ "create_subtable_clause", - /* 426 */ "specific_cols_opt", - /* 427 */ "tags_literal_list", - /* 428 */ "drop_table_clause", - /* 429 */ "col_name_list", - /* 430 */ "tag_def_list", - /* 431 */ "tag_def", - /* 432 */ "column_def", - /* 433 */ "type_name_default_len", - /* 434 */ "duration_list", - /* 435 */ "rollup_func_list", - /* 436 */ "alter_table_option", - /* 437 */ "duration_literal", - /* 438 */ "rollup_func_name", - /* 439 */ "function_name", - /* 440 */ "col_name", - /* 441 */ "db_kind_opt", - /* 442 */ "table_kind_db_name_cond_opt", - /* 443 */ "like_pattern_opt", - /* 444 */ "db_name_cond_opt", - /* 445 */ "table_name_cond", - /* 446 */ "from_db_opt", - /* 447 */ "tag_list_opt", - /* 448 */ "table_kind", - /* 449 */ "tag_item", - /* 450 */ "column_alias", - /* 451 */ "tsma_name", - /* 452 */ "tsma_func_list", - /* 453 */ "full_tsma_name", - /* 454 */ "func_list", - /* 455 */ "index_options", - /* 456 */ "full_index_name", - /* 457 */ "index_name", - /* 458 */ "sliding_opt", - /* 459 */ "sma_stream_opt", - /* 460 */ "func", - /* 461 */ "sma_func_name", - /* 462 */ "expression_list", - /* 463 */ "with_meta", - /* 464 */ "query_or_subquery", - /* 465 */ "where_clause_opt", - /* 466 */ "cgroup_name", - /* 467 */ "analyze_opt", - /* 468 */ "explain_options", - /* 469 */ "insert_query", - /* 470 */ "or_replace_opt", - /* 471 */ "agg_func_opt", - /* 472 */ "bufsize_opt", - /* 473 */ "language_opt", - /* 474 */ "full_view_name", - /* 475 */ "view_name", - /* 476 */ "stream_name", - /* 477 */ "stream_options", - /* 478 */ "col_list_opt", - /* 479 */ "tag_def_or_ref_opt", - /* 480 */ "subtable_opt", - /* 481 */ "ignore_opt", - /* 482 */ "column_stream_def_list", - /* 483 */ "column_stream_def", - /* 484 */ "stream_col_options", - /* 485 */ "expression", - /* 486 */ "on_vgroup_id", - /* 487 */ "dnode_list", - /* 488 */ "literal_func", - /* 489 */ "signed_literal", - /* 490 */ "literal_list", - /* 491 */ "table_alias", - /* 492 */ "expr_or_subquery", - /* 493 */ "pseudo_column", - /* 494 */ "column_reference", - /* 495 */ "function_expression", - /* 496 */ "case_when_expression", - /* 497 */ "star_func", - /* 498 */ "star_func_para_list", - /* 499 */ "noarg_func", - /* 500 */ "other_para_list", - /* 501 */ "star_func_para", - /* 502 */ "when_then_list", - /* 503 */ "case_when_else_opt", - /* 504 */ "common_expression", - /* 505 */ "when_then_expr", - /* 506 */ "predicate", - /* 507 */ "compare_op", - /* 508 */ "in_op", - /* 509 */ "in_predicate_value", - /* 510 */ "boolean_value_expression", - /* 511 */ "boolean_primary", - /* 512 */ "from_clause_opt", - /* 513 */ "table_reference_list", - /* 514 */ "table_reference", - /* 515 */ "table_primary", - /* 516 */ "joined_table", - /* 517 */ "alias_opt", - /* 518 */ "subquery", - /* 519 */ "parenthesized_joined_table", - /* 520 */ "join_type", - /* 521 */ "join_subtype", - /* 522 */ "join_on_clause_opt", - /* 523 */ "window_offset_clause_opt", - /* 524 */ "jlimit_clause_opt", - /* 525 */ "window_offset_literal", - /* 526 */ "query_specification", - /* 527 */ "hint_list", - /* 528 */ "set_quantifier_opt", - /* 529 */ "tag_mode_opt", - /* 530 */ "select_list", - /* 531 */ "partition_by_clause_opt", - /* 532 */ "range_opt", - /* 533 */ "every_opt", - /* 534 */ "fill_opt", - /* 535 */ "twindow_clause_opt", - /* 536 */ "group_by_clause_opt", - /* 537 */ "having_clause_opt", - /* 538 */ "select_item", - /* 539 */ "partition_list", - /* 540 */ "partition_item", - /* 541 */ "interval_sliding_duration_literal", - /* 542 */ "fill_mode", - /* 543 */ "group_by_list", - /* 544 */ "query_expression", - /* 545 */ "query_simple", - /* 546 */ "order_by_clause_opt", - /* 547 */ "slimit_clause_opt", - /* 548 */ "limit_clause_opt", - /* 549 */ "union_query_expression", - /* 550 */ "query_simple_or_subquery", - /* 551 */ "sort_specification_list", - /* 552 */ "sort_specification", - /* 553 */ "ordering_specification_opt", - /* 554 */ "null_ordering_opt", + /* 35 */ "IS_IMPORT", + /* 36 */ "NK_INTEGER", + /* 37 */ "CREATEDB", + /* 38 */ "USER", + /* 39 */ "ENABLE", + /* 40 */ "SYSINFO", + /* 41 */ "ADD", + /* 42 */ "DROP", + /* 43 */ "GRANT", + /* 44 */ "ON", + /* 45 */ "TO", + /* 46 */ "REVOKE", + /* 47 */ "FROM", + /* 48 */ "SUBSCRIBE", + /* 49 */ "READ", + /* 50 */ "WRITE", + /* 51 */ "NK_DOT", + /* 52 */ "WITH", + /* 53 */ "ENCRYPT_KEY", + /* 54 */ "DNODE", + /* 55 */ "PORT", + /* 56 */ "DNODES", + /* 57 */ "RESTORE", + /* 58 */ "NK_IPTOKEN", + /* 59 */ "FORCE", + /* 60 */ "UNSAFE", + /* 61 */ "CLUSTER", + /* 62 */ "LOCAL", + /* 63 */ "QNODE", + /* 64 */ "BNODE", + /* 65 */ "SNODE", + /* 66 */ "MNODE", + /* 67 */ "VNODE", + /* 68 */ "DATABASE", + /* 69 */ "USE", + /* 70 */ "FLUSH", + /* 71 */ "TRIM", + /* 72 */ "S3MIGRATE", + /* 73 */ "COMPACT", + /* 74 */ "IF", + /* 75 */ "NOT", + /* 76 */ "EXISTS", + /* 77 */ "BUFFER", + /* 78 */ "CACHEMODEL", + /* 79 */ "CACHESIZE", + /* 80 */ "COMP", + /* 81 */ "DURATION", + /* 82 */ "NK_VARIABLE", + /* 83 */ "MAXROWS", + /* 84 */ "MINROWS", + /* 85 */ "KEEP", + /* 86 */ "PAGES", + /* 87 */ "PAGESIZE", + /* 88 */ "TSDB_PAGESIZE", + /* 89 */ "PRECISION", + /* 90 */ "REPLICA", + /* 91 */ "VGROUPS", + /* 92 */ "SINGLE_STABLE", + /* 93 */ "RETENTIONS", + /* 94 */ "SCHEMALESS", + /* 95 */ "WAL_LEVEL", + /* 96 */ "WAL_FSYNC_PERIOD", + /* 97 */ "WAL_RETENTION_PERIOD", + /* 98 */ "WAL_RETENTION_SIZE", + /* 99 */ "WAL_ROLL_PERIOD", + /* 100 */ "WAL_SEGMENT_SIZE", + /* 101 */ "STT_TRIGGER", + /* 102 */ "TABLE_PREFIX", + /* 103 */ "TABLE_SUFFIX", + /* 104 */ "S3_CHUNKSIZE", + /* 105 */ "S3_KEEPLOCAL", + /* 106 */ "S3_COMPACT", + /* 107 */ "KEEP_TIME_OFFSET", + /* 108 */ "ENCRYPT_ALGORITHM", + /* 109 */ "NK_COLON", + /* 110 */ "BWLIMIT", + /* 111 */ "START", + /* 112 */ "TIMESTAMP", + /* 113 */ "END", + /* 114 */ "TABLE", + /* 115 */ "NK_LP", + /* 116 */ "NK_RP", + /* 117 */ "STABLE", + /* 118 */ "COLUMN", + /* 119 */ "MODIFY", + /* 120 */ "RENAME", + /* 121 */ "TAG", + /* 122 */ "SET", + /* 123 */ "NK_EQ", + /* 124 */ "USING", + /* 125 */ "TAGS", + /* 126 */ "BOOL", + /* 127 */ "TINYINT", + /* 128 */ "SMALLINT", + /* 129 */ "INT", + /* 130 */ "INTEGER", + /* 131 */ "BIGINT", + /* 132 */ "FLOAT", + /* 133 */ "DOUBLE", + /* 134 */ "BINARY", + /* 135 */ "NCHAR", + /* 136 */ "UNSIGNED", + /* 137 */ "JSON", + /* 138 */ "VARCHAR", + /* 139 */ "MEDIUMBLOB", + /* 140 */ "BLOB", + /* 141 */ "VARBINARY", + /* 142 */ "GEOMETRY", + /* 143 */ "DECIMAL", + /* 144 */ "COMMENT", + /* 145 */ "MAX_DELAY", + /* 146 */ "WATERMARK", + /* 147 */ "ROLLUP", + /* 148 */ "TTL", + /* 149 */ "SMA", + /* 150 */ "DELETE_MARK", + /* 151 */ "FIRST", + /* 152 */ "LAST", + /* 153 */ "SHOW", + /* 154 */ "FULL", + /* 155 */ "PRIVILEGES", + /* 156 */ "DATABASES", + /* 157 */ "TABLES", + /* 158 */ "STABLES", + /* 159 */ "MNODES", + /* 160 */ "QNODES", + /* 161 */ "ARBGROUPS", + /* 162 */ "FUNCTIONS", + /* 163 */ "INDEXES", + /* 164 */ "ACCOUNTS", + /* 165 */ "APPS", + /* 166 */ "CONNECTIONS", + /* 167 */ "LICENCES", + /* 168 */ "GRANTS", + /* 169 */ "LOGS", + /* 170 */ "MACHINES", + /* 171 */ "ENCRYPTIONS", + /* 172 */ "QUERIES", + /* 173 */ "SCORES", + /* 174 */ "TOPICS", + /* 175 */ "VARIABLES", + /* 176 */ "BNODES", + /* 177 */ "SNODES", + /* 178 */ "TRANSACTIONS", + /* 179 */ "DISTRIBUTED", + /* 180 */ "CONSUMERS", + /* 181 */ "SUBSCRIPTIONS", + /* 182 */ "VNODES", + /* 183 */ "ALIVE", + /* 184 */ "VIEWS", + /* 185 */ "VIEW", + /* 186 */ "COMPACTS", + /* 187 */ "NORMAL", + /* 188 */ "CHILD", + /* 189 */ "LIKE", + /* 190 */ "TBNAME", + /* 191 */ "QTAGS", + /* 192 */ "AS", + /* 193 */ "SYSTEM", + /* 194 */ "TSMA", + /* 195 */ "INTERVAL", + /* 196 */ "RECURSIVE", + /* 197 */ "TSMAS", + /* 198 */ "FUNCTION", + /* 199 */ "INDEX", + /* 200 */ "COUNT", + /* 201 */ "LAST_ROW", + /* 202 */ "META", + /* 203 */ "ONLY", + /* 204 */ "TOPIC", + /* 205 */ "CONSUMER", + /* 206 */ "GROUP", + /* 207 */ "DESC", + /* 208 */ "DESCRIBE", + /* 209 */ "RESET", + /* 210 */ "QUERY", + /* 211 */ "CACHE", + /* 212 */ "EXPLAIN", + /* 213 */ "ANALYZE", + /* 214 */ "VERBOSE", + /* 215 */ "NK_BOOL", + /* 216 */ "RATIO", + /* 217 */ "NK_FLOAT", + /* 218 */ "OUTPUTTYPE", + /* 219 */ "AGGREGATE", + /* 220 */ "BUFSIZE", + /* 221 */ "LANGUAGE", + /* 222 */ "REPLACE", + /* 223 */ "STREAM", + /* 224 */ "INTO", + /* 225 */ "PAUSE", + /* 226 */ "RESUME", + /* 227 */ "PRIMARY", + /* 228 */ "KEY", + /* 229 */ "TRIGGER", + /* 230 */ "AT_ONCE", + /* 231 */ "WINDOW_CLOSE", + /* 232 */ "IGNORE", + /* 233 */ "EXPIRED", + /* 234 */ "FILL_HISTORY", + /* 235 */ "UPDATE", + /* 236 */ "SUBTABLE", + /* 237 */ "UNTREATED", + /* 238 */ "KILL", + /* 239 */ "CONNECTION", + /* 240 */ "TRANSACTION", + /* 241 */ "BALANCE", + /* 242 */ "VGROUP", + /* 243 */ "LEADER", + /* 244 */ "MERGE", + /* 245 */ "REDISTRIBUTE", + /* 246 */ "SPLIT", + /* 247 */ "DELETE", + /* 248 */ "INSERT", + /* 249 */ "NK_BIN", + /* 250 */ "NK_HEX", + /* 251 */ "NULL", + /* 252 */ "NK_QUESTION", + /* 253 */ "NK_ALIAS", + /* 254 */ "NK_ARROW", + /* 255 */ "ROWTS", + /* 256 */ "QSTART", + /* 257 */ "QEND", + /* 258 */ "QDURATION", + /* 259 */ "WSTART", + /* 260 */ "WEND", + /* 261 */ "WDURATION", + /* 262 */ "IROWTS", + /* 263 */ "ISFILLED", + /* 264 */ "CAST", + /* 265 */ "NOW", + /* 266 */ "TODAY", + /* 267 */ "TIMEZONE", + /* 268 */ "CLIENT_VERSION", + /* 269 */ "SERVER_VERSION", + /* 270 */ "SERVER_STATUS", + /* 271 */ "CURRENT_USER", + /* 272 */ "CASE", + /* 273 */ "WHEN", + /* 274 */ "THEN", + /* 275 */ "ELSE", + /* 276 */ "BETWEEN", + /* 277 */ "IS", + /* 278 */ "NK_LT", + /* 279 */ "NK_GT", + /* 280 */ "NK_LE", + /* 281 */ "NK_GE", + /* 282 */ "NK_NE", + /* 283 */ "MATCH", + /* 284 */ "NMATCH", + /* 285 */ "CONTAINS", + /* 286 */ "IN", + /* 287 */ "JOIN", + /* 288 */ "INNER", + /* 289 */ "LEFT", + /* 290 */ "RIGHT", + /* 291 */ "OUTER", + /* 292 */ "SEMI", + /* 293 */ "ANTI", + /* 294 */ "ASOF", + /* 295 */ "WINDOW", + /* 296 */ "WINDOW_OFFSET", + /* 297 */ "JLIMIT", + /* 298 */ "SELECT", + /* 299 */ "NK_HINT", + /* 300 */ "DISTINCT", + /* 301 */ "WHERE", + /* 302 */ "PARTITION", + /* 303 */ "BY", + /* 304 */ "SESSION", + /* 305 */ "STATE_WINDOW", + /* 306 */ "EVENT_WINDOW", + /* 307 */ "COUNT_WINDOW", + /* 308 */ "SLIDING", + /* 309 */ "FILL", + /* 310 */ "VALUE", + /* 311 */ "VALUE_F", + /* 312 */ "NONE", + /* 313 */ "PREV", + /* 314 */ "NULL_F", + /* 315 */ "LINEAR", + /* 316 */ "NEXT", + /* 317 */ "HAVING", + /* 318 */ "RANGE", + /* 319 */ "EVERY", + /* 320 */ "ORDER", + /* 321 */ "SLIMIT", + /* 322 */ "SOFFSET", + /* 323 */ "LIMIT", + /* 324 */ "OFFSET", + /* 325 */ "ASC", + /* 326 */ "NULLS", + /* 327 */ "ABORT", + /* 328 */ "AFTER", + /* 329 */ "ATTACH", + /* 330 */ "BEFORE", + /* 331 */ "BEGIN", + /* 332 */ "BITAND", + /* 333 */ "BITNOT", + /* 334 */ "BITOR", + /* 335 */ "BLOCKS", + /* 336 */ "CHANGE", + /* 337 */ "COMMA", + /* 338 */ "CONCAT", + /* 339 */ "CONFLICT", + /* 340 */ "COPY", + /* 341 */ "DEFERRED", + /* 342 */ "DELIMITERS", + /* 343 */ "DETACH", + /* 344 */ "DIVIDE", + /* 345 */ "DOT", + /* 346 */ "EACH", + /* 347 */ "FAIL", + /* 348 */ "FILE", + /* 349 */ "FOR", + /* 350 */ "GLOB", + /* 351 */ "ID", + /* 352 */ "IMMEDIATE", + /* 353 */ "IMPORT", + /* 354 */ "INITIALLY", + /* 355 */ "INSTEAD", + /* 356 */ "ISNULL", + /* 357 */ "MODULES", + /* 358 */ "NK_BITNOT", + /* 359 */ "NK_SEMI", + /* 360 */ "NOTNULL", + /* 361 */ "OF", + /* 362 */ "PLUS", + /* 363 */ "PRIVILEGE", + /* 364 */ "RAISE", + /* 365 */ "RESTRICT", + /* 366 */ "ROW", + /* 367 */ "STAR", + /* 368 */ "STATEMENT", + /* 369 */ "STRICT", + /* 370 */ "STRING", + /* 371 */ "TIMES", + /* 372 */ "VALUES", + /* 373 */ "VARIABLE", + /* 374 */ "WAL", + /* 375 */ "ENCODE", + /* 376 */ "COMPRESS", + /* 377 */ "LEVEL", + /* 378 */ "cmd", + /* 379 */ "account_options", + /* 380 */ "alter_account_options", + /* 381 */ "literal", + /* 382 */ "alter_account_option", + /* 383 */ "ip_range_list", + /* 384 */ "white_list", + /* 385 */ "white_list_opt", + /* 386 */ "is_import_opt", + /* 387 */ "is_createdb_opt", + /* 388 */ "user_name", + /* 389 */ "sysinfo_opt", + /* 390 */ "privileges", + /* 391 */ "priv_level", + /* 392 */ "with_opt", + /* 393 */ "priv_type_list", + /* 394 */ "priv_type", + /* 395 */ "db_name", + /* 396 */ "table_name", + /* 397 */ "topic_name", + /* 398 */ "search_condition", + /* 399 */ "dnode_endpoint", + /* 400 */ "force_opt", + /* 401 */ "unsafe_opt", + /* 402 */ "not_exists_opt", + /* 403 */ "db_options", + /* 404 */ "exists_opt", + /* 405 */ "alter_db_options", + /* 406 */ "speed_opt", + /* 407 */ "start_opt", + /* 408 */ "end_opt", + /* 409 */ "integer_list", + /* 410 */ "variable_list", + /* 411 */ "retention_list", + /* 412 */ "signed", + /* 413 */ "alter_db_option", + /* 414 */ "retention", + /* 415 */ "full_table_name", + /* 416 */ "column_def_list", + /* 417 */ "tags_def_opt", + /* 418 */ "table_options", + /* 419 */ "multi_create_clause", + /* 420 */ "tags_def", + /* 421 */ "multi_drop_clause", + /* 422 */ "alter_table_clause", + /* 423 */ "alter_table_options", + /* 424 */ "column_name", + /* 425 */ "type_name", + /* 426 */ "column_options", + /* 427 */ "tags_literal", + /* 428 */ "create_subtable_clause", + /* 429 */ "specific_cols_opt", + /* 430 */ "tags_literal_list", + /* 431 */ "drop_table_clause", + /* 432 */ "col_name_list", + /* 433 */ "tag_def_list", + /* 434 */ "tag_def", + /* 435 */ "column_def", + /* 436 */ "type_name_default_len", + /* 437 */ "duration_list", + /* 438 */ "rollup_func_list", + /* 439 */ "alter_table_option", + /* 440 */ "duration_literal", + /* 441 */ "rollup_func_name", + /* 442 */ "function_name", + /* 443 */ "col_name", + /* 444 */ "db_kind_opt", + /* 445 */ "table_kind_db_name_cond_opt", + /* 446 */ "like_pattern_opt", + /* 447 */ "db_name_cond_opt", + /* 448 */ "table_name_cond", + /* 449 */ "from_db_opt", + /* 450 */ "tag_list_opt", + /* 451 */ "table_kind", + /* 452 */ "tag_item", + /* 453 */ "column_alias", + /* 454 */ "tsma_name", + /* 455 */ "tsma_func_list", + /* 456 */ "full_tsma_name", + /* 457 */ "func_list", + /* 458 */ "index_options", + /* 459 */ "full_index_name", + /* 460 */ "index_name", + /* 461 */ "sliding_opt", + /* 462 */ "sma_stream_opt", + /* 463 */ "func", + /* 464 */ "sma_func_name", + /* 465 */ "expression_list", + /* 466 */ "with_meta", + /* 467 */ "query_or_subquery", + /* 468 */ "where_clause_opt", + /* 469 */ "cgroup_name", + /* 470 */ "analyze_opt", + /* 471 */ "explain_options", + /* 472 */ "insert_query", + /* 473 */ "or_replace_opt", + /* 474 */ "agg_func_opt", + /* 475 */ "bufsize_opt", + /* 476 */ "language_opt", + /* 477 */ "full_view_name", + /* 478 */ "view_name", + /* 479 */ "stream_name", + /* 480 */ "stream_options", + /* 481 */ "col_list_opt", + /* 482 */ "tag_def_or_ref_opt", + /* 483 */ "subtable_opt", + /* 484 */ "ignore_opt", + /* 485 */ "column_stream_def_list", + /* 486 */ "column_stream_def", + /* 487 */ "stream_col_options", + /* 488 */ "expression", + /* 489 */ "on_vgroup_id", + /* 490 */ "dnode_list", + /* 491 */ "literal_func", + /* 492 */ "signed_literal", + /* 493 */ "literal_list", + /* 494 */ "table_alias", + /* 495 */ "expr_or_subquery", + /* 496 */ "pseudo_column", + /* 497 */ "column_reference", + /* 498 */ "function_expression", + /* 499 */ "case_when_expression", + /* 500 */ "star_func", + /* 501 */ "star_func_para_list", + /* 502 */ "noarg_func", + /* 503 */ "other_para_list", + /* 504 */ "star_func_para", + /* 505 */ "when_then_list", + /* 506 */ "case_when_else_opt", + /* 507 */ "common_expression", + /* 508 */ "when_then_expr", + /* 509 */ "predicate", + /* 510 */ "compare_op", + /* 511 */ "in_op", + /* 512 */ "in_predicate_value", + /* 513 */ "boolean_value_expression", + /* 514 */ "boolean_primary", + /* 515 */ "from_clause_opt", + /* 516 */ "table_reference_list", + /* 517 */ "table_reference", + /* 518 */ "table_primary", + /* 519 */ "joined_table", + /* 520 */ "alias_opt", + /* 521 */ "subquery", + /* 522 */ "parenthesized_joined_table", + /* 523 */ "join_type", + /* 524 */ "join_subtype", + /* 525 */ "join_on_clause_opt", + /* 526 */ "window_offset_clause_opt", + /* 527 */ "jlimit_clause_opt", + /* 528 */ "window_offset_literal", + /* 529 */ "query_specification", + /* 530 */ "hint_list", + /* 531 */ "set_quantifier_opt", + /* 532 */ "tag_mode_opt", + /* 533 */ "select_list", + /* 534 */ "partition_by_clause_opt", + /* 535 */ "range_opt", + /* 536 */ "every_opt", + /* 537 */ "fill_opt", + /* 538 */ "twindow_clause_opt", + /* 539 */ "group_by_clause_opt", + /* 540 */ "having_clause_opt", + /* 541 */ "select_item", + /* 542 */ "partition_list", + /* 543 */ "partition_item", + /* 544 */ "interval_sliding_duration_literal", + /* 545 */ "fill_mode", + /* 546 */ "group_by_list", + /* 547 */ "query_expression", + /* 548 */ "query_simple", + /* 549 */ "order_by_clause_opt", + /* 550 */ "slimit_clause_opt", + /* 551 */ "limit_clause_opt", + /* 552 */ "union_query_expression", + /* 553 */ "query_simple_or_subquery", + /* 554 */ "sort_specification_list", + /* 555 */ "sort_specification", + /* 556 */ "ordering_specification_opt", + /* 557 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2240,726 +2575,731 @@ static const char *const yyRuleName[] = { /* 26 */ "white_list ::= HOST ip_range_list", /* 27 */ "white_list_opt ::=", /* 28 */ "white_list_opt ::= white_list", - /* 29 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt", - /* 30 */ "cmd ::= ALTER USER user_name PASS NK_STRING", - /* 31 */ "cmd ::= ALTER USER user_name ENABLE NK_INTEGER", - /* 32 */ "cmd ::= ALTER USER user_name SYSINFO NK_INTEGER", - /* 33 */ "cmd ::= ALTER USER user_name CREATEDB NK_INTEGER", - /* 34 */ "cmd ::= ALTER USER user_name ADD white_list", - /* 35 */ "cmd ::= ALTER USER user_name DROP white_list", - /* 36 */ "cmd ::= DROP USER user_name", - /* 37 */ "sysinfo_opt ::=", - /* 38 */ "sysinfo_opt ::= SYSINFO NK_INTEGER", - /* 39 */ "cmd ::= GRANT privileges ON priv_level with_opt TO user_name", - /* 40 */ "cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name", - /* 41 */ "privileges ::= ALL", - /* 42 */ "privileges ::= priv_type_list", - /* 43 */ "privileges ::= SUBSCRIBE", - /* 44 */ "priv_type_list ::= priv_type", - /* 45 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type", - /* 46 */ "priv_type ::= READ", - /* 47 */ "priv_type ::= WRITE", - /* 48 */ "priv_type ::= ALTER", - /* 49 */ "priv_level ::= NK_STAR NK_DOT NK_STAR", - /* 50 */ "priv_level ::= db_name NK_DOT NK_STAR", - /* 51 */ "priv_level ::= db_name NK_DOT table_name", - /* 52 */ "priv_level ::= topic_name", - /* 53 */ "with_opt ::=", - /* 54 */ "with_opt ::= WITH search_condition", - /* 55 */ "cmd ::= CREATE ENCRYPT_KEY NK_STRING", - /* 56 */ "cmd ::= CREATE DNODE dnode_endpoint", - /* 57 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER", - /* 58 */ "cmd ::= DROP DNODE NK_INTEGER force_opt", - /* 59 */ "cmd ::= DROP DNODE dnode_endpoint force_opt", - /* 60 */ "cmd ::= DROP DNODE NK_INTEGER unsafe_opt", - /* 61 */ "cmd ::= DROP DNODE dnode_endpoint unsafe_opt", - /* 62 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", - /* 63 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", - /* 64 */ "cmd ::= ALTER ALL DNODES NK_STRING", - /* 65 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", - /* 66 */ "cmd ::= RESTORE DNODE NK_INTEGER", - /* 67 */ "dnode_endpoint ::= NK_STRING", - /* 68 */ "dnode_endpoint ::= NK_ID", - /* 69 */ "dnode_endpoint ::= NK_IPTOKEN", - /* 70 */ "force_opt ::=", - /* 71 */ "force_opt ::= FORCE", - /* 72 */ "unsafe_opt ::= UNSAFE", - /* 73 */ "cmd ::= ALTER CLUSTER NK_STRING", - /* 74 */ "cmd ::= ALTER CLUSTER NK_STRING NK_STRING", - /* 75 */ "cmd ::= ALTER LOCAL NK_STRING", - /* 76 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", - /* 77 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", - /* 78 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", - /* 79 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", - /* 80 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", - /* 81 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", - /* 82 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", - /* 83 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", - /* 84 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", - /* 85 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", - /* 86 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", - /* 87 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", - /* 88 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", - /* 89 */ "cmd ::= DROP DATABASE exists_opt db_name", - /* 90 */ "cmd ::= USE db_name", - /* 91 */ "cmd ::= ALTER DATABASE db_name alter_db_options", - /* 92 */ "cmd ::= FLUSH DATABASE db_name", - /* 93 */ "cmd ::= TRIM DATABASE db_name speed_opt", - /* 94 */ "cmd ::= S3MIGRATE DATABASE db_name", - /* 95 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", - /* 96 */ "not_exists_opt ::= IF NOT EXISTS", - /* 97 */ "not_exists_opt ::=", - /* 98 */ "exists_opt ::= IF EXISTS", - /* 99 */ "exists_opt ::=", - /* 100 */ "db_options ::=", - /* 101 */ "db_options ::= db_options BUFFER NK_INTEGER", - /* 102 */ "db_options ::= db_options CACHEMODEL NK_STRING", - /* 103 */ "db_options ::= db_options CACHESIZE NK_INTEGER", - /* 104 */ "db_options ::= db_options COMP NK_INTEGER", - /* 105 */ "db_options ::= db_options DURATION NK_INTEGER", - /* 106 */ "db_options ::= db_options DURATION NK_VARIABLE", - /* 107 */ "db_options ::= db_options MAXROWS NK_INTEGER", - /* 108 */ "db_options ::= db_options MINROWS NK_INTEGER", - /* 109 */ "db_options ::= db_options KEEP integer_list", - /* 110 */ "db_options ::= db_options KEEP variable_list", - /* 111 */ "db_options ::= db_options PAGES NK_INTEGER", - /* 112 */ "db_options ::= db_options PAGESIZE NK_INTEGER", - /* 113 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", - /* 114 */ "db_options ::= db_options PRECISION NK_STRING", - /* 115 */ "db_options ::= db_options REPLICA NK_INTEGER", - /* 116 */ "db_options ::= db_options VGROUPS NK_INTEGER", - /* 117 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", - /* 118 */ "db_options ::= db_options RETENTIONS retention_list", - /* 119 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", - /* 120 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", - /* 121 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", - /* 122 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", - /* 123 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 124 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", - /* 125 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 126 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", - /* 127 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", - /* 128 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", - /* 129 */ "db_options ::= db_options TABLE_PREFIX signed", - /* 130 */ "db_options ::= db_options TABLE_SUFFIX signed", - /* 131 */ "db_options ::= db_options S3_CHUNKSIZE NK_INTEGER", - /* 132 */ "db_options ::= db_options S3_KEEPLOCAL NK_INTEGER", - /* 133 */ "db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE", - /* 134 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", - /* 135 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", - /* 136 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", - /* 137 */ "alter_db_options ::= alter_db_option", - /* 138 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 139 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 140 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 141 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 142 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 143 */ "alter_db_option ::= KEEP integer_list", - /* 144 */ "alter_db_option ::= KEEP variable_list", - /* 145 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 146 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 147 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 148 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 149 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 150 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 151 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 152 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 153 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 154 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", - /* 155 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", - /* 156 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", - /* 157 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", - /* 158 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", - /* 159 */ "integer_list ::= NK_INTEGER", - /* 160 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 161 */ "variable_list ::= NK_VARIABLE", - /* 162 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 163 */ "retention_list ::= retention", - /* 164 */ "retention_list ::= retention_list NK_COMMA retention", - /* 165 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 166 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", - /* 167 */ "speed_opt ::=", - /* 168 */ "speed_opt ::= BWLIMIT NK_INTEGER", - /* 169 */ "start_opt ::=", - /* 170 */ "start_opt ::= START WITH NK_INTEGER", - /* 171 */ "start_opt ::= START WITH NK_STRING", - /* 172 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 173 */ "end_opt ::=", - /* 174 */ "end_opt ::= END WITH NK_INTEGER", - /* 175 */ "end_opt ::= END WITH NK_STRING", - /* 176 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 177 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 178 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 179 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 180 */ "cmd ::= DROP TABLE multi_drop_clause", - /* 181 */ "cmd ::= DROP STABLE exists_opt full_table_name", - /* 182 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 183 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 184 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 185 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", - /* 186 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 187 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 188 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", - /* 189 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 190 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 191 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 192 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 193 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 194 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", - /* 195 */ "multi_create_clause ::= create_subtable_clause", - /* 196 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 197 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options", - /* 198 */ "multi_drop_clause ::= drop_table_clause", - /* 199 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 200 */ "drop_table_clause ::= exists_opt full_table_name", - /* 201 */ "specific_cols_opt ::=", - /* 202 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 203 */ "full_table_name ::= table_name", - /* 204 */ "full_table_name ::= db_name NK_DOT table_name", - /* 205 */ "tag_def_list ::= tag_def", - /* 206 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", - /* 207 */ "tag_def ::= column_name type_name", - /* 208 */ "column_def_list ::= column_def", - /* 209 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 210 */ "column_def ::= column_name type_name column_options", - /* 211 */ "type_name ::= BOOL", - /* 212 */ "type_name ::= TINYINT", - /* 213 */ "type_name ::= SMALLINT", - /* 214 */ "type_name ::= INT", - /* 215 */ "type_name ::= INTEGER", - /* 216 */ "type_name ::= BIGINT", - /* 217 */ "type_name ::= FLOAT", - /* 218 */ "type_name ::= DOUBLE", - /* 219 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 220 */ "type_name ::= TIMESTAMP", - /* 221 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 222 */ "type_name ::= TINYINT UNSIGNED", - /* 223 */ "type_name ::= SMALLINT UNSIGNED", - /* 224 */ "type_name ::= INT UNSIGNED", - /* 225 */ "type_name ::= BIGINT UNSIGNED", - /* 226 */ "type_name ::= JSON", - /* 227 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 228 */ "type_name ::= MEDIUMBLOB", - /* 229 */ "type_name ::= BLOB", - /* 230 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 231 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 232 */ "type_name ::= DECIMAL", - /* 233 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 234 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 235 */ "type_name_default_len ::= BINARY", - /* 236 */ "type_name_default_len ::= NCHAR", - /* 237 */ "type_name_default_len ::= VARCHAR", - /* 238 */ "type_name_default_len ::= VARBINARY", - /* 239 */ "tags_def_opt ::=", - /* 240 */ "tags_def_opt ::= tags_def", - /* 241 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", - /* 242 */ "table_options ::=", - /* 243 */ "table_options ::= table_options COMMENT NK_STRING", - /* 244 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 245 */ "table_options ::= table_options WATERMARK duration_list", - /* 246 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 247 */ "table_options ::= table_options TTL NK_INTEGER", - /* 248 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 249 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 250 */ "alter_table_options ::= alter_table_option", - /* 251 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 252 */ "alter_table_option ::= COMMENT NK_STRING", - /* 253 */ "alter_table_option ::= TTL NK_INTEGER", - /* 254 */ "duration_list ::= duration_literal", - /* 255 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 256 */ "rollup_func_list ::= rollup_func_name", - /* 257 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 258 */ "rollup_func_name ::= function_name", - /* 259 */ "rollup_func_name ::= FIRST", - /* 260 */ "rollup_func_name ::= LAST", - /* 261 */ "col_name_list ::= col_name", - /* 262 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 263 */ "col_name ::= column_name", - /* 264 */ "cmd ::= SHOW DNODES", - /* 265 */ "cmd ::= SHOW USERS", - /* 266 */ "cmd ::= SHOW USER PRIVILEGES", - /* 267 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 268 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 269 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 270 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 271 */ "cmd ::= SHOW MNODES", - /* 272 */ "cmd ::= SHOW QNODES", - /* 273 */ "cmd ::= SHOW ARBGROUPS", - /* 274 */ "cmd ::= SHOW FUNCTIONS", - /* 275 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 276 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 277 */ "cmd ::= SHOW STREAMS", - /* 278 */ "cmd ::= SHOW ACCOUNTS", - /* 279 */ "cmd ::= SHOW APPS", - /* 280 */ "cmd ::= SHOW CONNECTIONS", - /* 281 */ "cmd ::= SHOW LICENCES", - /* 282 */ "cmd ::= SHOW GRANTS", - /* 283 */ "cmd ::= SHOW GRANTS FULL", - /* 284 */ "cmd ::= SHOW GRANTS LOGS", - /* 285 */ "cmd ::= SHOW CLUSTER MACHINES", - /* 286 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 287 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 288 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 289 */ "cmd ::= SHOW ENCRYPTIONS", - /* 290 */ "cmd ::= SHOW QUERIES", - /* 291 */ "cmd ::= SHOW SCORES", - /* 292 */ "cmd ::= SHOW TOPICS", - /* 293 */ "cmd ::= SHOW VARIABLES", - /* 294 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 295 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 296 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 297 */ "cmd ::= SHOW BNODES", - /* 298 */ "cmd ::= SHOW SNODES", - /* 299 */ "cmd ::= SHOW CLUSTER", - /* 300 */ "cmd ::= SHOW TRANSACTIONS", - /* 301 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 302 */ "cmd ::= SHOW CONSUMERS", - /* 303 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 304 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 305 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 306 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 307 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 308 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 309 */ "cmd ::= SHOW VNODES", - /* 310 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 311 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 312 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", - /* 313 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 314 */ "cmd ::= SHOW COMPACTS", - /* 315 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 316 */ "table_kind_db_name_cond_opt ::=", - /* 317 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 318 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 319 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 320 */ "table_kind ::= NORMAL", - /* 321 */ "table_kind ::= CHILD", - /* 322 */ "db_name_cond_opt ::=", - /* 323 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 324 */ "like_pattern_opt ::=", - /* 325 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 326 */ "table_name_cond ::= table_name", - /* 327 */ "from_db_opt ::=", - /* 328 */ "from_db_opt ::= FROM db_name", - /* 329 */ "tag_list_opt ::=", - /* 330 */ "tag_list_opt ::= tag_item", - /* 331 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 332 */ "tag_item ::= TBNAME", - /* 333 */ "tag_item ::= QTAGS", - /* 334 */ "tag_item ::= column_name", - /* 335 */ "tag_item ::= column_name column_alias", - /* 336 */ "tag_item ::= column_name AS column_alias", - /* 337 */ "db_kind_opt ::=", - /* 338 */ "db_kind_opt ::= USER", - /* 339 */ "db_kind_opt ::= SYSTEM", - /* 340 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", - /* 341 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", - /* 342 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", - /* 343 */ "cmd ::= SHOW db_name_cond_opt TSMAS", - /* 344 */ "full_tsma_name ::= tsma_name", - /* 345 */ "full_tsma_name ::= db_name NK_DOT tsma_name", - /* 346 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", - /* 347 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 348 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 349 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 350 */ "full_index_name ::= index_name", - /* 351 */ "full_index_name ::= db_name NK_DOT index_name", - /* 352 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 353 */ "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", - /* 354 */ "func_list ::= func", - /* 355 */ "func_list ::= func_list NK_COMMA func", - /* 356 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 357 */ "sma_func_name ::= function_name", - /* 358 */ "sma_func_name ::= COUNT", - /* 359 */ "sma_func_name ::= FIRST", - /* 360 */ "sma_func_name ::= LAST", - /* 361 */ "sma_func_name ::= LAST_ROW", - /* 362 */ "sma_stream_opt ::=", - /* 363 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 364 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 365 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 366 */ "with_meta ::= AS", - /* 367 */ "with_meta ::= WITH META AS", - /* 368 */ "with_meta ::= ONLY META AS", - /* 369 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 370 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 371 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 372 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 373 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 374 */ "cmd ::= DESC full_table_name", - /* 375 */ "cmd ::= DESCRIBE full_table_name", - /* 376 */ "cmd ::= RESET QUERY CACHE", - /* 377 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 378 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 379 */ "analyze_opt ::=", - /* 380 */ "analyze_opt ::= ANALYZE", - /* 381 */ "explain_options ::=", - /* 382 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 383 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 384 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 385 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 386 */ "agg_func_opt ::=", - /* 387 */ "agg_func_opt ::= AGGREGATE", - /* 388 */ "bufsize_opt ::=", - /* 389 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 390 */ "language_opt ::=", - /* 391 */ "language_opt ::= LANGUAGE NK_STRING", - /* 392 */ "or_replace_opt ::=", - /* 393 */ "or_replace_opt ::= OR REPLACE", - /* 394 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 395 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 396 */ "full_view_name ::= view_name", - /* 397 */ "full_view_name ::= db_name NK_DOT view_name", - /* 398 */ "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", - /* 399 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 400 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 401 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 402 */ "col_list_opt ::=", - /* 403 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", - /* 404 */ "column_stream_def_list ::= column_stream_def", - /* 405 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", - /* 406 */ "column_stream_def ::= column_name stream_col_options", - /* 407 */ "stream_col_options ::=", - /* 408 */ "stream_col_options ::= stream_col_options PRIMARY KEY", - /* 409 */ "tag_def_or_ref_opt ::=", - /* 410 */ "tag_def_or_ref_opt ::= tags_def", - /* 411 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", - /* 412 */ "stream_options ::=", - /* 413 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 414 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 415 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 416 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 417 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 418 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 419 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 420 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 421 */ "subtable_opt ::=", - /* 422 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 423 */ "ignore_opt ::=", - /* 424 */ "ignore_opt ::= IGNORE UNTREATED", - /* 425 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 426 */ "cmd ::= KILL QUERY NK_STRING", - /* 427 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 428 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 429 */ "cmd ::= BALANCE VGROUP", - /* 430 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 431 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", - /* 432 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 433 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 434 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 435 */ "on_vgroup_id ::=", - /* 436 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 437 */ "dnode_list ::= DNODE NK_INTEGER", - /* 438 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 439 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 440 */ "cmd ::= query_or_subquery", - /* 441 */ "cmd ::= insert_query", - /* 442 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 443 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 444 */ "tags_literal ::= NK_INTEGER", - /* 445 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", - /* 446 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", - /* 447 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 448 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", - /* 449 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", - /* 450 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 451 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", - /* 452 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", - /* 453 */ "tags_literal ::= NK_FLOAT", - /* 454 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 455 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 456 */ "tags_literal ::= NK_BIN", - /* 457 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", - /* 458 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", - /* 459 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 460 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", - /* 461 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", - /* 462 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 463 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", - /* 464 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", - /* 465 */ "tags_literal ::= NK_HEX", - /* 466 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", - /* 467 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", - /* 468 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 469 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", - /* 470 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", - /* 471 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 472 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", - /* 473 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", - /* 474 */ "tags_literal ::= NK_STRING", - /* 475 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", - /* 476 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", - /* 477 */ "tags_literal ::= NK_BOOL", - /* 478 */ "tags_literal ::= NULL", - /* 479 */ "tags_literal ::= literal_func", - /* 480 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 481 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 482 */ "tags_literal_list ::= tags_literal", - /* 483 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 484 */ "literal ::= NK_INTEGER", - /* 485 */ "literal ::= NK_FLOAT", - /* 486 */ "literal ::= NK_STRING", - /* 487 */ "literal ::= NK_BOOL", - /* 488 */ "literal ::= TIMESTAMP NK_STRING", - /* 489 */ "literal ::= duration_literal", - /* 490 */ "literal ::= NULL", - /* 491 */ "literal ::= NK_QUESTION", - /* 492 */ "duration_literal ::= NK_VARIABLE", - /* 493 */ "signed ::= NK_INTEGER", - /* 494 */ "signed ::= NK_PLUS NK_INTEGER", - /* 495 */ "signed ::= NK_MINUS NK_INTEGER", - /* 496 */ "signed ::= NK_FLOAT", - /* 497 */ "signed ::= NK_PLUS NK_FLOAT", - /* 498 */ "signed ::= NK_MINUS NK_FLOAT", - /* 499 */ "signed_literal ::= signed", - /* 500 */ "signed_literal ::= NK_STRING", - /* 501 */ "signed_literal ::= NK_BOOL", - /* 502 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 503 */ "signed_literal ::= duration_literal", - /* 504 */ "signed_literal ::= NULL", - /* 505 */ "signed_literal ::= literal_func", - /* 506 */ "signed_literal ::= NK_QUESTION", - /* 507 */ "literal_list ::= signed_literal", - /* 508 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 509 */ "db_name ::= NK_ID", - /* 510 */ "table_name ::= NK_ID", - /* 511 */ "column_name ::= NK_ID", - /* 512 */ "function_name ::= NK_ID", - /* 513 */ "view_name ::= NK_ID", - /* 514 */ "table_alias ::= NK_ID", - /* 515 */ "column_alias ::= NK_ID", - /* 516 */ "column_alias ::= NK_ALIAS", - /* 517 */ "user_name ::= NK_ID", - /* 518 */ "topic_name ::= NK_ID", - /* 519 */ "stream_name ::= NK_ID", - /* 520 */ "cgroup_name ::= NK_ID", - /* 521 */ "index_name ::= NK_ID", - /* 522 */ "tsma_name ::= NK_ID", - /* 523 */ "expr_or_subquery ::= expression", - /* 524 */ "expression ::= literal", - /* 525 */ "expression ::= pseudo_column", - /* 526 */ "expression ::= column_reference", - /* 527 */ "expression ::= function_expression", - /* 528 */ "expression ::= case_when_expression", - /* 529 */ "expression ::= NK_LP expression NK_RP", - /* 530 */ "expression ::= NK_PLUS expr_or_subquery", - /* 531 */ "expression ::= NK_MINUS expr_or_subquery", - /* 532 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 533 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 534 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 535 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 536 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 537 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 538 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 539 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 540 */ "expression_list ::= expr_or_subquery", - /* 541 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 542 */ "column_reference ::= column_name", - /* 543 */ "column_reference ::= table_name NK_DOT column_name", - /* 544 */ "column_reference ::= NK_ALIAS", - /* 545 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 546 */ "pseudo_column ::= ROWTS", - /* 547 */ "pseudo_column ::= TBNAME", - /* 548 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 549 */ "pseudo_column ::= QSTART", - /* 550 */ "pseudo_column ::= QEND", - /* 551 */ "pseudo_column ::= QDURATION", - /* 552 */ "pseudo_column ::= WSTART", - /* 553 */ "pseudo_column ::= WEND", - /* 554 */ "pseudo_column ::= WDURATION", - /* 555 */ "pseudo_column ::= IROWTS", - /* 556 */ "pseudo_column ::= ISFILLED", - /* 557 */ "pseudo_column ::= QTAGS", - /* 558 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 559 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 560 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 561 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", - /* 562 */ "function_expression ::= literal_func", - /* 563 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 564 */ "literal_func ::= NOW", - /* 565 */ "literal_func ::= TODAY", - /* 566 */ "noarg_func ::= NOW", - /* 567 */ "noarg_func ::= TODAY", - /* 568 */ "noarg_func ::= TIMEZONE", - /* 569 */ "noarg_func ::= DATABASE", - /* 570 */ "noarg_func ::= CLIENT_VERSION", - /* 571 */ "noarg_func ::= SERVER_VERSION", - /* 572 */ "noarg_func ::= SERVER_STATUS", - /* 573 */ "noarg_func ::= CURRENT_USER", - /* 574 */ "noarg_func ::= USER", - /* 575 */ "star_func ::= COUNT", - /* 576 */ "star_func ::= FIRST", - /* 577 */ "star_func ::= LAST", - /* 578 */ "star_func ::= LAST_ROW", - /* 579 */ "star_func_para_list ::= NK_STAR", - /* 580 */ "star_func_para_list ::= other_para_list", - /* 581 */ "other_para_list ::= star_func_para", - /* 582 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 583 */ "star_func_para ::= expr_or_subquery", - /* 584 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 585 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 586 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 587 */ "when_then_list ::= when_then_expr", - /* 588 */ "when_then_list ::= when_then_list when_then_expr", - /* 589 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 590 */ "case_when_else_opt ::=", - /* 591 */ "case_when_else_opt ::= ELSE common_expression", - /* 592 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 593 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 594 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 595 */ "predicate ::= expr_or_subquery IS NULL", - /* 596 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 597 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 598 */ "compare_op ::= NK_LT", - /* 599 */ "compare_op ::= NK_GT", - /* 600 */ "compare_op ::= NK_LE", - /* 601 */ "compare_op ::= NK_GE", - /* 602 */ "compare_op ::= NK_NE", - /* 603 */ "compare_op ::= NK_EQ", - /* 604 */ "compare_op ::= LIKE", - /* 605 */ "compare_op ::= NOT LIKE", - /* 606 */ "compare_op ::= MATCH", - /* 607 */ "compare_op ::= NMATCH", - /* 608 */ "compare_op ::= CONTAINS", - /* 609 */ "in_op ::= IN", - /* 610 */ "in_op ::= NOT IN", - /* 611 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 612 */ "boolean_value_expression ::= boolean_primary", - /* 613 */ "boolean_value_expression ::= NOT boolean_primary", - /* 614 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 615 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 616 */ "boolean_primary ::= predicate", - /* 617 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 618 */ "common_expression ::= expr_or_subquery", - /* 619 */ "common_expression ::= boolean_value_expression", - /* 620 */ "from_clause_opt ::=", - /* 621 */ "from_clause_opt ::= FROM table_reference_list", - /* 622 */ "table_reference_list ::= table_reference", - /* 623 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 624 */ "table_reference ::= table_primary", - /* 625 */ "table_reference ::= joined_table", - /* 626 */ "table_primary ::= table_name alias_opt", - /* 627 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 628 */ "table_primary ::= subquery alias_opt", - /* 629 */ "table_primary ::= parenthesized_joined_table", - /* 630 */ "alias_opt ::=", - /* 631 */ "alias_opt ::= table_alias", - /* 632 */ "alias_opt ::= AS table_alias", - /* 633 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 634 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 635 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", - /* 636 */ "join_type ::=", - /* 637 */ "join_type ::= INNER", - /* 638 */ "join_type ::= LEFT", - /* 639 */ "join_type ::= RIGHT", - /* 640 */ "join_type ::= FULL", - /* 641 */ "join_subtype ::=", - /* 642 */ "join_subtype ::= OUTER", - /* 643 */ "join_subtype ::= SEMI", - /* 644 */ "join_subtype ::= ANTI", - /* 645 */ "join_subtype ::= ASOF", - /* 646 */ "join_subtype ::= WINDOW", - /* 647 */ "join_on_clause_opt ::=", - /* 648 */ "join_on_clause_opt ::= ON search_condition", - /* 649 */ "window_offset_clause_opt ::=", - /* 650 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", - /* 651 */ "window_offset_literal ::= NK_VARIABLE", - /* 652 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", - /* 653 */ "jlimit_clause_opt ::=", - /* 654 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", - /* 655 */ "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", - /* 656 */ "hint_list ::=", - /* 657 */ "hint_list ::= NK_HINT", - /* 658 */ "tag_mode_opt ::=", - /* 659 */ "tag_mode_opt ::= TAGS", - /* 660 */ "set_quantifier_opt ::=", - /* 661 */ "set_quantifier_opt ::= DISTINCT", - /* 662 */ "set_quantifier_opt ::= ALL", - /* 663 */ "select_list ::= select_item", - /* 664 */ "select_list ::= select_list NK_COMMA select_item", - /* 665 */ "select_item ::= NK_STAR", - /* 666 */ "select_item ::= common_expression", - /* 667 */ "select_item ::= common_expression column_alias", - /* 668 */ "select_item ::= common_expression AS column_alias", - /* 669 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 670 */ "where_clause_opt ::=", - /* 671 */ "where_clause_opt ::= WHERE search_condition", - /* 672 */ "partition_by_clause_opt ::=", - /* 673 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 674 */ "partition_list ::= partition_item", - /* 675 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 676 */ "partition_item ::= expr_or_subquery", - /* 677 */ "partition_item ::= expr_or_subquery column_alias", - /* 678 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 679 */ "twindow_clause_opt ::=", - /* 680 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 681 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 682 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 683 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 684 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 685 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 686 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 687 */ "sliding_opt ::=", - /* 688 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 689 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 690 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 691 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 692 */ "fill_opt ::=", - /* 693 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 694 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 695 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 696 */ "fill_mode ::= NONE", - /* 697 */ "fill_mode ::= PREV", - /* 698 */ "fill_mode ::= NULL", - /* 699 */ "fill_mode ::= NULL_F", - /* 700 */ "fill_mode ::= LINEAR", - /* 701 */ "fill_mode ::= NEXT", - /* 702 */ "group_by_clause_opt ::=", - /* 703 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 704 */ "group_by_list ::= expr_or_subquery", - /* 705 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 706 */ "having_clause_opt ::=", - /* 707 */ "having_clause_opt ::= HAVING search_condition", - /* 708 */ "range_opt ::=", - /* 709 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 710 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 711 */ "every_opt ::=", - /* 712 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 713 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 714 */ "query_simple ::= query_specification", - /* 715 */ "query_simple ::= union_query_expression", - /* 716 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 717 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 718 */ "query_simple_or_subquery ::= query_simple", - /* 719 */ "query_simple_or_subquery ::= subquery", - /* 720 */ "query_or_subquery ::= query_expression", - /* 721 */ "query_or_subquery ::= subquery", - /* 722 */ "order_by_clause_opt ::=", - /* 723 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 724 */ "slimit_clause_opt ::=", - /* 725 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 726 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 727 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 728 */ "limit_clause_opt ::=", - /* 729 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 730 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 731 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 732 */ "subquery ::= NK_LP query_expression NK_RP", - /* 733 */ "subquery ::= NK_LP subquery NK_RP", - /* 734 */ "search_condition ::= common_expression", - /* 735 */ "sort_specification_list ::= sort_specification", - /* 736 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 737 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 738 */ "ordering_specification_opt ::=", - /* 739 */ "ordering_specification_opt ::= ASC", - /* 740 */ "ordering_specification_opt ::= DESC", - /* 741 */ "null_ordering_opt ::=", - /* 742 */ "null_ordering_opt ::= NULLS FIRST", - /* 743 */ "null_ordering_opt ::= NULLS LAST", - /* 744 */ "column_options ::=", - /* 745 */ "column_options ::= column_options PRIMARY KEY", - /* 746 */ "column_options ::= column_options ENCODE NK_STRING", - /* 747 */ "column_options ::= column_options COMPRESS NK_STRING", - /* 748 */ "column_options ::= column_options LEVEL NK_STRING", + /* 29 */ "is_import_opt ::=", + /* 30 */ "is_import_opt ::= IS_IMPORT NK_INTEGER", + /* 31 */ "is_createdb_opt ::=", + /* 32 */ "is_createdb_opt ::= CREATEDB NK_INTEGER", + /* 33 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt", + /* 34 */ "cmd ::= ALTER USER user_name PASS NK_STRING", + /* 35 */ "cmd ::= ALTER USER user_name ENABLE NK_INTEGER", + /* 36 */ "cmd ::= ALTER USER user_name SYSINFO NK_INTEGER", + /* 37 */ "cmd ::= ALTER USER user_name CREATEDB NK_INTEGER", + /* 38 */ "cmd ::= ALTER USER user_name ADD white_list", + /* 39 */ "cmd ::= ALTER USER user_name DROP white_list", + /* 40 */ "cmd ::= DROP USER user_name", + /* 41 */ "sysinfo_opt ::=", + /* 42 */ "sysinfo_opt ::= SYSINFO NK_INTEGER", + /* 43 */ "cmd ::= GRANT privileges ON priv_level with_opt TO user_name", + /* 44 */ "cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name", + /* 45 */ "privileges ::= ALL", + /* 46 */ "privileges ::= priv_type_list", + /* 47 */ "privileges ::= SUBSCRIBE", + /* 48 */ "priv_type_list ::= priv_type", + /* 49 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type", + /* 50 */ "priv_type ::= READ", + /* 51 */ "priv_type ::= WRITE", + /* 52 */ "priv_type ::= ALTER", + /* 53 */ "priv_level ::= NK_STAR NK_DOT NK_STAR", + /* 54 */ "priv_level ::= db_name NK_DOT NK_STAR", + /* 55 */ "priv_level ::= db_name NK_DOT table_name", + /* 56 */ "priv_level ::= topic_name", + /* 57 */ "with_opt ::=", + /* 58 */ "with_opt ::= WITH search_condition", + /* 59 */ "cmd ::= CREATE ENCRYPT_KEY NK_STRING", + /* 60 */ "cmd ::= CREATE DNODE dnode_endpoint", + /* 61 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER", + /* 62 */ "cmd ::= DROP DNODE NK_INTEGER force_opt", + /* 63 */ "cmd ::= DROP DNODE dnode_endpoint force_opt", + /* 64 */ "cmd ::= DROP DNODE NK_INTEGER unsafe_opt", + /* 65 */ "cmd ::= DROP DNODE dnode_endpoint unsafe_opt", + /* 66 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", + /* 67 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", + /* 68 */ "cmd ::= ALTER ALL DNODES NK_STRING", + /* 69 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", + /* 70 */ "cmd ::= RESTORE DNODE NK_INTEGER", + /* 71 */ "dnode_endpoint ::= NK_STRING", + /* 72 */ "dnode_endpoint ::= NK_ID", + /* 73 */ "dnode_endpoint ::= NK_IPTOKEN", + /* 74 */ "force_opt ::=", + /* 75 */ "force_opt ::= FORCE", + /* 76 */ "unsafe_opt ::= UNSAFE", + /* 77 */ "cmd ::= ALTER CLUSTER NK_STRING", + /* 78 */ "cmd ::= ALTER CLUSTER NK_STRING NK_STRING", + /* 79 */ "cmd ::= ALTER LOCAL NK_STRING", + /* 80 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", + /* 81 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", + /* 82 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", + /* 83 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", + /* 84 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", + /* 85 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", + /* 86 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", + /* 87 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", + /* 88 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", + /* 89 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", + /* 90 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", + /* 91 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", + /* 92 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", + /* 93 */ "cmd ::= DROP DATABASE exists_opt db_name", + /* 94 */ "cmd ::= USE db_name", + /* 95 */ "cmd ::= ALTER DATABASE db_name alter_db_options", + /* 96 */ "cmd ::= FLUSH DATABASE db_name", + /* 97 */ "cmd ::= TRIM DATABASE db_name speed_opt", + /* 98 */ "cmd ::= S3MIGRATE DATABASE db_name", + /* 99 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", + /* 100 */ "not_exists_opt ::= IF NOT EXISTS", + /* 101 */ "not_exists_opt ::=", + /* 102 */ "exists_opt ::= IF EXISTS", + /* 103 */ "exists_opt ::=", + /* 104 */ "db_options ::=", + /* 105 */ "db_options ::= db_options BUFFER NK_INTEGER", + /* 106 */ "db_options ::= db_options CACHEMODEL NK_STRING", + /* 107 */ "db_options ::= db_options CACHESIZE NK_INTEGER", + /* 108 */ "db_options ::= db_options COMP NK_INTEGER", + /* 109 */ "db_options ::= db_options DURATION NK_INTEGER", + /* 110 */ "db_options ::= db_options DURATION NK_VARIABLE", + /* 111 */ "db_options ::= db_options MAXROWS NK_INTEGER", + /* 112 */ "db_options ::= db_options MINROWS NK_INTEGER", + /* 113 */ "db_options ::= db_options KEEP integer_list", + /* 114 */ "db_options ::= db_options KEEP variable_list", + /* 115 */ "db_options ::= db_options PAGES NK_INTEGER", + /* 116 */ "db_options ::= db_options PAGESIZE NK_INTEGER", + /* 117 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", + /* 118 */ "db_options ::= db_options PRECISION NK_STRING", + /* 119 */ "db_options ::= db_options REPLICA NK_INTEGER", + /* 120 */ "db_options ::= db_options VGROUPS NK_INTEGER", + /* 121 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", + /* 122 */ "db_options ::= db_options RETENTIONS retention_list", + /* 123 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 124 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", + /* 125 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", + /* 126 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", + /* 127 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 128 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", + /* 129 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 130 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", + /* 131 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", + /* 132 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", + /* 133 */ "db_options ::= db_options TABLE_PREFIX signed", + /* 134 */ "db_options ::= db_options TABLE_SUFFIX signed", + /* 135 */ "db_options ::= db_options S3_CHUNKSIZE NK_INTEGER", + /* 136 */ "db_options ::= db_options S3_KEEPLOCAL NK_INTEGER", + /* 137 */ "db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE", + /* 138 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", + /* 139 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", + /* 140 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", + /* 141 */ "alter_db_options ::= alter_db_option", + /* 142 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 143 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 144 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 145 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 146 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 147 */ "alter_db_option ::= KEEP integer_list", + /* 148 */ "alter_db_option ::= KEEP variable_list", + /* 149 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 150 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 151 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 152 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 153 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 154 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 155 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 156 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 157 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 158 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", + /* 159 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", + /* 160 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", + /* 161 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", + /* 162 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", + /* 163 */ "integer_list ::= NK_INTEGER", + /* 164 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 165 */ "variable_list ::= NK_VARIABLE", + /* 166 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 167 */ "retention_list ::= retention", + /* 168 */ "retention_list ::= retention_list NK_COMMA retention", + /* 169 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 170 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", + /* 171 */ "speed_opt ::=", + /* 172 */ "speed_opt ::= BWLIMIT NK_INTEGER", + /* 173 */ "start_opt ::=", + /* 174 */ "start_opt ::= START WITH NK_INTEGER", + /* 175 */ "start_opt ::= START WITH NK_STRING", + /* 176 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 177 */ "end_opt ::=", + /* 178 */ "end_opt ::= END WITH NK_INTEGER", + /* 179 */ "end_opt ::= END WITH NK_STRING", + /* 180 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 181 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 182 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 183 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 184 */ "cmd ::= DROP TABLE multi_drop_clause", + /* 185 */ "cmd ::= DROP STABLE exists_opt full_table_name", + /* 186 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 187 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 188 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 189 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", + /* 190 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 191 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 192 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", + /* 193 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 194 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 195 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 196 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 197 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 198 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", + /* 199 */ "multi_create_clause ::= create_subtable_clause", + /* 200 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 201 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options", + /* 202 */ "multi_drop_clause ::= drop_table_clause", + /* 203 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 204 */ "drop_table_clause ::= exists_opt full_table_name", + /* 205 */ "specific_cols_opt ::=", + /* 206 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 207 */ "full_table_name ::= table_name", + /* 208 */ "full_table_name ::= db_name NK_DOT table_name", + /* 209 */ "tag_def_list ::= tag_def", + /* 210 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", + /* 211 */ "tag_def ::= column_name type_name", + /* 212 */ "column_def_list ::= column_def", + /* 213 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 214 */ "column_def ::= column_name type_name column_options", + /* 215 */ "type_name ::= BOOL", + /* 216 */ "type_name ::= TINYINT", + /* 217 */ "type_name ::= SMALLINT", + /* 218 */ "type_name ::= INT", + /* 219 */ "type_name ::= INTEGER", + /* 220 */ "type_name ::= BIGINT", + /* 221 */ "type_name ::= FLOAT", + /* 222 */ "type_name ::= DOUBLE", + /* 223 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 224 */ "type_name ::= TIMESTAMP", + /* 225 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 226 */ "type_name ::= TINYINT UNSIGNED", + /* 227 */ "type_name ::= SMALLINT UNSIGNED", + /* 228 */ "type_name ::= INT UNSIGNED", + /* 229 */ "type_name ::= BIGINT UNSIGNED", + /* 230 */ "type_name ::= JSON", + /* 231 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 232 */ "type_name ::= MEDIUMBLOB", + /* 233 */ "type_name ::= BLOB", + /* 234 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 235 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 236 */ "type_name ::= DECIMAL", + /* 237 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 238 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 239 */ "type_name_default_len ::= BINARY", + /* 240 */ "type_name_default_len ::= NCHAR", + /* 241 */ "type_name_default_len ::= VARCHAR", + /* 242 */ "type_name_default_len ::= VARBINARY", + /* 243 */ "tags_def_opt ::=", + /* 244 */ "tags_def_opt ::= tags_def", + /* 245 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", + /* 246 */ "table_options ::=", + /* 247 */ "table_options ::= table_options COMMENT NK_STRING", + /* 248 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 249 */ "table_options ::= table_options WATERMARK duration_list", + /* 250 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 251 */ "table_options ::= table_options TTL NK_INTEGER", + /* 252 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 253 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 254 */ "alter_table_options ::= alter_table_option", + /* 255 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 256 */ "alter_table_option ::= COMMENT NK_STRING", + /* 257 */ "alter_table_option ::= TTL NK_INTEGER", + /* 258 */ "duration_list ::= duration_literal", + /* 259 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 260 */ "rollup_func_list ::= rollup_func_name", + /* 261 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 262 */ "rollup_func_name ::= function_name", + /* 263 */ "rollup_func_name ::= FIRST", + /* 264 */ "rollup_func_name ::= LAST", + /* 265 */ "col_name_list ::= col_name", + /* 266 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 267 */ "col_name ::= column_name", + /* 268 */ "cmd ::= SHOW DNODES", + /* 269 */ "cmd ::= SHOW USERS", + /* 270 */ "cmd ::= SHOW USERS FULL", + /* 271 */ "cmd ::= SHOW USER PRIVILEGES", + /* 272 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 273 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 274 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 275 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 276 */ "cmd ::= SHOW MNODES", + /* 277 */ "cmd ::= SHOW QNODES", + /* 278 */ "cmd ::= SHOW ARBGROUPS", + /* 279 */ "cmd ::= SHOW FUNCTIONS", + /* 280 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 281 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 282 */ "cmd ::= SHOW STREAMS", + /* 283 */ "cmd ::= SHOW ACCOUNTS", + /* 284 */ "cmd ::= SHOW APPS", + /* 285 */ "cmd ::= SHOW CONNECTIONS", + /* 286 */ "cmd ::= SHOW LICENCES", + /* 287 */ "cmd ::= SHOW GRANTS", + /* 288 */ "cmd ::= SHOW GRANTS FULL", + /* 289 */ "cmd ::= SHOW GRANTS LOGS", + /* 290 */ "cmd ::= SHOW CLUSTER MACHINES", + /* 291 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 292 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 293 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 294 */ "cmd ::= SHOW ENCRYPTIONS", + /* 295 */ "cmd ::= SHOW QUERIES", + /* 296 */ "cmd ::= SHOW SCORES", + /* 297 */ "cmd ::= SHOW TOPICS", + /* 298 */ "cmd ::= SHOW VARIABLES", + /* 299 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 300 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 301 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 302 */ "cmd ::= SHOW BNODES", + /* 303 */ "cmd ::= SHOW SNODES", + /* 304 */ "cmd ::= SHOW CLUSTER", + /* 305 */ "cmd ::= SHOW TRANSACTIONS", + /* 306 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 307 */ "cmd ::= SHOW CONSUMERS", + /* 308 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 309 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 310 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 311 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 312 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 313 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 314 */ "cmd ::= SHOW VNODES", + /* 315 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 316 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 317 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", + /* 318 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 319 */ "cmd ::= SHOW COMPACTS", + /* 320 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 321 */ "table_kind_db_name_cond_opt ::=", + /* 322 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 323 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 324 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 325 */ "table_kind ::= NORMAL", + /* 326 */ "table_kind ::= CHILD", + /* 327 */ "db_name_cond_opt ::=", + /* 328 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 329 */ "like_pattern_opt ::=", + /* 330 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 331 */ "table_name_cond ::= table_name", + /* 332 */ "from_db_opt ::=", + /* 333 */ "from_db_opt ::= FROM db_name", + /* 334 */ "tag_list_opt ::=", + /* 335 */ "tag_list_opt ::= tag_item", + /* 336 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 337 */ "tag_item ::= TBNAME", + /* 338 */ "tag_item ::= QTAGS", + /* 339 */ "tag_item ::= column_name", + /* 340 */ "tag_item ::= column_name column_alias", + /* 341 */ "tag_item ::= column_name AS column_alias", + /* 342 */ "db_kind_opt ::=", + /* 343 */ "db_kind_opt ::= USER", + /* 344 */ "db_kind_opt ::= SYSTEM", + /* 345 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", + /* 346 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", + /* 347 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", + /* 348 */ "cmd ::= SHOW db_name_cond_opt TSMAS", + /* 349 */ "full_tsma_name ::= tsma_name", + /* 350 */ "full_tsma_name ::= db_name NK_DOT tsma_name", + /* 351 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", + /* 352 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 353 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 354 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 355 */ "full_index_name ::= index_name", + /* 356 */ "full_index_name ::= db_name NK_DOT index_name", + /* 357 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 358 */ "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", + /* 359 */ "func_list ::= func", + /* 360 */ "func_list ::= func_list NK_COMMA func", + /* 361 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 362 */ "sma_func_name ::= function_name", + /* 363 */ "sma_func_name ::= COUNT", + /* 364 */ "sma_func_name ::= FIRST", + /* 365 */ "sma_func_name ::= LAST", + /* 366 */ "sma_func_name ::= LAST_ROW", + /* 367 */ "sma_stream_opt ::=", + /* 368 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 369 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 370 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 371 */ "with_meta ::= AS", + /* 372 */ "with_meta ::= WITH META AS", + /* 373 */ "with_meta ::= ONLY META AS", + /* 374 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 375 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 376 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 377 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 378 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 379 */ "cmd ::= DESC full_table_name", + /* 380 */ "cmd ::= DESCRIBE full_table_name", + /* 381 */ "cmd ::= RESET QUERY CACHE", + /* 382 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 383 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 384 */ "analyze_opt ::=", + /* 385 */ "analyze_opt ::= ANALYZE", + /* 386 */ "explain_options ::=", + /* 387 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 388 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 389 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 390 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 391 */ "agg_func_opt ::=", + /* 392 */ "agg_func_opt ::= AGGREGATE", + /* 393 */ "bufsize_opt ::=", + /* 394 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 395 */ "language_opt ::=", + /* 396 */ "language_opt ::= LANGUAGE NK_STRING", + /* 397 */ "or_replace_opt ::=", + /* 398 */ "or_replace_opt ::= OR REPLACE", + /* 399 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 400 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 401 */ "full_view_name ::= view_name", + /* 402 */ "full_view_name ::= db_name NK_DOT view_name", + /* 403 */ "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", + /* 404 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 405 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 406 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 407 */ "col_list_opt ::=", + /* 408 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", + /* 409 */ "column_stream_def_list ::= column_stream_def", + /* 410 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", + /* 411 */ "column_stream_def ::= column_name stream_col_options", + /* 412 */ "stream_col_options ::=", + /* 413 */ "stream_col_options ::= stream_col_options PRIMARY KEY", + /* 414 */ "tag_def_or_ref_opt ::=", + /* 415 */ "tag_def_or_ref_opt ::= tags_def", + /* 416 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", + /* 417 */ "stream_options ::=", + /* 418 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 419 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 420 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 421 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 422 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 423 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 424 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 425 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 426 */ "subtable_opt ::=", + /* 427 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 428 */ "ignore_opt ::=", + /* 429 */ "ignore_opt ::= IGNORE UNTREATED", + /* 430 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 431 */ "cmd ::= KILL QUERY NK_STRING", + /* 432 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 433 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 434 */ "cmd ::= BALANCE VGROUP", + /* 435 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 436 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", + /* 437 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 438 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 439 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 440 */ "on_vgroup_id ::=", + /* 441 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 442 */ "dnode_list ::= DNODE NK_INTEGER", + /* 443 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 444 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 445 */ "cmd ::= query_or_subquery", + /* 446 */ "cmd ::= insert_query", + /* 447 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 448 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 449 */ "tags_literal ::= NK_INTEGER", + /* 450 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 451 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 452 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 453 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 454 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 455 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 456 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 457 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 458 */ "tags_literal ::= NK_FLOAT", + /* 459 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 460 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 461 */ "tags_literal ::= NK_BIN", + /* 462 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 463 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 464 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 465 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 466 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 467 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 468 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 469 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 470 */ "tags_literal ::= NK_HEX", + /* 471 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 472 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 473 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 474 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 475 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 476 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 477 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 478 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 479 */ "tags_literal ::= NK_STRING", + /* 480 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 481 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 482 */ "tags_literal ::= NK_BOOL", + /* 483 */ "tags_literal ::= NULL", + /* 484 */ "tags_literal ::= literal_func", + /* 485 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 486 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 487 */ "tags_literal_list ::= tags_literal", + /* 488 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 489 */ "literal ::= NK_INTEGER", + /* 490 */ "literal ::= NK_FLOAT", + /* 491 */ "literal ::= NK_STRING", + /* 492 */ "literal ::= NK_BOOL", + /* 493 */ "literal ::= TIMESTAMP NK_STRING", + /* 494 */ "literal ::= duration_literal", + /* 495 */ "literal ::= NULL", + /* 496 */ "literal ::= NK_QUESTION", + /* 497 */ "duration_literal ::= NK_VARIABLE", + /* 498 */ "signed ::= NK_INTEGER", + /* 499 */ "signed ::= NK_PLUS NK_INTEGER", + /* 500 */ "signed ::= NK_MINUS NK_INTEGER", + /* 501 */ "signed ::= NK_FLOAT", + /* 502 */ "signed ::= NK_PLUS NK_FLOAT", + /* 503 */ "signed ::= NK_MINUS NK_FLOAT", + /* 504 */ "signed_literal ::= signed", + /* 505 */ "signed_literal ::= NK_STRING", + /* 506 */ "signed_literal ::= NK_BOOL", + /* 507 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 508 */ "signed_literal ::= duration_literal", + /* 509 */ "signed_literal ::= NULL", + /* 510 */ "signed_literal ::= literal_func", + /* 511 */ "signed_literal ::= NK_QUESTION", + /* 512 */ "literal_list ::= signed_literal", + /* 513 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 514 */ "db_name ::= NK_ID", + /* 515 */ "table_name ::= NK_ID", + /* 516 */ "column_name ::= NK_ID", + /* 517 */ "function_name ::= NK_ID", + /* 518 */ "view_name ::= NK_ID", + /* 519 */ "table_alias ::= NK_ID", + /* 520 */ "column_alias ::= NK_ID", + /* 521 */ "column_alias ::= NK_ALIAS", + /* 522 */ "user_name ::= NK_ID", + /* 523 */ "topic_name ::= NK_ID", + /* 524 */ "stream_name ::= NK_ID", + /* 525 */ "cgroup_name ::= NK_ID", + /* 526 */ "index_name ::= NK_ID", + /* 527 */ "tsma_name ::= NK_ID", + /* 528 */ "expr_or_subquery ::= expression", + /* 529 */ "expression ::= literal", + /* 530 */ "expression ::= pseudo_column", + /* 531 */ "expression ::= column_reference", + /* 532 */ "expression ::= function_expression", + /* 533 */ "expression ::= case_when_expression", + /* 534 */ "expression ::= NK_LP expression NK_RP", + /* 535 */ "expression ::= NK_PLUS expr_or_subquery", + /* 536 */ "expression ::= NK_MINUS expr_or_subquery", + /* 537 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 538 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 539 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 540 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 541 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 542 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 543 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 544 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 545 */ "expression_list ::= expr_or_subquery", + /* 546 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 547 */ "column_reference ::= column_name", + /* 548 */ "column_reference ::= table_name NK_DOT column_name", + /* 549 */ "column_reference ::= NK_ALIAS", + /* 550 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 551 */ "pseudo_column ::= ROWTS", + /* 552 */ "pseudo_column ::= TBNAME", + /* 553 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 554 */ "pseudo_column ::= QSTART", + /* 555 */ "pseudo_column ::= QEND", + /* 556 */ "pseudo_column ::= QDURATION", + /* 557 */ "pseudo_column ::= WSTART", + /* 558 */ "pseudo_column ::= WEND", + /* 559 */ "pseudo_column ::= WDURATION", + /* 560 */ "pseudo_column ::= IROWTS", + /* 561 */ "pseudo_column ::= ISFILLED", + /* 562 */ "pseudo_column ::= QTAGS", + /* 563 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 564 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 565 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 566 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", + /* 567 */ "function_expression ::= literal_func", + /* 568 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 569 */ "literal_func ::= NOW", + /* 570 */ "literal_func ::= TODAY", + /* 571 */ "noarg_func ::= NOW", + /* 572 */ "noarg_func ::= TODAY", + /* 573 */ "noarg_func ::= TIMEZONE", + /* 574 */ "noarg_func ::= DATABASE", + /* 575 */ "noarg_func ::= CLIENT_VERSION", + /* 576 */ "noarg_func ::= SERVER_VERSION", + /* 577 */ "noarg_func ::= SERVER_STATUS", + /* 578 */ "noarg_func ::= CURRENT_USER", + /* 579 */ "noarg_func ::= USER", + /* 580 */ "star_func ::= COUNT", + /* 581 */ "star_func ::= FIRST", + /* 582 */ "star_func ::= LAST", + /* 583 */ "star_func ::= LAST_ROW", + /* 584 */ "star_func_para_list ::= NK_STAR", + /* 585 */ "star_func_para_list ::= other_para_list", + /* 586 */ "other_para_list ::= star_func_para", + /* 587 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 588 */ "star_func_para ::= expr_or_subquery", + /* 589 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 590 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 591 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 592 */ "when_then_list ::= when_then_expr", + /* 593 */ "when_then_list ::= when_then_list when_then_expr", + /* 594 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 595 */ "case_when_else_opt ::=", + /* 596 */ "case_when_else_opt ::= ELSE common_expression", + /* 597 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 598 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 599 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 600 */ "predicate ::= expr_or_subquery IS NULL", + /* 601 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 602 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 603 */ "compare_op ::= NK_LT", + /* 604 */ "compare_op ::= NK_GT", + /* 605 */ "compare_op ::= NK_LE", + /* 606 */ "compare_op ::= NK_GE", + /* 607 */ "compare_op ::= NK_NE", + /* 608 */ "compare_op ::= NK_EQ", + /* 609 */ "compare_op ::= LIKE", + /* 610 */ "compare_op ::= NOT LIKE", + /* 611 */ "compare_op ::= MATCH", + /* 612 */ "compare_op ::= NMATCH", + /* 613 */ "compare_op ::= CONTAINS", + /* 614 */ "in_op ::= IN", + /* 615 */ "in_op ::= NOT IN", + /* 616 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 617 */ "boolean_value_expression ::= boolean_primary", + /* 618 */ "boolean_value_expression ::= NOT boolean_primary", + /* 619 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 620 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 621 */ "boolean_primary ::= predicate", + /* 622 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 623 */ "common_expression ::= expr_or_subquery", + /* 624 */ "common_expression ::= boolean_value_expression", + /* 625 */ "from_clause_opt ::=", + /* 626 */ "from_clause_opt ::= FROM table_reference_list", + /* 627 */ "table_reference_list ::= table_reference", + /* 628 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 629 */ "table_reference ::= table_primary", + /* 630 */ "table_reference ::= joined_table", + /* 631 */ "table_primary ::= table_name alias_opt", + /* 632 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 633 */ "table_primary ::= subquery alias_opt", + /* 634 */ "table_primary ::= parenthesized_joined_table", + /* 635 */ "alias_opt ::=", + /* 636 */ "alias_opt ::= table_alias", + /* 637 */ "alias_opt ::= AS table_alias", + /* 638 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 639 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 640 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", + /* 641 */ "join_type ::=", + /* 642 */ "join_type ::= INNER", + /* 643 */ "join_type ::= LEFT", + /* 644 */ "join_type ::= RIGHT", + /* 645 */ "join_type ::= FULL", + /* 646 */ "join_subtype ::=", + /* 647 */ "join_subtype ::= OUTER", + /* 648 */ "join_subtype ::= SEMI", + /* 649 */ "join_subtype ::= ANTI", + /* 650 */ "join_subtype ::= ASOF", + /* 651 */ "join_subtype ::= WINDOW", + /* 652 */ "join_on_clause_opt ::=", + /* 653 */ "join_on_clause_opt ::= ON search_condition", + /* 654 */ "window_offset_clause_opt ::=", + /* 655 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", + /* 656 */ "window_offset_literal ::= NK_VARIABLE", + /* 657 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", + /* 658 */ "jlimit_clause_opt ::=", + /* 659 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", + /* 660 */ "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", + /* 661 */ "hint_list ::=", + /* 662 */ "hint_list ::= NK_HINT", + /* 663 */ "tag_mode_opt ::=", + /* 664 */ "tag_mode_opt ::= TAGS", + /* 665 */ "set_quantifier_opt ::=", + /* 666 */ "set_quantifier_opt ::= DISTINCT", + /* 667 */ "set_quantifier_opt ::= ALL", + /* 668 */ "select_list ::= select_item", + /* 669 */ "select_list ::= select_list NK_COMMA select_item", + /* 670 */ "select_item ::= NK_STAR", + /* 671 */ "select_item ::= common_expression", + /* 672 */ "select_item ::= common_expression column_alias", + /* 673 */ "select_item ::= common_expression AS column_alias", + /* 674 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 675 */ "where_clause_opt ::=", + /* 676 */ "where_clause_opt ::= WHERE search_condition", + /* 677 */ "partition_by_clause_opt ::=", + /* 678 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 679 */ "partition_list ::= partition_item", + /* 680 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 681 */ "partition_item ::= expr_or_subquery", + /* 682 */ "partition_item ::= expr_or_subquery column_alias", + /* 683 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 684 */ "twindow_clause_opt ::=", + /* 685 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 686 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 687 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 688 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 689 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 690 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 691 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 692 */ "sliding_opt ::=", + /* 693 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 694 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 695 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 696 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 697 */ "fill_opt ::=", + /* 698 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 699 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 700 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 701 */ "fill_mode ::= NONE", + /* 702 */ "fill_mode ::= PREV", + /* 703 */ "fill_mode ::= NULL", + /* 704 */ "fill_mode ::= NULL_F", + /* 705 */ "fill_mode ::= LINEAR", + /* 706 */ "fill_mode ::= NEXT", + /* 707 */ "group_by_clause_opt ::=", + /* 708 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 709 */ "group_by_list ::= expr_or_subquery", + /* 710 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 711 */ "having_clause_opt ::=", + /* 712 */ "having_clause_opt ::= HAVING search_condition", + /* 713 */ "range_opt ::=", + /* 714 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 715 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 716 */ "every_opt ::=", + /* 717 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 718 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 719 */ "query_simple ::= query_specification", + /* 720 */ "query_simple ::= union_query_expression", + /* 721 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 722 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 723 */ "query_simple_or_subquery ::= query_simple", + /* 724 */ "query_simple_or_subquery ::= subquery", + /* 725 */ "query_or_subquery ::= query_expression", + /* 726 */ "query_or_subquery ::= subquery", + /* 727 */ "order_by_clause_opt ::=", + /* 728 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 729 */ "slimit_clause_opt ::=", + /* 730 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 731 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 732 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 733 */ "limit_clause_opt ::=", + /* 734 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 735 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 736 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 737 */ "subquery ::= NK_LP query_expression NK_RP", + /* 738 */ "subquery ::= NK_LP subquery NK_RP", + /* 739 */ "search_condition ::= common_expression", + /* 740 */ "sort_specification_list ::= sort_specification", + /* 741 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 742 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 743 */ "ordering_specification_opt ::=", + /* 744 */ "ordering_specification_opt ::= ASC", + /* 745 */ "ordering_specification_opt ::= DESC", + /* 746 */ "null_ordering_opt ::=", + /* 747 */ "null_ordering_opt ::= NULLS FIRST", + /* 748 */ "null_ordering_opt ::= NULLS LAST", + /* 749 */ "column_options ::=", + /* 750 */ "column_options ::= column_options PRIMARY KEY", + /* 751 */ "column_options ::= column_options ENCODE NK_STRING", + /* 752 */ "column_options ::= column_options COMPRESS NK_STRING", + /* 753 */ "column_options ::= column_options LEVEL NK_STRING", }; #endif /* NDEBUG */ @@ -3086,256 +3426,258 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 377: /* cmd */ - case 380: /* literal */ - case 389: /* with_opt */ - case 395: /* search_condition */ - case 400: /* db_options */ - case 402: /* alter_db_options */ - case 404: /* start_opt */ - case 405: /* end_opt */ - case 409: /* signed */ - case 411: /* retention */ - case 412: /* full_table_name */ - case 415: /* table_options */ - case 419: /* alter_table_clause */ - case 420: /* alter_table_options */ - case 423: /* column_options */ - case 424: /* tags_literal */ - case 425: /* create_subtable_clause */ - case 428: /* drop_table_clause */ - case 431: /* tag_def */ - case 432: /* column_def */ - case 437: /* duration_literal */ - case 438: /* rollup_func_name */ - case 440: /* col_name */ - case 443: /* like_pattern_opt */ - case 444: /* db_name_cond_opt */ - case 445: /* table_name_cond */ - case 446: /* from_db_opt */ - case 449: /* tag_item */ - case 453: /* full_tsma_name */ - case 455: /* index_options */ - case 456: /* full_index_name */ - case 458: /* sliding_opt */ - case 459: /* sma_stream_opt */ - case 460: /* func */ - case 464: /* query_or_subquery */ - case 465: /* where_clause_opt */ - case 468: /* explain_options */ - case 469: /* insert_query */ - case 474: /* full_view_name */ - case 477: /* stream_options */ - case 480: /* subtable_opt */ - case 483: /* column_stream_def */ - case 484: /* stream_col_options */ - case 485: /* expression */ - case 488: /* literal_func */ - case 489: /* signed_literal */ - case 492: /* expr_or_subquery */ - case 493: /* pseudo_column */ - case 494: /* column_reference */ - case 495: /* function_expression */ - case 496: /* case_when_expression */ - case 501: /* star_func_para */ - case 503: /* case_when_else_opt */ - case 504: /* common_expression */ - case 505: /* when_then_expr */ - case 506: /* predicate */ - case 509: /* in_predicate_value */ - case 510: /* boolean_value_expression */ - case 511: /* boolean_primary */ - case 512: /* from_clause_opt */ - case 513: /* table_reference_list */ - case 514: /* table_reference */ - case 515: /* table_primary */ - case 516: /* joined_table */ - case 518: /* subquery */ - case 519: /* parenthesized_joined_table */ - case 522: /* join_on_clause_opt */ - case 523: /* window_offset_clause_opt */ - case 524: /* jlimit_clause_opt */ - case 525: /* window_offset_literal */ - case 526: /* query_specification */ - case 532: /* range_opt */ - case 533: /* every_opt */ - case 534: /* fill_opt */ - case 535: /* twindow_clause_opt */ - case 537: /* having_clause_opt */ - case 538: /* select_item */ - case 540: /* partition_item */ - case 541: /* interval_sliding_duration_literal */ - case 544: /* query_expression */ - case 545: /* query_simple */ - case 547: /* slimit_clause_opt */ - case 548: /* limit_clause_opt */ - case 549: /* union_query_expression */ - case 550: /* query_simple_or_subquery */ - case 552: /* sort_specification */ + case 378: /* cmd */ + case 381: /* literal */ + case 392: /* with_opt */ + case 398: /* search_condition */ + case 403: /* db_options */ + case 405: /* alter_db_options */ + case 407: /* start_opt */ + case 408: /* end_opt */ + case 412: /* signed */ + case 414: /* retention */ + case 415: /* full_table_name */ + case 418: /* table_options */ + case 422: /* alter_table_clause */ + case 423: /* alter_table_options */ + case 426: /* column_options */ + case 427: /* tags_literal */ + case 428: /* create_subtable_clause */ + case 431: /* drop_table_clause */ + case 434: /* tag_def */ + case 435: /* column_def */ + case 440: /* duration_literal */ + case 441: /* rollup_func_name */ + case 443: /* col_name */ + case 446: /* like_pattern_opt */ + case 447: /* db_name_cond_opt */ + case 448: /* table_name_cond */ + case 449: /* from_db_opt */ + case 452: /* tag_item */ + case 456: /* full_tsma_name */ + case 458: /* index_options */ + case 459: /* full_index_name */ + case 461: /* sliding_opt */ + case 462: /* sma_stream_opt */ + case 463: /* func */ + case 467: /* query_or_subquery */ + case 468: /* where_clause_opt */ + case 471: /* explain_options */ + case 472: /* insert_query */ + case 477: /* full_view_name */ + case 480: /* stream_options */ + case 483: /* subtable_opt */ + case 486: /* column_stream_def */ + case 487: /* stream_col_options */ + case 488: /* expression */ + case 491: /* literal_func */ + case 492: /* signed_literal */ + case 495: /* expr_or_subquery */ + case 496: /* pseudo_column */ + case 497: /* column_reference */ + case 498: /* function_expression */ + case 499: /* case_when_expression */ + case 504: /* star_func_para */ + case 506: /* case_when_else_opt */ + case 507: /* common_expression */ + case 508: /* when_then_expr */ + case 509: /* predicate */ + case 512: /* in_predicate_value */ + case 513: /* boolean_value_expression */ + case 514: /* boolean_primary */ + case 515: /* from_clause_opt */ + case 516: /* table_reference_list */ + case 517: /* table_reference */ + case 518: /* table_primary */ + case 519: /* joined_table */ + case 521: /* subquery */ + case 522: /* parenthesized_joined_table */ + case 525: /* join_on_clause_opt */ + case 526: /* window_offset_clause_opt */ + case 527: /* jlimit_clause_opt */ + case 528: /* window_offset_literal */ + case 529: /* query_specification */ + case 535: /* range_opt */ + case 536: /* every_opt */ + case 537: /* fill_opt */ + case 538: /* twindow_clause_opt */ + case 540: /* having_clause_opt */ + case 541: /* select_item */ + case 543: /* partition_item */ + case 544: /* interval_sliding_duration_literal */ + case 547: /* query_expression */ + case 548: /* query_simple */ + case 550: /* slimit_clause_opt */ + case 551: /* limit_clause_opt */ + case 552: /* union_query_expression */ + case 553: /* query_simple_or_subquery */ + case 555: /* sort_specification */ { - nodesDestroyNode((yypminor->yy452)); + nodesDestroyNode((yypminor->yy416)); } break; - case 378: /* account_options */ - case 379: /* alter_account_options */ - case 381: /* alter_account_option */ - case 403: /* speed_opt */ - case 463: /* with_meta */ - case 472: /* bufsize_opt */ + case 379: /* account_options */ + case 380: /* alter_account_options */ + case 382: /* alter_account_option */ + case 406: /* speed_opt */ + case 466: /* with_meta */ + case 475: /* bufsize_opt */ { } break; - case 382: /* ip_range_list */ - case 383: /* white_list */ - case 384: /* white_list_opt */ - case 406: /* integer_list */ - case 407: /* variable_list */ - case 408: /* retention_list */ - case 413: /* column_def_list */ - case 414: /* tags_def_opt */ - case 416: /* multi_create_clause */ - case 417: /* tags_def */ - case 418: /* multi_drop_clause */ - case 426: /* specific_cols_opt */ - case 427: /* tags_literal_list */ - case 429: /* col_name_list */ - case 430: /* tag_def_list */ - case 434: /* duration_list */ - case 435: /* rollup_func_list */ - case 447: /* tag_list_opt */ - case 454: /* func_list */ - case 462: /* expression_list */ - case 478: /* col_list_opt */ - case 479: /* tag_def_or_ref_opt */ - case 482: /* column_stream_def_list */ - case 487: /* dnode_list */ - case 490: /* literal_list */ - case 498: /* star_func_para_list */ - case 500: /* other_para_list */ - case 502: /* when_then_list */ - case 527: /* hint_list */ - case 530: /* select_list */ - case 531: /* partition_by_clause_opt */ - case 536: /* group_by_clause_opt */ - case 539: /* partition_list */ - case 543: /* group_by_list */ - case 546: /* order_by_clause_opt */ - case 551: /* sort_specification_list */ + case 383: /* ip_range_list */ + case 384: /* white_list */ + case 385: /* white_list_opt */ + case 409: /* integer_list */ + case 410: /* variable_list */ + case 411: /* retention_list */ + case 416: /* column_def_list */ + case 417: /* tags_def_opt */ + case 419: /* multi_create_clause */ + case 420: /* tags_def */ + case 421: /* multi_drop_clause */ + case 429: /* specific_cols_opt */ + case 430: /* tags_literal_list */ + case 432: /* col_name_list */ + case 433: /* tag_def_list */ + case 437: /* duration_list */ + case 438: /* rollup_func_list */ + case 450: /* tag_list_opt */ + case 457: /* func_list */ + case 465: /* expression_list */ + case 481: /* col_list_opt */ + case 482: /* tag_def_or_ref_opt */ + case 485: /* column_stream_def_list */ + case 490: /* dnode_list */ + case 493: /* literal_list */ + case 501: /* star_func_para_list */ + case 503: /* other_para_list */ + case 505: /* when_then_list */ + case 530: /* hint_list */ + case 533: /* select_list */ + case 534: /* partition_by_clause_opt */ + case 539: /* group_by_clause_opt */ + case 542: /* partition_list */ + case 546: /* group_by_list */ + case 549: /* order_by_clause_opt */ + case 554: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy34)); + nodesDestroyList((yypminor->yy316)); } break; - case 385: /* user_name */ - case 392: /* db_name */ - case 393: /* table_name */ - case 394: /* topic_name */ - case 396: /* dnode_endpoint */ - case 421: /* column_name */ - case 439: /* function_name */ - case 450: /* column_alias */ - case 451: /* tsma_name */ - case 457: /* index_name */ - case 461: /* sma_func_name */ - case 466: /* cgroup_name */ - case 473: /* language_opt */ - case 475: /* view_name */ - case 476: /* stream_name */ - case 486: /* on_vgroup_id */ - case 491: /* table_alias */ - case 497: /* star_func */ - case 499: /* noarg_func */ - case 517: /* alias_opt */ + case 386: /* is_import_opt */ + case 387: /* is_createdb_opt */ + case 389: /* sysinfo_opt */ { } break; - case 386: /* sysinfo_opt */ + case 388: /* user_name */ + case 395: /* db_name */ + case 396: /* table_name */ + case 397: /* topic_name */ + case 399: /* dnode_endpoint */ + case 424: /* column_name */ + case 442: /* function_name */ + case 453: /* column_alias */ + case 454: /* tsma_name */ + case 460: /* index_name */ + case 464: /* sma_func_name */ + case 469: /* cgroup_name */ + case 476: /* language_opt */ + case 478: /* view_name */ + case 479: /* stream_name */ + case 489: /* on_vgroup_id */ + case 494: /* table_alias */ + case 500: /* star_func */ + case 502: /* noarg_func */ + case 520: /* alias_opt */ { } break; - case 387: /* privileges */ - case 390: /* priv_type_list */ - case 391: /* priv_type */ + case 390: /* privileges */ + case 393: /* priv_type_list */ + case 394: /* priv_type */ { } break; - case 388: /* priv_level */ + case 391: /* priv_level */ { } break; - case 397: /* force_opt */ - case 398: /* unsafe_opt */ - case 399: /* not_exists_opt */ - case 401: /* exists_opt */ - case 467: /* analyze_opt */ - case 470: /* or_replace_opt */ - case 471: /* agg_func_opt */ - case 481: /* ignore_opt */ - case 528: /* set_quantifier_opt */ - case 529: /* tag_mode_opt */ + case 400: /* force_opt */ + case 401: /* unsafe_opt */ + case 402: /* not_exists_opt */ + case 404: /* exists_opt */ + case 470: /* analyze_opt */ + case 473: /* or_replace_opt */ + case 474: /* agg_func_opt */ + case 484: /* ignore_opt */ + case 531: /* set_quantifier_opt */ + case 532: /* tag_mode_opt */ { } break; - case 410: /* alter_db_option */ - case 436: /* alter_table_option */ + case 413: /* alter_db_option */ + case 439: /* alter_table_option */ { } break; - case 422: /* type_name */ - case 433: /* type_name_default_len */ + case 425: /* type_name */ + case 436: /* type_name_default_len */ { } break; - case 441: /* db_kind_opt */ - case 448: /* table_kind */ + case 444: /* db_kind_opt */ + case 451: /* table_kind */ { } break; - case 442: /* table_kind_db_name_cond_opt */ + case 445: /* table_kind_db_name_cond_opt */ { } break; - case 452: /* tsma_func_list */ + case 455: /* tsma_func_list */ { - nodesDestroyNode((yypminor->yy452)); + nodesDestroyNode((yypminor->yy416)); } break; - case 507: /* compare_op */ - case 508: /* in_op */ + case 510: /* compare_op */ + case 511: /* in_op */ { } break; - case 520: /* join_type */ + case 523: /* join_type */ { } break; - case 521: /* join_subtype */ + case 524: /* join_subtype */ { } break; - case 542: /* fill_mode */ + case 545: /* fill_mode */ { } break; - case 553: /* ordering_specification_opt */ + case 556: /* ordering_specification_opt */ { } break; - case 554: /* null_ordering_opt */ + case 557: /* null_ordering_opt */ { } @@ -3504,7 +3846,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ - assert( i>=0 && i=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); return yy_action[i]; } }while(1); @@ -3626,755 +3968,760 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 377, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 377, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 378, /* (2) account_options ::= */ - 378, /* (3) account_options ::= account_options PPS literal */ - 378, /* (4) account_options ::= account_options TSERIES literal */ - 378, /* (5) account_options ::= account_options STORAGE literal */ - 378, /* (6) account_options ::= account_options STREAMS literal */ - 378, /* (7) account_options ::= account_options QTIME literal */ - 378, /* (8) account_options ::= account_options DBS literal */ - 378, /* (9) account_options ::= account_options USERS literal */ - 378, /* (10) account_options ::= account_options CONNS literal */ - 378, /* (11) account_options ::= account_options STATE literal */ - 379, /* (12) alter_account_options ::= alter_account_option */ - 379, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 381, /* (14) alter_account_option ::= PASS literal */ - 381, /* (15) alter_account_option ::= PPS literal */ - 381, /* (16) alter_account_option ::= TSERIES literal */ - 381, /* (17) alter_account_option ::= STORAGE literal */ - 381, /* (18) alter_account_option ::= STREAMS literal */ - 381, /* (19) alter_account_option ::= QTIME literal */ - 381, /* (20) alter_account_option ::= DBS literal */ - 381, /* (21) alter_account_option ::= USERS literal */ - 381, /* (22) alter_account_option ::= CONNS literal */ - 381, /* (23) alter_account_option ::= STATE literal */ - 382, /* (24) ip_range_list ::= NK_STRING */ - 382, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 383, /* (26) white_list ::= HOST ip_range_list */ - 384, /* (27) white_list_opt ::= */ - 384, /* (28) white_list_opt ::= white_list */ - 377, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ - 377, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ - 377, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 377, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 377, /* (33) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ - 377, /* (34) cmd ::= ALTER USER user_name ADD white_list */ - 377, /* (35) cmd ::= ALTER USER user_name DROP white_list */ - 377, /* (36) cmd ::= DROP USER user_name */ - 386, /* (37) sysinfo_opt ::= */ - 386, /* (38) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 377, /* (39) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - 377, /* (40) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - 387, /* (41) privileges ::= ALL */ - 387, /* (42) privileges ::= priv_type_list */ - 387, /* (43) privileges ::= SUBSCRIBE */ - 390, /* (44) priv_type_list ::= priv_type */ - 390, /* (45) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 391, /* (46) priv_type ::= READ */ - 391, /* (47) priv_type ::= WRITE */ - 391, /* (48) priv_type ::= ALTER */ - 388, /* (49) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 388, /* (50) priv_level ::= db_name NK_DOT NK_STAR */ - 388, /* (51) priv_level ::= db_name NK_DOT table_name */ - 388, /* (52) priv_level ::= topic_name */ - 389, /* (53) with_opt ::= */ - 389, /* (54) with_opt ::= WITH search_condition */ - 377, /* (55) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ - 377, /* (56) cmd ::= CREATE DNODE dnode_endpoint */ - 377, /* (57) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 377, /* (58) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 377, /* (59) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 377, /* (60) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 377, /* (61) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 377, /* (62) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 377, /* (63) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 377, /* (64) cmd ::= ALTER ALL DNODES NK_STRING */ - 377, /* (65) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 377, /* (66) cmd ::= RESTORE DNODE NK_INTEGER */ - 396, /* (67) dnode_endpoint ::= NK_STRING */ - 396, /* (68) dnode_endpoint ::= NK_ID */ - 396, /* (69) dnode_endpoint ::= NK_IPTOKEN */ - 397, /* (70) force_opt ::= */ - 397, /* (71) force_opt ::= FORCE */ - 398, /* (72) unsafe_opt ::= UNSAFE */ - 377, /* (73) cmd ::= ALTER CLUSTER NK_STRING */ - 377, /* (74) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - 377, /* (75) cmd ::= ALTER LOCAL NK_STRING */ - 377, /* (76) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 377, /* (77) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 377, /* (78) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 377, /* (79) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 377, /* (80) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 377, /* (81) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 377, /* (82) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 377, /* (83) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 377, /* (84) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 377, /* (85) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 377, /* (86) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 377, /* (87) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 377, /* (88) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 377, /* (89) cmd ::= DROP DATABASE exists_opt db_name */ - 377, /* (90) cmd ::= USE db_name */ - 377, /* (91) cmd ::= ALTER DATABASE db_name alter_db_options */ - 377, /* (92) cmd ::= FLUSH DATABASE db_name */ - 377, /* (93) cmd ::= TRIM DATABASE db_name speed_opt */ - 377, /* (94) cmd ::= S3MIGRATE DATABASE db_name */ - 377, /* (95) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 399, /* (96) not_exists_opt ::= IF NOT EXISTS */ - 399, /* (97) not_exists_opt ::= */ - 401, /* (98) exists_opt ::= IF EXISTS */ - 401, /* (99) exists_opt ::= */ - 400, /* (100) db_options ::= */ - 400, /* (101) db_options ::= db_options BUFFER NK_INTEGER */ - 400, /* (102) db_options ::= db_options CACHEMODEL NK_STRING */ - 400, /* (103) db_options ::= db_options CACHESIZE NK_INTEGER */ - 400, /* (104) db_options ::= db_options COMP NK_INTEGER */ - 400, /* (105) db_options ::= db_options DURATION NK_INTEGER */ - 400, /* (106) db_options ::= db_options DURATION NK_VARIABLE */ - 400, /* (107) db_options ::= db_options MAXROWS NK_INTEGER */ - 400, /* (108) db_options ::= db_options MINROWS NK_INTEGER */ - 400, /* (109) db_options ::= db_options KEEP integer_list */ - 400, /* (110) db_options ::= db_options KEEP variable_list */ - 400, /* (111) db_options ::= db_options PAGES NK_INTEGER */ - 400, /* (112) db_options ::= db_options PAGESIZE NK_INTEGER */ - 400, /* (113) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 400, /* (114) db_options ::= db_options PRECISION NK_STRING */ - 400, /* (115) db_options ::= db_options REPLICA NK_INTEGER */ - 400, /* (116) db_options ::= db_options VGROUPS NK_INTEGER */ - 400, /* (117) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 400, /* (118) db_options ::= db_options RETENTIONS retention_list */ - 400, /* (119) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 400, /* (120) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 400, /* (121) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 400, /* (122) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 400, /* (123) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 400, /* (124) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 400, /* (125) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 400, /* (126) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 400, /* (127) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 400, /* (128) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 400, /* (129) db_options ::= db_options TABLE_PREFIX signed */ - 400, /* (130) db_options ::= db_options TABLE_SUFFIX signed */ - 400, /* (131) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ - 400, /* (132) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - 400, /* (133) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - 400, /* (134) db_options ::= db_options S3_COMPACT NK_INTEGER */ - 400, /* (135) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 400, /* (136) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - 402, /* (137) alter_db_options ::= alter_db_option */ - 402, /* (138) alter_db_options ::= alter_db_options alter_db_option */ - 410, /* (139) alter_db_option ::= BUFFER NK_INTEGER */ - 410, /* (140) alter_db_option ::= CACHEMODEL NK_STRING */ - 410, /* (141) alter_db_option ::= CACHESIZE NK_INTEGER */ - 410, /* (142) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 410, /* (143) alter_db_option ::= KEEP integer_list */ - 410, /* (144) alter_db_option ::= KEEP variable_list */ - 410, /* (145) alter_db_option ::= PAGES NK_INTEGER */ - 410, /* (146) alter_db_option ::= REPLICA NK_INTEGER */ - 410, /* (147) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 410, /* (148) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 410, /* (149) alter_db_option ::= MINROWS NK_INTEGER */ - 410, /* (150) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 410, /* (151) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 410, /* (152) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 410, /* (153) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 410, /* (154) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - 410, /* (155) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - 410, /* (156) alter_db_option ::= S3_COMPACT NK_INTEGER */ - 410, /* (157) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 410, /* (158) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - 406, /* (159) integer_list ::= NK_INTEGER */ - 406, /* (160) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 407, /* (161) variable_list ::= NK_VARIABLE */ - 407, /* (162) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 408, /* (163) retention_list ::= retention */ - 408, /* (164) retention_list ::= retention_list NK_COMMA retention */ - 411, /* (165) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 411, /* (166) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 403, /* (167) speed_opt ::= */ - 403, /* (168) speed_opt ::= BWLIMIT NK_INTEGER */ - 404, /* (169) start_opt ::= */ - 404, /* (170) start_opt ::= START WITH NK_INTEGER */ - 404, /* (171) start_opt ::= START WITH NK_STRING */ - 404, /* (172) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 405, /* (173) end_opt ::= */ - 405, /* (174) end_opt ::= END WITH NK_INTEGER */ - 405, /* (175) end_opt ::= END WITH NK_STRING */ - 405, /* (176) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 377, /* (177) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 377, /* (178) cmd ::= CREATE TABLE multi_create_clause */ - 377, /* (179) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 377, /* (180) cmd ::= DROP TABLE multi_drop_clause */ - 377, /* (181) cmd ::= DROP STABLE exists_opt full_table_name */ - 377, /* (182) cmd ::= ALTER TABLE alter_table_clause */ - 377, /* (183) cmd ::= ALTER STABLE alter_table_clause */ - 419, /* (184) alter_table_clause ::= full_table_name alter_table_options */ - 419, /* (185) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ - 419, /* (186) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 419, /* (187) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 419, /* (188) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ - 419, /* (189) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 419, /* (190) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 419, /* (191) alter_table_clause ::= full_table_name DROP TAG column_name */ - 419, /* (192) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 419, /* (193) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 419, /* (194) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - 416, /* (195) multi_create_clause ::= create_subtable_clause */ - 416, /* (196) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 425, /* (197) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ - 418, /* (198) multi_drop_clause ::= drop_table_clause */ - 418, /* (199) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 428, /* (200) drop_table_clause ::= exists_opt full_table_name */ - 426, /* (201) specific_cols_opt ::= */ - 426, /* (202) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 412, /* (203) full_table_name ::= table_name */ - 412, /* (204) full_table_name ::= db_name NK_DOT table_name */ - 430, /* (205) tag_def_list ::= tag_def */ - 430, /* (206) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - 431, /* (207) tag_def ::= column_name type_name */ - 413, /* (208) column_def_list ::= column_def */ - 413, /* (209) column_def_list ::= column_def_list NK_COMMA column_def */ - 432, /* (210) column_def ::= column_name type_name column_options */ - 422, /* (211) type_name ::= BOOL */ - 422, /* (212) type_name ::= TINYINT */ - 422, /* (213) type_name ::= SMALLINT */ - 422, /* (214) type_name ::= INT */ - 422, /* (215) type_name ::= INTEGER */ - 422, /* (216) type_name ::= BIGINT */ - 422, /* (217) type_name ::= FLOAT */ - 422, /* (218) type_name ::= DOUBLE */ - 422, /* (219) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 422, /* (220) type_name ::= TIMESTAMP */ - 422, /* (221) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 422, /* (222) type_name ::= TINYINT UNSIGNED */ - 422, /* (223) type_name ::= SMALLINT UNSIGNED */ - 422, /* (224) type_name ::= INT UNSIGNED */ - 422, /* (225) type_name ::= BIGINT UNSIGNED */ - 422, /* (226) type_name ::= JSON */ - 422, /* (227) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 422, /* (228) type_name ::= MEDIUMBLOB */ - 422, /* (229) type_name ::= BLOB */ - 422, /* (230) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 422, /* (231) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 422, /* (232) type_name ::= DECIMAL */ - 422, /* (233) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 422, /* (234) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 433, /* (235) type_name_default_len ::= BINARY */ - 433, /* (236) type_name_default_len ::= NCHAR */ - 433, /* (237) type_name_default_len ::= VARCHAR */ - 433, /* (238) type_name_default_len ::= VARBINARY */ - 414, /* (239) tags_def_opt ::= */ - 414, /* (240) tags_def_opt ::= tags_def */ - 417, /* (241) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - 415, /* (242) table_options ::= */ - 415, /* (243) table_options ::= table_options COMMENT NK_STRING */ - 415, /* (244) table_options ::= table_options MAX_DELAY duration_list */ - 415, /* (245) table_options ::= table_options WATERMARK duration_list */ - 415, /* (246) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 415, /* (247) table_options ::= table_options TTL NK_INTEGER */ - 415, /* (248) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 415, /* (249) table_options ::= table_options DELETE_MARK duration_list */ - 420, /* (250) alter_table_options ::= alter_table_option */ - 420, /* (251) alter_table_options ::= alter_table_options alter_table_option */ - 436, /* (252) alter_table_option ::= COMMENT NK_STRING */ - 436, /* (253) alter_table_option ::= TTL NK_INTEGER */ - 434, /* (254) duration_list ::= duration_literal */ - 434, /* (255) duration_list ::= duration_list NK_COMMA duration_literal */ - 435, /* (256) rollup_func_list ::= rollup_func_name */ - 435, /* (257) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 438, /* (258) rollup_func_name ::= function_name */ - 438, /* (259) rollup_func_name ::= FIRST */ - 438, /* (260) rollup_func_name ::= LAST */ - 429, /* (261) col_name_list ::= col_name */ - 429, /* (262) col_name_list ::= col_name_list NK_COMMA col_name */ - 440, /* (263) col_name ::= column_name */ - 377, /* (264) cmd ::= SHOW DNODES */ - 377, /* (265) cmd ::= SHOW USERS */ - 377, /* (266) cmd ::= SHOW USER PRIVILEGES */ - 377, /* (267) cmd ::= SHOW db_kind_opt DATABASES */ - 377, /* (268) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 377, /* (269) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 377, /* (270) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 377, /* (271) cmd ::= SHOW MNODES */ - 377, /* (272) cmd ::= SHOW QNODES */ - 377, /* (273) cmd ::= SHOW ARBGROUPS */ - 377, /* (274) cmd ::= SHOW FUNCTIONS */ - 377, /* (275) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 377, /* (276) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 377, /* (277) cmd ::= SHOW STREAMS */ - 377, /* (278) cmd ::= SHOW ACCOUNTS */ - 377, /* (279) cmd ::= SHOW APPS */ - 377, /* (280) cmd ::= SHOW CONNECTIONS */ - 377, /* (281) cmd ::= SHOW LICENCES */ - 377, /* (282) cmd ::= SHOW GRANTS */ - 377, /* (283) cmd ::= SHOW GRANTS FULL */ - 377, /* (284) cmd ::= SHOW GRANTS LOGS */ - 377, /* (285) cmd ::= SHOW CLUSTER MACHINES */ - 377, /* (286) cmd ::= SHOW CREATE DATABASE db_name */ - 377, /* (287) cmd ::= SHOW CREATE TABLE full_table_name */ - 377, /* (288) cmd ::= SHOW CREATE STABLE full_table_name */ - 377, /* (289) cmd ::= SHOW ENCRYPTIONS */ - 377, /* (290) cmd ::= SHOW QUERIES */ - 377, /* (291) cmd ::= SHOW SCORES */ - 377, /* (292) cmd ::= SHOW TOPICS */ - 377, /* (293) cmd ::= SHOW VARIABLES */ - 377, /* (294) cmd ::= SHOW CLUSTER VARIABLES */ - 377, /* (295) cmd ::= SHOW LOCAL VARIABLES */ - 377, /* (296) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 377, /* (297) cmd ::= SHOW BNODES */ - 377, /* (298) cmd ::= SHOW SNODES */ - 377, /* (299) cmd ::= SHOW CLUSTER */ - 377, /* (300) cmd ::= SHOW TRANSACTIONS */ - 377, /* (301) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 377, /* (302) cmd ::= SHOW CONSUMERS */ - 377, /* (303) cmd ::= SHOW SUBSCRIPTIONS */ - 377, /* (304) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 377, /* (305) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 377, /* (306) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 377, /* (307) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 377, /* (308) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 377, /* (309) cmd ::= SHOW VNODES */ - 377, /* (310) cmd ::= SHOW db_name_cond_opt ALIVE */ - 377, /* (311) cmd ::= SHOW CLUSTER ALIVE */ - 377, /* (312) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - 377, /* (313) cmd ::= SHOW CREATE VIEW full_table_name */ - 377, /* (314) cmd ::= SHOW COMPACTS */ - 377, /* (315) cmd ::= SHOW COMPACT NK_INTEGER */ - 442, /* (316) table_kind_db_name_cond_opt ::= */ - 442, /* (317) table_kind_db_name_cond_opt ::= table_kind */ - 442, /* (318) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 442, /* (319) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 448, /* (320) table_kind ::= NORMAL */ - 448, /* (321) table_kind ::= CHILD */ - 444, /* (322) db_name_cond_opt ::= */ - 444, /* (323) db_name_cond_opt ::= db_name NK_DOT */ - 443, /* (324) like_pattern_opt ::= */ - 443, /* (325) like_pattern_opt ::= LIKE NK_STRING */ - 445, /* (326) table_name_cond ::= table_name */ - 446, /* (327) from_db_opt ::= */ - 446, /* (328) from_db_opt ::= FROM db_name */ - 447, /* (329) tag_list_opt ::= */ - 447, /* (330) tag_list_opt ::= tag_item */ - 447, /* (331) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 449, /* (332) tag_item ::= TBNAME */ - 449, /* (333) tag_item ::= QTAGS */ - 449, /* (334) tag_item ::= column_name */ - 449, /* (335) tag_item ::= column_name column_alias */ - 449, /* (336) tag_item ::= column_name AS column_alias */ - 441, /* (337) db_kind_opt ::= */ - 441, /* (338) db_kind_opt ::= USER */ - 441, /* (339) db_kind_opt ::= SYSTEM */ - 377, /* (340) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - 377, /* (341) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - 377, /* (342) cmd ::= DROP TSMA exists_opt full_tsma_name */ - 377, /* (343) cmd ::= SHOW db_name_cond_opt TSMAS */ - 453, /* (344) full_tsma_name ::= tsma_name */ - 453, /* (345) full_tsma_name ::= db_name NK_DOT tsma_name */ - 452, /* (346) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - 377, /* (347) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 377, /* (348) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 377, /* (349) cmd ::= DROP INDEX exists_opt full_index_name */ - 456, /* (350) full_index_name ::= index_name */ - 456, /* (351) full_index_name ::= db_name NK_DOT index_name */ - 455, /* (352) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 455, /* (353) 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 */ - 454, /* (354) func_list ::= func */ - 454, /* (355) func_list ::= func_list NK_COMMA func */ - 460, /* (356) func ::= sma_func_name NK_LP expression_list NK_RP */ - 461, /* (357) sma_func_name ::= function_name */ - 461, /* (358) sma_func_name ::= COUNT */ - 461, /* (359) sma_func_name ::= FIRST */ - 461, /* (360) sma_func_name ::= LAST */ - 461, /* (361) sma_func_name ::= LAST_ROW */ - 459, /* (362) sma_stream_opt ::= */ - 459, /* (363) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 459, /* (364) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 459, /* (365) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 463, /* (366) with_meta ::= AS */ - 463, /* (367) with_meta ::= WITH META AS */ - 463, /* (368) with_meta ::= ONLY META AS */ - 377, /* (369) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 377, /* (370) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 377, /* (371) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 377, /* (372) cmd ::= DROP TOPIC exists_opt topic_name */ - 377, /* (373) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 377, /* (374) cmd ::= DESC full_table_name */ - 377, /* (375) cmd ::= DESCRIBE full_table_name */ - 377, /* (376) cmd ::= RESET QUERY CACHE */ - 377, /* (377) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 377, /* (378) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 467, /* (379) analyze_opt ::= */ - 467, /* (380) analyze_opt ::= ANALYZE */ - 468, /* (381) explain_options ::= */ - 468, /* (382) explain_options ::= explain_options VERBOSE NK_BOOL */ - 468, /* (383) explain_options ::= explain_options RATIO NK_FLOAT */ - 377, /* (384) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 377, /* (385) cmd ::= DROP FUNCTION exists_opt function_name */ - 471, /* (386) agg_func_opt ::= */ - 471, /* (387) agg_func_opt ::= AGGREGATE */ - 472, /* (388) bufsize_opt ::= */ - 472, /* (389) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 473, /* (390) language_opt ::= */ - 473, /* (391) language_opt ::= LANGUAGE NK_STRING */ - 470, /* (392) or_replace_opt ::= */ - 470, /* (393) or_replace_opt ::= OR REPLACE */ - 377, /* (394) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 377, /* (395) cmd ::= DROP VIEW exists_opt full_view_name */ - 474, /* (396) full_view_name ::= view_name */ - 474, /* (397) full_view_name ::= db_name NK_DOT view_name */ - 377, /* (398) 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 */ - 377, /* (399) cmd ::= DROP STREAM exists_opt stream_name */ - 377, /* (400) cmd ::= PAUSE STREAM exists_opt stream_name */ - 377, /* (401) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 478, /* (402) col_list_opt ::= */ - 478, /* (403) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - 482, /* (404) column_stream_def_list ::= column_stream_def */ - 482, /* (405) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - 483, /* (406) column_stream_def ::= column_name stream_col_options */ - 484, /* (407) stream_col_options ::= */ - 484, /* (408) stream_col_options ::= stream_col_options PRIMARY KEY */ - 479, /* (409) tag_def_or_ref_opt ::= */ - 479, /* (410) tag_def_or_ref_opt ::= tags_def */ - 479, /* (411) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 477, /* (412) stream_options ::= */ - 477, /* (413) stream_options ::= stream_options TRIGGER AT_ONCE */ - 477, /* (414) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 477, /* (415) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 477, /* (416) stream_options ::= stream_options WATERMARK duration_literal */ - 477, /* (417) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 477, /* (418) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 477, /* (419) stream_options ::= stream_options DELETE_MARK duration_literal */ - 477, /* (420) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 480, /* (421) subtable_opt ::= */ - 480, /* (422) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 481, /* (423) ignore_opt ::= */ - 481, /* (424) ignore_opt ::= IGNORE UNTREATED */ - 377, /* (425) cmd ::= KILL CONNECTION NK_INTEGER */ - 377, /* (426) cmd ::= KILL QUERY NK_STRING */ - 377, /* (427) cmd ::= KILL TRANSACTION NK_INTEGER */ - 377, /* (428) cmd ::= KILL COMPACT NK_INTEGER */ - 377, /* (429) cmd ::= BALANCE VGROUP */ - 377, /* (430) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 377, /* (431) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - 377, /* (432) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 377, /* (433) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 377, /* (434) cmd ::= SPLIT VGROUP NK_INTEGER */ - 486, /* (435) on_vgroup_id ::= */ - 486, /* (436) on_vgroup_id ::= ON NK_INTEGER */ - 487, /* (437) dnode_list ::= DNODE NK_INTEGER */ - 487, /* (438) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 377, /* (439) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 377, /* (440) cmd ::= query_or_subquery */ - 377, /* (441) cmd ::= insert_query */ - 469, /* (442) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 469, /* (443) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 424, /* (444) tags_literal ::= NK_INTEGER */ - 424, /* (445) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - 424, /* (446) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - 424, /* (447) tags_literal ::= NK_PLUS NK_INTEGER */ - 424, /* (448) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - 424, /* (449) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - 424, /* (450) tags_literal ::= NK_MINUS NK_INTEGER */ - 424, /* (451) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - 424, /* (452) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - 424, /* (453) tags_literal ::= NK_FLOAT */ - 424, /* (454) tags_literal ::= NK_PLUS NK_FLOAT */ - 424, /* (455) tags_literal ::= NK_MINUS NK_FLOAT */ - 424, /* (456) tags_literal ::= NK_BIN */ - 424, /* (457) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - 424, /* (458) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - 424, /* (459) tags_literal ::= NK_PLUS NK_BIN */ - 424, /* (460) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - 424, /* (461) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - 424, /* (462) tags_literal ::= NK_MINUS NK_BIN */ - 424, /* (463) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - 424, /* (464) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - 424, /* (465) tags_literal ::= NK_HEX */ - 424, /* (466) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - 424, /* (467) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - 424, /* (468) tags_literal ::= NK_PLUS NK_HEX */ - 424, /* (469) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - 424, /* (470) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - 424, /* (471) tags_literal ::= NK_MINUS NK_HEX */ - 424, /* (472) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - 424, /* (473) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - 424, /* (474) tags_literal ::= NK_STRING */ - 424, /* (475) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - 424, /* (476) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - 424, /* (477) tags_literal ::= NK_BOOL */ - 424, /* (478) tags_literal ::= NULL */ - 424, /* (479) tags_literal ::= literal_func */ - 424, /* (480) tags_literal ::= literal_func NK_PLUS duration_literal */ - 424, /* (481) tags_literal ::= literal_func NK_MINUS duration_literal */ - 427, /* (482) tags_literal_list ::= tags_literal */ - 427, /* (483) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - 380, /* (484) literal ::= NK_INTEGER */ - 380, /* (485) literal ::= NK_FLOAT */ - 380, /* (486) literal ::= NK_STRING */ - 380, /* (487) literal ::= NK_BOOL */ - 380, /* (488) literal ::= TIMESTAMP NK_STRING */ - 380, /* (489) literal ::= duration_literal */ - 380, /* (490) literal ::= NULL */ - 380, /* (491) literal ::= NK_QUESTION */ - 437, /* (492) duration_literal ::= NK_VARIABLE */ - 409, /* (493) signed ::= NK_INTEGER */ - 409, /* (494) signed ::= NK_PLUS NK_INTEGER */ - 409, /* (495) signed ::= NK_MINUS NK_INTEGER */ - 409, /* (496) signed ::= NK_FLOAT */ - 409, /* (497) signed ::= NK_PLUS NK_FLOAT */ - 409, /* (498) signed ::= NK_MINUS NK_FLOAT */ - 489, /* (499) signed_literal ::= signed */ - 489, /* (500) signed_literal ::= NK_STRING */ - 489, /* (501) signed_literal ::= NK_BOOL */ - 489, /* (502) signed_literal ::= TIMESTAMP NK_STRING */ - 489, /* (503) signed_literal ::= duration_literal */ - 489, /* (504) signed_literal ::= NULL */ - 489, /* (505) signed_literal ::= literal_func */ - 489, /* (506) signed_literal ::= NK_QUESTION */ - 490, /* (507) literal_list ::= signed_literal */ - 490, /* (508) literal_list ::= literal_list NK_COMMA signed_literal */ - 392, /* (509) db_name ::= NK_ID */ - 393, /* (510) table_name ::= NK_ID */ - 421, /* (511) column_name ::= NK_ID */ - 439, /* (512) function_name ::= NK_ID */ - 475, /* (513) view_name ::= NK_ID */ - 491, /* (514) table_alias ::= NK_ID */ - 450, /* (515) column_alias ::= NK_ID */ - 450, /* (516) column_alias ::= NK_ALIAS */ - 385, /* (517) user_name ::= NK_ID */ - 394, /* (518) topic_name ::= NK_ID */ - 476, /* (519) stream_name ::= NK_ID */ - 466, /* (520) cgroup_name ::= NK_ID */ - 457, /* (521) index_name ::= NK_ID */ - 451, /* (522) tsma_name ::= NK_ID */ - 492, /* (523) expr_or_subquery ::= expression */ - 485, /* (524) expression ::= literal */ - 485, /* (525) expression ::= pseudo_column */ - 485, /* (526) expression ::= column_reference */ - 485, /* (527) expression ::= function_expression */ - 485, /* (528) expression ::= case_when_expression */ - 485, /* (529) expression ::= NK_LP expression NK_RP */ - 485, /* (530) expression ::= NK_PLUS expr_or_subquery */ - 485, /* (531) expression ::= NK_MINUS expr_or_subquery */ - 485, /* (532) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 485, /* (533) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 485, /* (534) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 485, /* (535) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 485, /* (536) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 485, /* (537) expression ::= column_reference NK_ARROW NK_STRING */ - 485, /* (538) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 485, /* (539) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 462, /* (540) expression_list ::= expr_or_subquery */ - 462, /* (541) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 494, /* (542) column_reference ::= column_name */ - 494, /* (543) column_reference ::= table_name NK_DOT column_name */ - 494, /* (544) column_reference ::= NK_ALIAS */ - 494, /* (545) column_reference ::= table_name NK_DOT NK_ALIAS */ - 493, /* (546) pseudo_column ::= ROWTS */ - 493, /* (547) pseudo_column ::= TBNAME */ - 493, /* (548) pseudo_column ::= table_name NK_DOT TBNAME */ - 493, /* (549) pseudo_column ::= QSTART */ - 493, /* (550) pseudo_column ::= QEND */ - 493, /* (551) pseudo_column ::= QDURATION */ - 493, /* (552) pseudo_column ::= WSTART */ - 493, /* (553) pseudo_column ::= WEND */ - 493, /* (554) pseudo_column ::= WDURATION */ - 493, /* (555) pseudo_column ::= IROWTS */ - 493, /* (556) pseudo_column ::= ISFILLED */ - 493, /* (557) pseudo_column ::= QTAGS */ - 495, /* (558) function_expression ::= function_name NK_LP expression_list NK_RP */ - 495, /* (559) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 495, /* (560) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 495, /* (561) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - 495, /* (562) function_expression ::= literal_func */ - 488, /* (563) literal_func ::= noarg_func NK_LP NK_RP */ - 488, /* (564) literal_func ::= NOW */ - 488, /* (565) literal_func ::= TODAY */ - 499, /* (566) noarg_func ::= NOW */ - 499, /* (567) noarg_func ::= TODAY */ - 499, /* (568) noarg_func ::= TIMEZONE */ - 499, /* (569) noarg_func ::= DATABASE */ - 499, /* (570) noarg_func ::= CLIENT_VERSION */ - 499, /* (571) noarg_func ::= SERVER_VERSION */ - 499, /* (572) noarg_func ::= SERVER_STATUS */ - 499, /* (573) noarg_func ::= CURRENT_USER */ - 499, /* (574) noarg_func ::= USER */ - 497, /* (575) star_func ::= COUNT */ - 497, /* (576) star_func ::= FIRST */ - 497, /* (577) star_func ::= LAST */ - 497, /* (578) star_func ::= LAST_ROW */ - 498, /* (579) star_func_para_list ::= NK_STAR */ - 498, /* (580) star_func_para_list ::= other_para_list */ - 500, /* (581) other_para_list ::= star_func_para */ - 500, /* (582) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 501, /* (583) star_func_para ::= expr_or_subquery */ - 501, /* (584) star_func_para ::= table_name NK_DOT NK_STAR */ - 496, /* (585) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 496, /* (586) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 502, /* (587) when_then_list ::= when_then_expr */ - 502, /* (588) when_then_list ::= when_then_list when_then_expr */ - 505, /* (589) when_then_expr ::= WHEN common_expression THEN common_expression */ - 503, /* (590) case_when_else_opt ::= */ - 503, /* (591) case_when_else_opt ::= ELSE common_expression */ - 506, /* (592) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 506, /* (593) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 506, /* (594) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 506, /* (595) predicate ::= expr_or_subquery IS NULL */ - 506, /* (596) predicate ::= expr_or_subquery IS NOT NULL */ - 506, /* (597) predicate ::= expr_or_subquery in_op in_predicate_value */ - 507, /* (598) compare_op ::= NK_LT */ - 507, /* (599) compare_op ::= NK_GT */ - 507, /* (600) compare_op ::= NK_LE */ - 507, /* (601) compare_op ::= NK_GE */ - 507, /* (602) compare_op ::= NK_NE */ - 507, /* (603) compare_op ::= NK_EQ */ - 507, /* (604) compare_op ::= LIKE */ - 507, /* (605) compare_op ::= NOT LIKE */ - 507, /* (606) compare_op ::= MATCH */ - 507, /* (607) compare_op ::= NMATCH */ - 507, /* (608) compare_op ::= CONTAINS */ - 508, /* (609) in_op ::= IN */ - 508, /* (610) in_op ::= NOT IN */ - 509, /* (611) in_predicate_value ::= NK_LP literal_list NK_RP */ - 510, /* (612) boolean_value_expression ::= boolean_primary */ - 510, /* (613) boolean_value_expression ::= NOT boolean_primary */ - 510, /* (614) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 510, /* (615) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 511, /* (616) boolean_primary ::= predicate */ - 511, /* (617) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 504, /* (618) common_expression ::= expr_or_subquery */ - 504, /* (619) common_expression ::= boolean_value_expression */ - 512, /* (620) from_clause_opt ::= */ - 512, /* (621) from_clause_opt ::= FROM table_reference_list */ - 513, /* (622) table_reference_list ::= table_reference */ - 513, /* (623) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 514, /* (624) table_reference ::= table_primary */ - 514, /* (625) table_reference ::= joined_table */ - 515, /* (626) table_primary ::= table_name alias_opt */ - 515, /* (627) table_primary ::= db_name NK_DOT table_name alias_opt */ - 515, /* (628) table_primary ::= subquery alias_opt */ - 515, /* (629) table_primary ::= parenthesized_joined_table */ - 517, /* (630) alias_opt ::= */ - 517, /* (631) alias_opt ::= table_alias */ - 517, /* (632) alias_opt ::= AS table_alias */ - 519, /* (633) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 519, /* (634) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 516, /* (635) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 520, /* (636) join_type ::= */ - 520, /* (637) join_type ::= INNER */ - 520, /* (638) join_type ::= LEFT */ - 520, /* (639) join_type ::= RIGHT */ - 520, /* (640) join_type ::= FULL */ - 521, /* (641) join_subtype ::= */ - 521, /* (642) join_subtype ::= OUTER */ - 521, /* (643) join_subtype ::= SEMI */ - 521, /* (644) join_subtype ::= ANTI */ - 521, /* (645) join_subtype ::= ASOF */ - 521, /* (646) join_subtype ::= WINDOW */ - 522, /* (647) join_on_clause_opt ::= */ - 522, /* (648) join_on_clause_opt ::= ON search_condition */ - 523, /* (649) window_offset_clause_opt ::= */ - 523, /* (650) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - 525, /* (651) window_offset_literal ::= NK_VARIABLE */ - 525, /* (652) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 524, /* (653) jlimit_clause_opt ::= */ - 524, /* (654) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - 526, /* (655) 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 */ - 527, /* (656) hint_list ::= */ - 527, /* (657) hint_list ::= NK_HINT */ - 529, /* (658) tag_mode_opt ::= */ - 529, /* (659) tag_mode_opt ::= TAGS */ - 528, /* (660) set_quantifier_opt ::= */ - 528, /* (661) set_quantifier_opt ::= DISTINCT */ - 528, /* (662) set_quantifier_opt ::= ALL */ - 530, /* (663) select_list ::= select_item */ - 530, /* (664) select_list ::= select_list NK_COMMA select_item */ - 538, /* (665) select_item ::= NK_STAR */ - 538, /* (666) select_item ::= common_expression */ - 538, /* (667) select_item ::= common_expression column_alias */ - 538, /* (668) select_item ::= common_expression AS column_alias */ - 538, /* (669) select_item ::= table_name NK_DOT NK_STAR */ - 465, /* (670) where_clause_opt ::= */ - 465, /* (671) where_clause_opt ::= WHERE search_condition */ - 531, /* (672) partition_by_clause_opt ::= */ - 531, /* (673) partition_by_clause_opt ::= PARTITION BY partition_list */ - 539, /* (674) partition_list ::= partition_item */ - 539, /* (675) partition_list ::= partition_list NK_COMMA partition_item */ - 540, /* (676) partition_item ::= expr_or_subquery */ - 540, /* (677) partition_item ::= expr_or_subquery column_alias */ - 540, /* (678) partition_item ::= expr_or_subquery AS column_alias */ - 535, /* (679) twindow_clause_opt ::= */ - 535, /* (680) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 535, /* (681) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 535, /* (682) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 535, /* (683) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 535, /* (684) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 535, /* (685) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - 535, /* (686) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 458, /* (687) sliding_opt ::= */ - 458, /* (688) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 541, /* (689) interval_sliding_duration_literal ::= NK_VARIABLE */ - 541, /* (690) interval_sliding_duration_literal ::= NK_STRING */ - 541, /* (691) interval_sliding_duration_literal ::= NK_INTEGER */ - 534, /* (692) fill_opt ::= */ - 534, /* (693) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 534, /* (694) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 534, /* (695) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 542, /* (696) fill_mode ::= NONE */ - 542, /* (697) fill_mode ::= PREV */ - 542, /* (698) fill_mode ::= NULL */ - 542, /* (699) fill_mode ::= NULL_F */ - 542, /* (700) fill_mode ::= LINEAR */ - 542, /* (701) fill_mode ::= NEXT */ - 536, /* (702) group_by_clause_opt ::= */ - 536, /* (703) group_by_clause_opt ::= GROUP BY group_by_list */ - 543, /* (704) group_by_list ::= expr_or_subquery */ - 543, /* (705) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 537, /* (706) having_clause_opt ::= */ - 537, /* (707) having_clause_opt ::= HAVING search_condition */ - 532, /* (708) range_opt ::= */ - 532, /* (709) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 532, /* (710) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 533, /* (711) every_opt ::= */ - 533, /* (712) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 544, /* (713) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 545, /* (714) query_simple ::= query_specification */ - 545, /* (715) query_simple ::= union_query_expression */ - 549, /* (716) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 549, /* (717) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 550, /* (718) query_simple_or_subquery ::= query_simple */ - 550, /* (719) query_simple_or_subquery ::= subquery */ - 464, /* (720) query_or_subquery ::= query_expression */ - 464, /* (721) query_or_subquery ::= subquery */ - 546, /* (722) order_by_clause_opt ::= */ - 546, /* (723) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 547, /* (724) slimit_clause_opt ::= */ - 547, /* (725) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 547, /* (726) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 547, /* (727) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 548, /* (728) limit_clause_opt ::= */ - 548, /* (729) limit_clause_opt ::= LIMIT NK_INTEGER */ - 548, /* (730) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 548, /* (731) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 518, /* (732) subquery ::= NK_LP query_expression NK_RP */ - 518, /* (733) subquery ::= NK_LP subquery NK_RP */ - 395, /* (734) search_condition ::= common_expression */ - 551, /* (735) sort_specification_list ::= sort_specification */ - 551, /* (736) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 552, /* (737) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 553, /* (738) ordering_specification_opt ::= */ - 553, /* (739) ordering_specification_opt ::= ASC */ - 553, /* (740) ordering_specification_opt ::= DESC */ - 554, /* (741) null_ordering_opt ::= */ - 554, /* (742) null_ordering_opt ::= NULLS FIRST */ - 554, /* (743) null_ordering_opt ::= NULLS LAST */ - 423, /* (744) column_options ::= */ - 423, /* (745) column_options ::= column_options PRIMARY KEY */ - 423, /* (746) column_options ::= column_options ENCODE NK_STRING */ - 423, /* (747) column_options ::= column_options COMPRESS NK_STRING */ - 423, /* (748) column_options ::= column_options LEVEL NK_STRING */ + 378, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 378, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 379, /* (2) account_options ::= */ + 379, /* (3) account_options ::= account_options PPS literal */ + 379, /* (4) account_options ::= account_options TSERIES literal */ + 379, /* (5) account_options ::= account_options STORAGE literal */ + 379, /* (6) account_options ::= account_options STREAMS literal */ + 379, /* (7) account_options ::= account_options QTIME literal */ + 379, /* (8) account_options ::= account_options DBS literal */ + 379, /* (9) account_options ::= account_options USERS literal */ + 379, /* (10) account_options ::= account_options CONNS literal */ + 379, /* (11) account_options ::= account_options STATE literal */ + 380, /* (12) alter_account_options ::= alter_account_option */ + 380, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 382, /* (14) alter_account_option ::= PASS literal */ + 382, /* (15) alter_account_option ::= PPS literal */ + 382, /* (16) alter_account_option ::= TSERIES literal */ + 382, /* (17) alter_account_option ::= STORAGE literal */ + 382, /* (18) alter_account_option ::= STREAMS literal */ + 382, /* (19) alter_account_option ::= QTIME literal */ + 382, /* (20) alter_account_option ::= DBS literal */ + 382, /* (21) alter_account_option ::= USERS literal */ + 382, /* (22) alter_account_option ::= CONNS literal */ + 382, /* (23) alter_account_option ::= STATE literal */ + 383, /* (24) ip_range_list ::= NK_STRING */ + 383, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 384, /* (26) white_list ::= HOST ip_range_list */ + 385, /* (27) white_list_opt ::= */ + 385, /* (28) white_list_opt ::= white_list */ + 386, /* (29) is_import_opt ::= */ + 386, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ + 387, /* (31) is_createdb_opt ::= */ + 387, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ + 378, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ + 378, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ + 378, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 378, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 378, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ + 378, /* (38) cmd ::= ALTER USER user_name ADD white_list */ + 378, /* (39) cmd ::= ALTER USER user_name DROP white_list */ + 378, /* (40) cmd ::= DROP USER user_name */ + 389, /* (41) sysinfo_opt ::= */ + 389, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 378, /* (43) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + 378, /* (44) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + 390, /* (45) privileges ::= ALL */ + 390, /* (46) privileges ::= priv_type_list */ + 390, /* (47) privileges ::= SUBSCRIBE */ + 393, /* (48) priv_type_list ::= priv_type */ + 393, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 394, /* (50) priv_type ::= READ */ + 394, /* (51) priv_type ::= WRITE */ + 394, /* (52) priv_type ::= ALTER */ + 391, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 391, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ + 391, /* (55) priv_level ::= db_name NK_DOT table_name */ + 391, /* (56) priv_level ::= topic_name */ + 392, /* (57) with_opt ::= */ + 392, /* (58) with_opt ::= WITH search_condition */ + 378, /* (59) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ + 378, /* (60) cmd ::= CREATE DNODE dnode_endpoint */ + 378, /* (61) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 378, /* (62) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 378, /* (63) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 378, /* (64) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 378, /* (65) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 378, /* (66) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 378, /* (67) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 378, /* (68) cmd ::= ALTER ALL DNODES NK_STRING */ + 378, /* (69) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 378, /* (70) cmd ::= RESTORE DNODE NK_INTEGER */ + 399, /* (71) dnode_endpoint ::= NK_STRING */ + 399, /* (72) dnode_endpoint ::= NK_ID */ + 399, /* (73) dnode_endpoint ::= NK_IPTOKEN */ + 400, /* (74) force_opt ::= */ + 400, /* (75) force_opt ::= FORCE */ + 401, /* (76) unsafe_opt ::= UNSAFE */ + 378, /* (77) cmd ::= ALTER CLUSTER NK_STRING */ + 378, /* (78) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + 378, /* (79) cmd ::= ALTER LOCAL NK_STRING */ + 378, /* (80) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 378, /* (81) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 378, /* (82) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 378, /* (83) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 378, /* (84) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 378, /* (85) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 378, /* (86) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 378, /* (87) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 378, /* (88) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 378, /* (89) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 378, /* (90) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 378, /* (91) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 378, /* (92) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 378, /* (93) cmd ::= DROP DATABASE exists_opt db_name */ + 378, /* (94) cmd ::= USE db_name */ + 378, /* (95) cmd ::= ALTER DATABASE db_name alter_db_options */ + 378, /* (96) cmd ::= FLUSH DATABASE db_name */ + 378, /* (97) cmd ::= TRIM DATABASE db_name speed_opt */ + 378, /* (98) cmd ::= S3MIGRATE DATABASE db_name */ + 378, /* (99) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 402, /* (100) not_exists_opt ::= IF NOT EXISTS */ + 402, /* (101) not_exists_opt ::= */ + 404, /* (102) exists_opt ::= IF EXISTS */ + 404, /* (103) exists_opt ::= */ + 403, /* (104) db_options ::= */ + 403, /* (105) db_options ::= db_options BUFFER NK_INTEGER */ + 403, /* (106) db_options ::= db_options CACHEMODEL NK_STRING */ + 403, /* (107) db_options ::= db_options CACHESIZE NK_INTEGER */ + 403, /* (108) db_options ::= db_options COMP NK_INTEGER */ + 403, /* (109) db_options ::= db_options DURATION NK_INTEGER */ + 403, /* (110) db_options ::= db_options DURATION NK_VARIABLE */ + 403, /* (111) db_options ::= db_options MAXROWS NK_INTEGER */ + 403, /* (112) db_options ::= db_options MINROWS NK_INTEGER */ + 403, /* (113) db_options ::= db_options KEEP integer_list */ + 403, /* (114) db_options ::= db_options KEEP variable_list */ + 403, /* (115) db_options ::= db_options PAGES NK_INTEGER */ + 403, /* (116) db_options ::= db_options PAGESIZE NK_INTEGER */ + 403, /* (117) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 403, /* (118) db_options ::= db_options PRECISION NK_STRING */ + 403, /* (119) db_options ::= db_options REPLICA NK_INTEGER */ + 403, /* (120) db_options ::= db_options VGROUPS NK_INTEGER */ + 403, /* (121) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 403, /* (122) db_options ::= db_options RETENTIONS retention_list */ + 403, /* (123) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 403, /* (124) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 403, /* (125) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 403, /* (126) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 403, /* (127) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 403, /* (128) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 403, /* (129) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 403, /* (130) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 403, /* (131) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 403, /* (132) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 403, /* (133) db_options ::= db_options TABLE_PREFIX signed */ + 403, /* (134) db_options ::= db_options TABLE_SUFFIX signed */ + 403, /* (135) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + 403, /* (136) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + 403, /* (137) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + 403, /* (138) db_options ::= db_options S3_COMPACT NK_INTEGER */ + 403, /* (139) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 403, /* (140) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + 405, /* (141) alter_db_options ::= alter_db_option */ + 405, /* (142) alter_db_options ::= alter_db_options alter_db_option */ + 413, /* (143) alter_db_option ::= BUFFER NK_INTEGER */ + 413, /* (144) alter_db_option ::= CACHEMODEL NK_STRING */ + 413, /* (145) alter_db_option ::= CACHESIZE NK_INTEGER */ + 413, /* (146) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 413, /* (147) alter_db_option ::= KEEP integer_list */ + 413, /* (148) alter_db_option ::= KEEP variable_list */ + 413, /* (149) alter_db_option ::= PAGES NK_INTEGER */ + 413, /* (150) alter_db_option ::= REPLICA NK_INTEGER */ + 413, /* (151) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 413, /* (152) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 413, /* (153) alter_db_option ::= MINROWS NK_INTEGER */ + 413, /* (154) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 413, /* (155) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 413, /* (156) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 413, /* (157) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 413, /* (158) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + 413, /* (159) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + 413, /* (160) alter_db_option ::= S3_COMPACT NK_INTEGER */ + 413, /* (161) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 413, /* (162) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + 409, /* (163) integer_list ::= NK_INTEGER */ + 409, /* (164) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 410, /* (165) variable_list ::= NK_VARIABLE */ + 410, /* (166) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 411, /* (167) retention_list ::= retention */ + 411, /* (168) retention_list ::= retention_list NK_COMMA retention */ + 414, /* (169) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 414, /* (170) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 406, /* (171) speed_opt ::= */ + 406, /* (172) speed_opt ::= BWLIMIT NK_INTEGER */ + 407, /* (173) start_opt ::= */ + 407, /* (174) start_opt ::= START WITH NK_INTEGER */ + 407, /* (175) start_opt ::= START WITH NK_STRING */ + 407, /* (176) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 408, /* (177) end_opt ::= */ + 408, /* (178) end_opt ::= END WITH NK_INTEGER */ + 408, /* (179) end_opt ::= END WITH NK_STRING */ + 408, /* (180) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 378, /* (181) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 378, /* (182) cmd ::= CREATE TABLE multi_create_clause */ + 378, /* (183) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 378, /* (184) cmd ::= DROP TABLE multi_drop_clause */ + 378, /* (185) cmd ::= DROP STABLE exists_opt full_table_name */ + 378, /* (186) cmd ::= ALTER TABLE alter_table_clause */ + 378, /* (187) cmd ::= ALTER STABLE alter_table_clause */ + 422, /* (188) alter_table_clause ::= full_table_name alter_table_options */ + 422, /* (189) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + 422, /* (190) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 422, /* (191) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 422, /* (192) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + 422, /* (193) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 422, /* (194) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 422, /* (195) alter_table_clause ::= full_table_name DROP TAG column_name */ + 422, /* (196) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 422, /* (197) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 422, /* (198) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + 419, /* (199) multi_create_clause ::= create_subtable_clause */ + 419, /* (200) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 428, /* (201) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ + 421, /* (202) multi_drop_clause ::= drop_table_clause */ + 421, /* (203) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 431, /* (204) drop_table_clause ::= exists_opt full_table_name */ + 429, /* (205) specific_cols_opt ::= */ + 429, /* (206) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 415, /* (207) full_table_name ::= table_name */ + 415, /* (208) full_table_name ::= db_name NK_DOT table_name */ + 433, /* (209) tag_def_list ::= tag_def */ + 433, /* (210) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + 434, /* (211) tag_def ::= column_name type_name */ + 416, /* (212) column_def_list ::= column_def */ + 416, /* (213) column_def_list ::= column_def_list NK_COMMA column_def */ + 435, /* (214) column_def ::= column_name type_name column_options */ + 425, /* (215) type_name ::= BOOL */ + 425, /* (216) type_name ::= TINYINT */ + 425, /* (217) type_name ::= SMALLINT */ + 425, /* (218) type_name ::= INT */ + 425, /* (219) type_name ::= INTEGER */ + 425, /* (220) type_name ::= BIGINT */ + 425, /* (221) type_name ::= FLOAT */ + 425, /* (222) type_name ::= DOUBLE */ + 425, /* (223) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 425, /* (224) type_name ::= TIMESTAMP */ + 425, /* (225) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 425, /* (226) type_name ::= TINYINT UNSIGNED */ + 425, /* (227) type_name ::= SMALLINT UNSIGNED */ + 425, /* (228) type_name ::= INT UNSIGNED */ + 425, /* (229) type_name ::= BIGINT UNSIGNED */ + 425, /* (230) type_name ::= JSON */ + 425, /* (231) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 425, /* (232) type_name ::= MEDIUMBLOB */ + 425, /* (233) type_name ::= BLOB */ + 425, /* (234) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 425, /* (235) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 425, /* (236) type_name ::= DECIMAL */ + 425, /* (237) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 425, /* (238) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 436, /* (239) type_name_default_len ::= BINARY */ + 436, /* (240) type_name_default_len ::= NCHAR */ + 436, /* (241) type_name_default_len ::= VARCHAR */ + 436, /* (242) type_name_default_len ::= VARBINARY */ + 417, /* (243) tags_def_opt ::= */ + 417, /* (244) tags_def_opt ::= tags_def */ + 420, /* (245) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + 418, /* (246) table_options ::= */ + 418, /* (247) table_options ::= table_options COMMENT NK_STRING */ + 418, /* (248) table_options ::= table_options MAX_DELAY duration_list */ + 418, /* (249) table_options ::= table_options WATERMARK duration_list */ + 418, /* (250) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 418, /* (251) table_options ::= table_options TTL NK_INTEGER */ + 418, /* (252) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 418, /* (253) table_options ::= table_options DELETE_MARK duration_list */ + 423, /* (254) alter_table_options ::= alter_table_option */ + 423, /* (255) alter_table_options ::= alter_table_options alter_table_option */ + 439, /* (256) alter_table_option ::= COMMENT NK_STRING */ + 439, /* (257) alter_table_option ::= TTL NK_INTEGER */ + 437, /* (258) duration_list ::= duration_literal */ + 437, /* (259) duration_list ::= duration_list NK_COMMA duration_literal */ + 438, /* (260) rollup_func_list ::= rollup_func_name */ + 438, /* (261) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 441, /* (262) rollup_func_name ::= function_name */ + 441, /* (263) rollup_func_name ::= FIRST */ + 441, /* (264) rollup_func_name ::= LAST */ + 432, /* (265) col_name_list ::= col_name */ + 432, /* (266) col_name_list ::= col_name_list NK_COMMA col_name */ + 443, /* (267) col_name ::= column_name */ + 378, /* (268) cmd ::= SHOW DNODES */ + 378, /* (269) cmd ::= SHOW USERS */ + 378, /* (270) cmd ::= SHOW USERS FULL */ + 378, /* (271) cmd ::= SHOW USER PRIVILEGES */ + 378, /* (272) cmd ::= SHOW db_kind_opt DATABASES */ + 378, /* (273) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 378, /* (274) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 378, /* (275) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 378, /* (276) cmd ::= SHOW MNODES */ + 378, /* (277) cmd ::= SHOW QNODES */ + 378, /* (278) cmd ::= SHOW ARBGROUPS */ + 378, /* (279) cmd ::= SHOW FUNCTIONS */ + 378, /* (280) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 378, /* (281) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 378, /* (282) cmd ::= SHOW STREAMS */ + 378, /* (283) cmd ::= SHOW ACCOUNTS */ + 378, /* (284) cmd ::= SHOW APPS */ + 378, /* (285) cmd ::= SHOW CONNECTIONS */ + 378, /* (286) cmd ::= SHOW LICENCES */ + 378, /* (287) cmd ::= SHOW GRANTS */ + 378, /* (288) cmd ::= SHOW GRANTS FULL */ + 378, /* (289) cmd ::= SHOW GRANTS LOGS */ + 378, /* (290) cmd ::= SHOW CLUSTER MACHINES */ + 378, /* (291) cmd ::= SHOW CREATE DATABASE db_name */ + 378, /* (292) cmd ::= SHOW CREATE TABLE full_table_name */ + 378, /* (293) cmd ::= SHOW CREATE STABLE full_table_name */ + 378, /* (294) cmd ::= SHOW ENCRYPTIONS */ + 378, /* (295) cmd ::= SHOW QUERIES */ + 378, /* (296) cmd ::= SHOW SCORES */ + 378, /* (297) cmd ::= SHOW TOPICS */ + 378, /* (298) cmd ::= SHOW VARIABLES */ + 378, /* (299) cmd ::= SHOW CLUSTER VARIABLES */ + 378, /* (300) cmd ::= SHOW LOCAL VARIABLES */ + 378, /* (301) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 378, /* (302) cmd ::= SHOW BNODES */ + 378, /* (303) cmd ::= SHOW SNODES */ + 378, /* (304) cmd ::= SHOW CLUSTER */ + 378, /* (305) cmd ::= SHOW TRANSACTIONS */ + 378, /* (306) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 378, /* (307) cmd ::= SHOW CONSUMERS */ + 378, /* (308) cmd ::= SHOW SUBSCRIPTIONS */ + 378, /* (309) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 378, /* (310) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 378, /* (311) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 378, /* (312) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 378, /* (313) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 378, /* (314) cmd ::= SHOW VNODES */ + 378, /* (315) cmd ::= SHOW db_name_cond_opt ALIVE */ + 378, /* (316) cmd ::= SHOW CLUSTER ALIVE */ + 378, /* (317) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + 378, /* (318) cmd ::= SHOW CREATE VIEW full_table_name */ + 378, /* (319) cmd ::= SHOW COMPACTS */ + 378, /* (320) cmd ::= SHOW COMPACT NK_INTEGER */ + 445, /* (321) table_kind_db_name_cond_opt ::= */ + 445, /* (322) table_kind_db_name_cond_opt ::= table_kind */ + 445, /* (323) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 445, /* (324) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 451, /* (325) table_kind ::= NORMAL */ + 451, /* (326) table_kind ::= CHILD */ + 447, /* (327) db_name_cond_opt ::= */ + 447, /* (328) db_name_cond_opt ::= db_name NK_DOT */ + 446, /* (329) like_pattern_opt ::= */ + 446, /* (330) like_pattern_opt ::= LIKE NK_STRING */ + 448, /* (331) table_name_cond ::= table_name */ + 449, /* (332) from_db_opt ::= */ + 449, /* (333) from_db_opt ::= FROM db_name */ + 450, /* (334) tag_list_opt ::= */ + 450, /* (335) tag_list_opt ::= tag_item */ + 450, /* (336) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 452, /* (337) tag_item ::= TBNAME */ + 452, /* (338) tag_item ::= QTAGS */ + 452, /* (339) tag_item ::= column_name */ + 452, /* (340) tag_item ::= column_name column_alias */ + 452, /* (341) tag_item ::= column_name AS column_alias */ + 444, /* (342) db_kind_opt ::= */ + 444, /* (343) db_kind_opt ::= USER */ + 444, /* (344) db_kind_opt ::= SYSTEM */ + 378, /* (345) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + 378, /* (346) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + 378, /* (347) cmd ::= DROP TSMA exists_opt full_tsma_name */ + 378, /* (348) cmd ::= SHOW db_name_cond_opt TSMAS */ + 456, /* (349) full_tsma_name ::= tsma_name */ + 456, /* (350) full_tsma_name ::= db_name NK_DOT tsma_name */ + 455, /* (351) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + 378, /* (352) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 378, /* (353) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 378, /* (354) cmd ::= DROP INDEX exists_opt full_index_name */ + 459, /* (355) full_index_name ::= index_name */ + 459, /* (356) full_index_name ::= db_name NK_DOT index_name */ + 458, /* (357) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 458, /* (358) 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 */ + 457, /* (359) func_list ::= func */ + 457, /* (360) func_list ::= func_list NK_COMMA func */ + 463, /* (361) func ::= sma_func_name NK_LP expression_list NK_RP */ + 464, /* (362) sma_func_name ::= function_name */ + 464, /* (363) sma_func_name ::= COUNT */ + 464, /* (364) sma_func_name ::= FIRST */ + 464, /* (365) sma_func_name ::= LAST */ + 464, /* (366) sma_func_name ::= LAST_ROW */ + 462, /* (367) sma_stream_opt ::= */ + 462, /* (368) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 462, /* (369) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 462, /* (370) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 466, /* (371) with_meta ::= AS */ + 466, /* (372) with_meta ::= WITH META AS */ + 466, /* (373) with_meta ::= ONLY META AS */ + 378, /* (374) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 378, /* (375) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 378, /* (376) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 378, /* (377) cmd ::= DROP TOPIC exists_opt topic_name */ + 378, /* (378) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 378, /* (379) cmd ::= DESC full_table_name */ + 378, /* (380) cmd ::= DESCRIBE full_table_name */ + 378, /* (381) cmd ::= RESET QUERY CACHE */ + 378, /* (382) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 378, /* (383) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 470, /* (384) analyze_opt ::= */ + 470, /* (385) analyze_opt ::= ANALYZE */ + 471, /* (386) explain_options ::= */ + 471, /* (387) explain_options ::= explain_options VERBOSE NK_BOOL */ + 471, /* (388) explain_options ::= explain_options RATIO NK_FLOAT */ + 378, /* (389) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 378, /* (390) cmd ::= DROP FUNCTION exists_opt function_name */ + 474, /* (391) agg_func_opt ::= */ + 474, /* (392) agg_func_opt ::= AGGREGATE */ + 475, /* (393) bufsize_opt ::= */ + 475, /* (394) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 476, /* (395) language_opt ::= */ + 476, /* (396) language_opt ::= LANGUAGE NK_STRING */ + 473, /* (397) or_replace_opt ::= */ + 473, /* (398) or_replace_opt ::= OR REPLACE */ + 378, /* (399) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 378, /* (400) cmd ::= DROP VIEW exists_opt full_view_name */ + 477, /* (401) full_view_name ::= view_name */ + 477, /* (402) full_view_name ::= db_name NK_DOT view_name */ + 378, /* (403) 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 */ + 378, /* (404) cmd ::= DROP STREAM exists_opt stream_name */ + 378, /* (405) cmd ::= PAUSE STREAM exists_opt stream_name */ + 378, /* (406) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 481, /* (407) col_list_opt ::= */ + 481, /* (408) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + 485, /* (409) column_stream_def_list ::= column_stream_def */ + 485, /* (410) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + 486, /* (411) column_stream_def ::= column_name stream_col_options */ + 487, /* (412) stream_col_options ::= */ + 487, /* (413) stream_col_options ::= stream_col_options PRIMARY KEY */ + 482, /* (414) tag_def_or_ref_opt ::= */ + 482, /* (415) tag_def_or_ref_opt ::= tags_def */ + 482, /* (416) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 480, /* (417) stream_options ::= */ + 480, /* (418) stream_options ::= stream_options TRIGGER AT_ONCE */ + 480, /* (419) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 480, /* (420) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 480, /* (421) stream_options ::= stream_options WATERMARK duration_literal */ + 480, /* (422) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 480, /* (423) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 480, /* (424) stream_options ::= stream_options DELETE_MARK duration_literal */ + 480, /* (425) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 483, /* (426) subtable_opt ::= */ + 483, /* (427) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 484, /* (428) ignore_opt ::= */ + 484, /* (429) ignore_opt ::= IGNORE UNTREATED */ + 378, /* (430) cmd ::= KILL CONNECTION NK_INTEGER */ + 378, /* (431) cmd ::= KILL QUERY NK_STRING */ + 378, /* (432) cmd ::= KILL TRANSACTION NK_INTEGER */ + 378, /* (433) cmd ::= KILL COMPACT NK_INTEGER */ + 378, /* (434) cmd ::= BALANCE VGROUP */ + 378, /* (435) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 378, /* (436) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + 378, /* (437) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 378, /* (438) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 378, /* (439) cmd ::= SPLIT VGROUP NK_INTEGER */ + 489, /* (440) on_vgroup_id ::= */ + 489, /* (441) on_vgroup_id ::= ON NK_INTEGER */ + 490, /* (442) dnode_list ::= DNODE NK_INTEGER */ + 490, /* (443) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 378, /* (444) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 378, /* (445) cmd ::= query_or_subquery */ + 378, /* (446) cmd ::= insert_query */ + 472, /* (447) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 472, /* (448) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 427, /* (449) tags_literal ::= NK_INTEGER */ + 427, /* (450) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + 427, /* (451) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + 427, /* (452) tags_literal ::= NK_PLUS NK_INTEGER */ + 427, /* (453) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + 427, /* (454) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + 427, /* (455) tags_literal ::= NK_MINUS NK_INTEGER */ + 427, /* (456) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + 427, /* (457) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + 427, /* (458) tags_literal ::= NK_FLOAT */ + 427, /* (459) tags_literal ::= NK_PLUS NK_FLOAT */ + 427, /* (460) tags_literal ::= NK_MINUS NK_FLOAT */ + 427, /* (461) tags_literal ::= NK_BIN */ + 427, /* (462) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + 427, /* (463) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + 427, /* (464) tags_literal ::= NK_PLUS NK_BIN */ + 427, /* (465) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + 427, /* (466) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + 427, /* (467) tags_literal ::= NK_MINUS NK_BIN */ + 427, /* (468) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + 427, /* (469) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + 427, /* (470) tags_literal ::= NK_HEX */ + 427, /* (471) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + 427, /* (472) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + 427, /* (473) tags_literal ::= NK_PLUS NK_HEX */ + 427, /* (474) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + 427, /* (475) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + 427, /* (476) tags_literal ::= NK_MINUS NK_HEX */ + 427, /* (477) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + 427, /* (478) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + 427, /* (479) tags_literal ::= NK_STRING */ + 427, /* (480) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + 427, /* (481) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + 427, /* (482) tags_literal ::= NK_BOOL */ + 427, /* (483) tags_literal ::= NULL */ + 427, /* (484) tags_literal ::= literal_func */ + 427, /* (485) tags_literal ::= literal_func NK_PLUS duration_literal */ + 427, /* (486) tags_literal ::= literal_func NK_MINUS duration_literal */ + 430, /* (487) tags_literal_list ::= tags_literal */ + 430, /* (488) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + 381, /* (489) literal ::= NK_INTEGER */ + 381, /* (490) literal ::= NK_FLOAT */ + 381, /* (491) literal ::= NK_STRING */ + 381, /* (492) literal ::= NK_BOOL */ + 381, /* (493) literal ::= TIMESTAMP NK_STRING */ + 381, /* (494) literal ::= duration_literal */ + 381, /* (495) literal ::= NULL */ + 381, /* (496) literal ::= NK_QUESTION */ + 440, /* (497) duration_literal ::= NK_VARIABLE */ + 412, /* (498) signed ::= NK_INTEGER */ + 412, /* (499) signed ::= NK_PLUS NK_INTEGER */ + 412, /* (500) signed ::= NK_MINUS NK_INTEGER */ + 412, /* (501) signed ::= NK_FLOAT */ + 412, /* (502) signed ::= NK_PLUS NK_FLOAT */ + 412, /* (503) signed ::= NK_MINUS NK_FLOAT */ + 492, /* (504) signed_literal ::= signed */ + 492, /* (505) signed_literal ::= NK_STRING */ + 492, /* (506) signed_literal ::= NK_BOOL */ + 492, /* (507) signed_literal ::= TIMESTAMP NK_STRING */ + 492, /* (508) signed_literal ::= duration_literal */ + 492, /* (509) signed_literal ::= NULL */ + 492, /* (510) signed_literal ::= literal_func */ + 492, /* (511) signed_literal ::= NK_QUESTION */ + 493, /* (512) literal_list ::= signed_literal */ + 493, /* (513) literal_list ::= literal_list NK_COMMA signed_literal */ + 395, /* (514) db_name ::= NK_ID */ + 396, /* (515) table_name ::= NK_ID */ + 424, /* (516) column_name ::= NK_ID */ + 442, /* (517) function_name ::= NK_ID */ + 478, /* (518) view_name ::= NK_ID */ + 494, /* (519) table_alias ::= NK_ID */ + 453, /* (520) column_alias ::= NK_ID */ + 453, /* (521) column_alias ::= NK_ALIAS */ + 388, /* (522) user_name ::= NK_ID */ + 397, /* (523) topic_name ::= NK_ID */ + 479, /* (524) stream_name ::= NK_ID */ + 469, /* (525) cgroup_name ::= NK_ID */ + 460, /* (526) index_name ::= NK_ID */ + 454, /* (527) tsma_name ::= NK_ID */ + 495, /* (528) expr_or_subquery ::= expression */ + 488, /* (529) expression ::= literal */ + 488, /* (530) expression ::= pseudo_column */ + 488, /* (531) expression ::= column_reference */ + 488, /* (532) expression ::= function_expression */ + 488, /* (533) expression ::= case_when_expression */ + 488, /* (534) expression ::= NK_LP expression NK_RP */ + 488, /* (535) expression ::= NK_PLUS expr_or_subquery */ + 488, /* (536) expression ::= NK_MINUS expr_or_subquery */ + 488, /* (537) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 488, /* (538) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 488, /* (539) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 488, /* (540) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 488, /* (541) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 488, /* (542) expression ::= column_reference NK_ARROW NK_STRING */ + 488, /* (543) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 488, /* (544) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 465, /* (545) expression_list ::= expr_or_subquery */ + 465, /* (546) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 497, /* (547) column_reference ::= column_name */ + 497, /* (548) column_reference ::= table_name NK_DOT column_name */ + 497, /* (549) column_reference ::= NK_ALIAS */ + 497, /* (550) column_reference ::= table_name NK_DOT NK_ALIAS */ + 496, /* (551) pseudo_column ::= ROWTS */ + 496, /* (552) pseudo_column ::= TBNAME */ + 496, /* (553) pseudo_column ::= table_name NK_DOT TBNAME */ + 496, /* (554) pseudo_column ::= QSTART */ + 496, /* (555) pseudo_column ::= QEND */ + 496, /* (556) pseudo_column ::= QDURATION */ + 496, /* (557) pseudo_column ::= WSTART */ + 496, /* (558) pseudo_column ::= WEND */ + 496, /* (559) pseudo_column ::= WDURATION */ + 496, /* (560) pseudo_column ::= IROWTS */ + 496, /* (561) pseudo_column ::= ISFILLED */ + 496, /* (562) pseudo_column ::= QTAGS */ + 498, /* (563) function_expression ::= function_name NK_LP expression_list NK_RP */ + 498, /* (564) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 498, /* (565) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 498, /* (566) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + 498, /* (567) function_expression ::= literal_func */ + 491, /* (568) literal_func ::= noarg_func NK_LP NK_RP */ + 491, /* (569) literal_func ::= NOW */ + 491, /* (570) literal_func ::= TODAY */ + 502, /* (571) noarg_func ::= NOW */ + 502, /* (572) noarg_func ::= TODAY */ + 502, /* (573) noarg_func ::= TIMEZONE */ + 502, /* (574) noarg_func ::= DATABASE */ + 502, /* (575) noarg_func ::= CLIENT_VERSION */ + 502, /* (576) noarg_func ::= SERVER_VERSION */ + 502, /* (577) noarg_func ::= SERVER_STATUS */ + 502, /* (578) noarg_func ::= CURRENT_USER */ + 502, /* (579) noarg_func ::= USER */ + 500, /* (580) star_func ::= COUNT */ + 500, /* (581) star_func ::= FIRST */ + 500, /* (582) star_func ::= LAST */ + 500, /* (583) star_func ::= LAST_ROW */ + 501, /* (584) star_func_para_list ::= NK_STAR */ + 501, /* (585) star_func_para_list ::= other_para_list */ + 503, /* (586) other_para_list ::= star_func_para */ + 503, /* (587) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 504, /* (588) star_func_para ::= expr_or_subquery */ + 504, /* (589) star_func_para ::= table_name NK_DOT NK_STAR */ + 499, /* (590) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 499, /* (591) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 505, /* (592) when_then_list ::= when_then_expr */ + 505, /* (593) when_then_list ::= when_then_list when_then_expr */ + 508, /* (594) when_then_expr ::= WHEN common_expression THEN common_expression */ + 506, /* (595) case_when_else_opt ::= */ + 506, /* (596) case_when_else_opt ::= ELSE common_expression */ + 509, /* (597) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 509, /* (598) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 509, /* (599) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 509, /* (600) predicate ::= expr_or_subquery IS NULL */ + 509, /* (601) predicate ::= expr_or_subquery IS NOT NULL */ + 509, /* (602) predicate ::= expr_or_subquery in_op in_predicate_value */ + 510, /* (603) compare_op ::= NK_LT */ + 510, /* (604) compare_op ::= NK_GT */ + 510, /* (605) compare_op ::= NK_LE */ + 510, /* (606) compare_op ::= NK_GE */ + 510, /* (607) compare_op ::= NK_NE */ + 510, /* (608) compare_op ::= NK_EQ */ + 510, /* (609) compare_op ::= LIKE */ + 510, /* (610) compare_op ::= NOT LIKE */ + 510, /* (611) compare_op ::= MATCH */ + 510, /* (612) compare_op ::= NMATCH */ + 510, /* (613) compare_op ::= CONTAINS */ + 511, /* (614) in_op ::= IN */ + 511, /* (615) in_op ::= NOT IN */ + 512, /* (616) in_predicate_value ::= NK_LP literal_list NK_RP */ + 513, /* (617) boolean_value_expression ::= boolean_primary */ + 513, /* (618) boolean_value_expression ::= NOT boolean_primary */ + 513, /* (619) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 513, /* (620) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 514, /* (621) boolean_primary ::= predicate */ + 514, /* (622) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 507, /* (623) common_expression ::= expr_or_subquery */ + 507, /* (624) common_expression ::= boolean_value_expression */ + 515, /* (625) from_clause_opt ::= */ + 515, /* (626) from_clause_opt ::= FROM table_reference_list */ + 516, /* (627) table_reference_list ::= table_reference */ + 516, /* (628) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 517, /* (629) table_reference ::= table_primary */ + 517, /* (630) table_reference ::= joined_table */ + 518, /* (631) table_primary ::= table_name alias_opt */ + 518, /* (632) table_primary ::= db_name NK_DOT table_name alias_opt */ + 518, /* (633) table_primary ::= subquery alias_opt */ + 518, /* (634) table_primary ::= parenthesized_joined_table */ + 520, /* (635) alias_opt ::= */ + 520, /* (636) alias_opt ::= table_alias */ + 520, /* (637) alias_opt ::= AS table_alias */ + 522, /* (638) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 522, /* (639) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 519, /* (640) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 523, /* (641) join_type ::= */ + 523, /* (642) join_type ::= INNER */ + 523, /* (643) join_type ::= LEFT */ + 523, /* (644) join_type ::= RIGHT */ + 523, /* (645) join_type ::= FULL */ + 524, /* (646) join_subtype ::= */ + 524, /* (647) join_subtype ::= OUTER */ + 524, /* (648) join_subtype ::= SEMI */ + 524, /* (649) join_subtype ::= ANTI */ + 524, /* (650) join_subtype ::= ASOF */ + 524, /* (651) join_subtype ::= WINDOW */ + 525, /* (652) join_on_clause_opt ::= */ + 525, /* (653) join_on_clause_opt ::= ON search_condition */ + 526, /* (654) window_offset_clause_opt ::= */ + 526, /* (655) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + 528, /* (656) window_offset_literal ::= NK_VARIABLE */ + 528, /* (657) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 527, /* (658) jlimit_clause_opt ::= */ + 527, /* (659) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + 529, /* (660) 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 */ + 530, /* (661) hint_list ::= */ + 530, /* (662) hint_list ::= NK_HINT */ + 532, /* (663) tag_mode_opt ::= */ + 532, /* (664) tag_mode_opt ::= TAGS */ + 531, /* (665) set_quantifier_opt ::= */ + 531, /* (666) set_quantifier_opt ::= DISTINCT */ + 531, /* (667) set_quantifier_opt ::= ALL */ + 533, /* (668) select_list ::= select_item */ + 533, /* (669) select_list ::= select_list NK_COMMA select_item */ + 541, /* (670) select_item ::= NK_STAR */ + 541, /* (671) select_item ::= common_expression */ + 541, /* (672) select_item ::= common_expression column_alias */ + 541, /* (673) select_item ::= common_expression AS column_alias */ + 541, /* (674) select_item ::= table_name NK_DOT NK_STAR */ + 468, /* (675) where_clause_opt ::= */ + 468, /* (676) where_clause_opt ::= WHERE search_condition */ + 534, /* (677) partition_by_clause_opt ::= */ + 534, /* (678) partition_by_clause_opt ::= PARTITION BY partition_list */ + 542, /* (679) partition_list ::= partition_item */ + 542, /* (680) partition_list ::= partition_list NK_COMMA partition_item */ + 543, /* (681) partition_item ::= expr_or_subquery */ + 543, /* (682) partition_item ::= expr_or_subquery column_alias */ + 543, /* (683) partition_item ::= expr_or_subquery AS column_alias */ + 538, /* (684) twindow_clause_opt ::= */ + 538, /* (685) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 538, /* (686) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 538, /* (687) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 538, /* (688) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 538, /* (689) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 538, /* (690) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 538, /* (691) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 461, /* (692) sliding_opt ::= */ + 461, /* (693) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 544, /* (694) interval_sliding_duration_literal ::= NK_VARIABLE */ + 544, /* (695) interval_sliding_duration_literal ::= NK_STRING */ + 544, /* (696) interval_sliding_duration_literal ::= NK_INTEGER */ + 537, /* (697) fill_opt ::= */ + 537, /* (698) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 537, /* (699) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 537, /* (700) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 545, /* (701) fill_mode ::= NONE */ + 545, /* (702) fill_mode ::= PREV */ + 545, /* (703) fill_mode ::= NULL */ + 545, /* (704) fill_mode ::= NULL_F */ + 545, /* (705) fill_mode ::= LINEAR */ + 545, /* (706) fill_mode ::= NEXT */ + 539, /* (707) group_by_clause_opt ::= */ + 539, /* (708) group_by_clause_opt ::= GROUP BY group_by_list */ + 546, /* (709) group_by_list ::= expr_or_subquery */ + 546, /* (710) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 540, /* (711) having_clause_opt ::= */ + 540, /* (712) having_clause_opt ::= HAVING search_condition */ + 535, /* (713) range_opt ::= */ + 535, /* (714) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 535, /* (715) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 536, /* (716) every_opt ::= */ + 536, /* (717) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 547, /* (718) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 548, /* (719) query_simple ::= query_specification */ + 548, /* (720) query_simple ::= union_query_expression */ + 552, /* (721) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 552, /* (722) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 553, /* (723) query_simple_or_subquery ::= query_simple */ + 553, /* (724) query_simple_or_subquery ::= subquery */ + 467, /* (725) query_or_subquery ::= query_expression */ + 467, /* (726) query_or_subquery ::= subquery */ + 549, /* (727) order_by_clause_opt ::= */ + 549, /* (728) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 550, /* (729) slimit_clause_opt ::= */ + 550, /* (730) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 550, /* (731) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 550, /* (732) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 551, /* (733) limit_clause_opt ::= */ + 551, /* (734) limit_clause_opt ::= LIMIT NK_INTEGER */ + 551, /* (735) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 551, /* (736) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 521, /* (737) subquery ::= NK_LP query_expression NK_RP */ + 521, /* (738) subquery ::= NK_LP subquery NK_RP */ + 398, /* (739) search_condition ::= common_expression */ + 554, /* (740) sort_specification_list ::= sort_specification */ + 554, /* (741) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 555, /* (742) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 556, /* (743) ordering_specification_opt ::= */ + 556, /* (744) ordering_specification_opt ::= ASC */ + 556, /* (745) ordering_specification_opt ::= DESC */ + 557, /* (746) null_ordering_opt ::= */ + 557, /* (747) null_ordering_opt ::= NULLS FIRST */ + 557, /* (748) null_ordering_opt ::= NULLS LAST */ + 426, /* (749) column_options ::= */ + 426, /* (750) column_options ::= column_options PRIMARY KEY */ + 426, /* (751) column_options ::= column_options ENCODE NK_STRING */ + 426, /* (752) column_options ::= column_options COMPRESS NK_STRING */ + 426, /* (753) column_options ::= column_options LEVEL NK_STRING */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4409,726 +4756,731 @@ static const signed char yyRuleInfoNRhs[] = { -2, /* (26) white_list ::= HOST ip_range_list */ 0, /* (27) white_list_opt ::= */ -1, /* (28) white_list_opt ::= white_list */ - -7, /* (29) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ - -5, /* (30) cmd ::= ALTER USER user_name PASS NK_STRING */ - -5, /* (31) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - -5, /* (32) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - -5, /* (33) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ - -5, /* (34) cmd ::= ALTER USER user_name ADD white_list */ - -5, /* (35) cmd ::= ALTER USER user_name DROP white_list */ - -3, /* (36) cmd ::= DROP USER user_name */ - 0, /* (37) sysinfo_opt ::= */ - -2, /* (38) sysinfo_opt ::= SYSINFO NK_INTEGER */ - -7, /* (39) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - -7, /* (40) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - -1, /* (41) privileges ::= ALL */ - -1, /* (42) privileges ::= priv_type_list */ - -1, /* (43) privileges ::= SUBSCRIBE */ - -1, /* (44) priv_type_list ::= priv_type */ - -3, /* (45) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - -1, /* (46) priv_type ::= READ */ - -1, /* (47) priv_type ::= WRITE */ - -1, /* (48) priv_type ::= ALTER */ - -3, /* (49) priv_level ::= NK_STAR NK_DOT NK_STAR */ - -3, /* (50) priv_level ::= db_name NK_DOT NK_STAR */ - -3, /* (51) priv_level ::= db_name NK_DOT table_name */ - -1, /* (52) priv_level ::= topic_name */ - 0, /* (53) with_opt ::= */ - -2, /* (54) with_opt ::= WITH search_condition */ - -3, /* (55) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ - -3, /* (56) cmd ::= CREATE DNODE dnode_endpoint */ - -5, /* (57) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - -4, /* (58) cmd ::= DROP DNODE NK_INTEGER force_opt */ - -4, /* (59) cmd ::= DROP DNODE dnode_endpoint force_opt */ - -4, /* (60) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - -4, /* (61) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - -4, /* (62) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - -5, /* (63) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - -4, /* (64) cmd ::= ALTER ALL DNODES NK_STRING */ - -5, /* (65) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - -3, /* (66) cmd ::= RESTORE DNODE NK_INTEGER */ - -1, /* (67) dnode_endpoint ::= NK_STRING */ - -1, /* (68) dnode_endpoint ::= NK_ID */ - -1, /* (69) dnode_endpoint ::= NK_IPTOKEN */ - 0, /* (70) force_opt ::= */ - -1, /* (71) force_opt ::= FORCE */ - -1, /* (72) unsafe_opt ::= UNSAFE */ - -3, /* (73) cmd ::= ALTER CLUSTER NK_STRING */ - -4, /* (74) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - -3, /* (75) cmd ::= ALTER LOCAL NK_STRING */ - -4, /* (76) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - -5, /* (77) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - -5, /* (78) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - -5, /* (79) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - -5, /* (80) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - -5, /* (81) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - -5, /* (82) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - -5, /* (83) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - -5, /* (84) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - -5, /* (85) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - -5, /* (86) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - -5, /* (87) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - -5, /* (88) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - -4, /* (89) cmd ::= DROP DATABASE exists_opt db_name */ - -2, /* (90) cmd ::= USE db_name */ - -4, /* (91) cmd ::= ALTER DATABASE db_name alter_db_options */ - -3, /* (92) cmd ::= FLUSH DATABASE db_name */ - -4, /* (93) cmd ::= TRIM DATABASE db_name speed_opt */ - -3, /* (94) cmd ::= S3MIGRATE DATABASE db_name */ - -5, /* (95) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - -3, /* (96) not_exists_opt ::= IF NOT EXISTS */ - 0, /* (97) not_exists_opt ::= */ - -2, /* (98) exists_opt ::= IF EXISTS */ - 0, /* (99) exists_opt ::= */ - 0, /* (100) db_options ::= */ - -3, /* (101) db_options ::= db_options BUFFER NK_INTEGER */ - -3, /* (102) db_options ::= db_options CACHEMODEL NK_STRING */ - -3, /* (103) db_options ::= db_options CACHESIZE NK_INTEGER */ - -3, /* (104) db_options ::= db_options COMP NK_INTEGER */ - -3, /* (105) db_options ::= db_options DURATION NK_INTEGER */ - -3, /* (106) db_options ::= db_options DURATION NK_VARIABLE */ - -3, /* (107) db_options ::= db_options MAXROWS NK_INTEGER */ - -3, /* (108) db_options ::= db_options MINROWS NK_INTEGER */ - -3, /* (109) db_options ::= db_options KEEP integer_list */ - -3, /* (110) db_options ::= db_options KEEP variable_list */ - -3, /* (111) db_options ::= db_options PAGES NK_INTEGER */ - -3, /* (112) db_options ::= db_options PAGESIZE NK_INTEGER */ - -3, /* (113) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - -3, /* (114) db_options ::= db_options PRECISION NK_STRING */ - -3, /* (115) db_options ::= db_options REPLICA NK_INTEGER */ - -3, /* (116) db_options ::= db_options VGROUPS NK_INTEGER */ - -3, /* (117) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - -3, /* (118) db_options ::= db_options RETENTIONS retention_list */ - -3, /* (119) db_options ::= db_options SCHEMALESS NK_INTEGER */ - -3, /* (120) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - -3, /* (121) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - -3, /* (122) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - -4, /* (123) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -3, /* (124) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - -4, /* (125) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -3, /* (126) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - -3, /* (127) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - -3, /* (128) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - -3, /* (129) db_options ::= db_options TABLE_PREFIX signed */ - -3, /* (130) db_options ::= db_options TABLE_SUFFIX signed */ - -3, /* (131) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ - -3, /* (132) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - -3, /* (133) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - -3, /* (134) db_options ::= db_options S3_COMPACT NK_INTEGER */ - -3, /* (135) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - -3, /* (136) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - -1, /* (137) alter_db_options ::= alter_db_option */ - -2, /* (138) alter_db_options ::= alter_db_options alter_db_option */ - -2, /* (139) alter_db_option ::= BUFFER NK_INTEGER */ - -2, /* (140) alter_db_option ::= CACHEMODEL NK_STRING */ - -2, /* (141) alter_db_option ::= CACHESIZE NK_INTEGER */ - -2, /* (142) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - -2, /* (143) alter_db_option ::= KEEP integer_list */ - -2, /* (144) alter_db_option ::= KEEP variable_list */ - -2, /* (145) alter_db_option ::= PAGES NK_INTEGER */ - -2, /* (146) alter_db_option ::= REPLICA NK_INTEGER */ - -2, /* (147) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - -2, /* (148) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - -2, /* (149) alter_db_option ::= MINROWS NK_INTEGER */ - -2, /* (150) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - -3, /* (151) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -2, /* (152) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - -3, /* (153) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -2, /* (154) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - -2, /* (155) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - -2, /* (156) alter_db_option ::= S3_COMPACT NK_INTEGER */ - -2, /* (157) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - -2, /* (158) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - -1, /* (159) integer_list ::= NK_INTEGER */ - -3, /* (160) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - -1, /* (161) variable_list ::= NK_VARIABLE */ - -3, /* (162) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - -1, /* (163) retention_list ::= retention */ - -3, /* (164) retention_list ::= retention_list NK_COMMA retention */ - -3, /* (165) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - -3, /* (166) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 0, /* (167) speed_opt ::= */ - -2, /* (168) speed_opt ::= BWLIMIT NK_INTEGER */ - 0, /* (169) start_opt ::= */ - -3, /* (170) start_opt ::= START WITH NK_INTEGER */ - -3, /* (171) start_opt ::= START WITH NK_STRING */ - -4, /* (172) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 0, /* (173) end_opt ::= */ - -3, /* (174) end_opt ::= END WITH NK_INTEGER */ - -3, /* (175) end_opt ::= END WITH NK_STRING */ - -4, /* (176) end_opt ::= END WITH TIMESTAMP NK_STRING */ - -9, /* (177) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - -3, /* (178) cmd ::= CREATE TABLE multi_create_clause */ - -9, /* (179) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - -3, /* (180) cmd ::= DROP TABLE multi_drop_clause */ - -4, /* (181) cmd ::= DROP STABLE exists_opt full_table_name */ - -3, /* (182) cmd ::= ALTER TABLE alter_table_clause */ - -3, /* (183) cmd ::= ALTER STABLE alter_table_clause */ - -2, /* (184) alter_table_clause ::= full_table_name alter_table_options */ - -6, /* (185) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ - -4, /* (186) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - -5, /* (187) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - -5, /* (188) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ - -5, /* (189) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - -5, /* (190) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - -4, /* (191) alter_table_clause ::= full_table_name DROP TAG column_name */ - -5, /* (192) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - -5, /* (193) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - -6, /* (194) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - -1, /* (195) multi_create_clause ::= create_subtable_clause */ - -2, /* (196) multi_create_clause ::= multi_create_clause create_subtable_clause */ - -10, /* (197) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ - -1, /* (198) multi_drop_clause ::= drop_table_clause */ - -3, /* (199) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - -2, /* (200) drop_table_clause ::= exists_opt full_table_name */ - 0, /* (201) specific_cols_opt ::= */ - -3, /* (202) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - -1, /* (203) full_table_name ::= table_name */ - -3, /* (204) full_table_name ::= db_name NK_DOT table_name */ - -1, /* (205) tag_def_list ::= tag_def */ - -3, /* (206) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - -2, /* (207) tag_def ::= column_name type_name */ - -1, /* (208) column_def_list ::= column_def */ - -3, /* (209) column_def_list ::= column_def_list NK_COMMA column_def */ - -3, /* (210) column_def ::= column_name type_name column_options */ - -1, /* (211) type_name ::= BOOL */ - -1, /* (212) type_name ::= TINYINT */ - -1, /* (213) type_name ::= SMALLINT */ - -1, /* (214) type_name ::= INT */ - -1, /* (215) type_name ::= INTEGER */ - -1, /* (216) type_name ::= BIGINT */ - -1, /* (217) type_name ::= FLOAT */ - -1, /* (218) type_name ::= DOUBLE */ - -4, /* (219) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (220) type_name ::= TIMESTAMP */ - -4, /* (221) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - -2, /* (222) type_name ::= TINYINT UNSIGNED */ - -2, /* (223) type_name ::= SMALLINT UNSIGNED */ - -2, /* (224) type_name ::= INT UNSIGNED */ - -2, /* (225) type_name ::= BIGINT UNSIGNED */ - -1, /* (226) type_name ::= JSON */ - -4, /* (227) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - -1, /* (228) type_name ::= MEDIUMBLOB */ - -1, /* (229) type_name ::= BLOB */ - -4, /* (230) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - -4, /* (231) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - -1, /* (232) type_name ::= DECIMAL */ - -4, /* (233) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - -6, /* (234) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - -1, /* (235) type_name_default_len ::= BINARY */ - -1, /* (236) type_name_default_len ::= NCHAR */ - -1, /* (237) type_name_default_len ::= VARCHAR */ - -1, /* (238) type_name_default_len ::= VARBINARY */ - 0, /* (239) tags_def_opt ::= */ - -1, /* (240) tags_def_opt ::= tags_def */ - -4, /* (241) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - 0, /* (242) table_options ::= */ - -3, /* (243) table_options ::= table_options COMMENT NK_STRING */ - -3, /* (244) table_options ::= table_options MAX_DELAY duration_list */ - -3, /* (245) table_options ::= table_options WATERMARK duration_list */ - -5, /* (246) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - -3, /* (247) table_options ::= table_options TTL NK_INTEGER */ - -5, /* (248) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - -3, /* (249) table_options ::= table_options DELETE_MARK duration_list */ - -1, /* (250) alter_table_options ::= alter_table_option */ - -2, /* (251) alter_table_options ::= alter_table_options alter_table_option */ - -2, /* (252) alter_table_option ::= COMMENT NK_STRING */ - -2, /* (253) alter_table_option ::= TTL NK_INTEGER */ - -1, /* (254) duration_list ::= duration_literal */ - -3, /* (255) duration_list ::= duration_list NK_COMMA duration_literal */ - -1, /* (256) rollup_func_list ::= rollup_func_name */ - -3, /* (257) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - -1, /* (258) rollup_func_name ::= function_name */ - -1, /* (259) rollup_func_name ::= FIRST */ - -1, /* (260) rollup_func_name ::= LAST */ - -1, /* (261) col_name_list ::= col_name */ - -3, /* (262) col_name_list ::= col_name_list NK_COMMA col_name */ - -1, /* (263) col_name ::= column_name */ - -2, /* (264) cmd ::= SHOW DNODES */ - -2, /* (265) cmd ::= SHOW USERS */ - -3, /* (266) cmd ::= SHOW USER PRIVILEGES */ - -3, /* (267) cmd ::= SHOW db_kind_opt DATABASES */ - -4, /* (268) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - -4, /* (269) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - -3, /* (270) cmd ::= SHOW db_name_cond_opt VGROUPS */ - -2, /* (271) cmd ::= SHOW MNODES */ - -2, /* (272) cmd ::= SHOW QNODES */ - -2, /* (273) cmd ::= SHOW ARBGROUPS */ - -2, /* (274) cmd ::= SHOW FUNCTIONS */ - -5, /* (275) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - -6, /* (276) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - -2, /* (277) cmd ::= SHOW STREAMS */ - -2, /* (278) cmd ::= SHOW ACCOUNTS */ - -2, /* (279) cmd ::= SHOW APPS */ - -2, /* (280) cmd ::= SHOW CONNECTIONS */ - -2, /* (281) cmd ::= SHOW LICENCES */ - -2, /* (282) cmd ::= SHOW GRANTS */ - -3, /* (283) cmd ::= SHOW GRANTS FULL */ - -3, /* (284) cmd ::= SHOW GRANTS LOGS */ - -3, /* (285) cmd ::= SHOW CLUSTER MACHINES */ - -4, /* (286) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (287) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (288) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (289) cmd ::= SHOW ENCRYPTIONS */ - -2, /* (290) cmd ::= SHOW QUERIES */ - -2, /* (291) cmd ::= SHOW SCORES */ - -2, /* (292) cmd ::= SHOW TOPICS */ - -2, /* (293) cmd ::= SHOW VARIABLES */ - -3, /* (294) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (295) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (296) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (297) cmd ::= SHOW BNODES */ - -2, /* (298) cmd ::= SHOW SNODES */ - -2, /* (299) cmd ::= SHOW CLUSTER */ - -2, /* (300) cmd ::= SHOW TRANSACTIONS */ - -4, /* (301) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (302) cmd ::= SHOW CONSUMERS */ - -2, /* (303) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (304) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (305) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (306) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (307) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (308) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (309) cmd ::= SHOW VNODES */ - -3, /* (310) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (311) cmd ::= SHOW CLUSTER ALIVE */ - -4, /* (312) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - -4, /* (313) cmd ::= SHOW CREATE VIEW full_table_name */ - -2, /* (314) cmd ::= SHOW COMPACTS */ - -3, /* (315) cmd ::= SHOW COMPACT NK_INTEGER */ - 0, /* (316) table_kind_db_name_cond_opt ::= */ - -1, /* (317) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (318) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (319) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (320) table_kind ::= NORMAL */ - -1, /* (321) table_kind ::= CHILD */ - 0, /* (322) db_name_cond_opt ::= */ - -2, /* (323) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (324) like_pattern_opt ::= */ - -2, /* (325) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (326) table_name_cond ::= table_name */ - 0, /* (327) from_db_opt ::= */ - -2, /* (328) from_db_opt ::= FROM db_name */ - 0, /* (329) tag_list_opt ::= */ - -1, /* (330) tag_list_opt ::= tag_item */ - -3, /* (331) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (332) tag_item ::= TBNAME */ - -1, /* (333) tag_item ::= QTAGS */ - -1, /* (334) tag_item ::= column_name */ - -2, /* (335) tag_item ::= column_name column_alias */ - -3, /* (336) tag_item ::= column_name AS column_alias */ - 0, /* (337) db_kind_opt ::= */ - -1, /* (338) db_kind_opt ::= USER */ - -1, /* (339) db_kind_opt ::= SYSTEM */ - -11, /* (340) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - -11, /* (341) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - -4, /* (342) cmd ::= DROP TSMA exists_opt full_tsma_name */ - -3, /* (343) cmd ::= SHOW db_name_cond_opt TSMAS */ - -1, /* (344) full_tsma_name ::= tsma_name */ - -3, /* (345) full_tsma_name ::= db_name NK_DOT tsma_name */ - -4, /* (346) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - -8, /* (347) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (348) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (349) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (350) full_index_name ::= index_name */ - -3, /* (351) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (352) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (353) 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, /* (354) func_list ::= func */ - -3, /* (355) func_list ::= func_list NK_COMMA func */ - -4, /* (356) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (357) sma_func_name ::= function_name */ - -1, /* (358) sma_func_name ::= COUNT */ - -1, /* (359) sma_func_name ::= FIRST */ - -1, /* (360) sma_func_name ::= LAST */ - -1, /* (361) sma_func_name ::= LAST_ROW */ - 0, /* (362) sma_stream_opt ::= */ - -3, /* (363) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (364) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (365) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (366) with_meta ::= AS */ - -3, /* (367) with_meta ::= WITH META AS */ - -3, /* (368) with_meta ::= ONLY META AS */ - -6, /* (369) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (370) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (371) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (372) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (373) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (374) cmd ::= DESC full_table_name */ - -2, /* (375) cmd ::= DESCRIBE full_table_name */ - -3, /* (376) cmd ::= RESET QUERY CACHE */ - -4, /* (377) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (378) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (379) analyze_opt ::= */ - -1, /* (380) analyze_opt ::= ANALYZE */ - 0, /* (381) explain_options ::= */ - -3, /* (382) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (383) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (384) 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, /* (385) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (386) agg_func_opt ::= */ - -1, /* (387) agg_func_opt ::= AGGREGATE */ - 0, /* (388) bufsize_opt ::= */ - -2, /* (389) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (390) language_opt ::= */ - -2, /* (391) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (392) or_replace_opt ::= */ - -2, /* (393) or_replace_opt ::= OR REPLACE */ - -6, /* (394) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (395) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (396) full_view_name ::= view_name */ - -3, /* (397) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (398) 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, /* (399) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (400) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (401) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (402) col_list_opt ::= */ - -3, /* (403) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - -1, /* (404) column_stream_def_list ::= column_stream_def */ - -3, /* (405) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - -2, /* (406) column_stream_def ::= column_name stream_col_options */ - 0, /* (407) stream_col_options ::= */ - -3, /* (408) stream_col_options ::= stream_col_options PRIMARY KEY */ - 0, /* (409) tag_def_or_ref_opt ::= */ - -1, /* (410) tag_def_or_ref_opt ::= tags_def */ - -4, /* (411) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 0, /* (412) stream_options ::= */ - -3, /* (413) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (414) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (415) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (416) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (417) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (418) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (419) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (420) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (421) subtable_opt ::= */ - -4, /* (422) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (423) ignore_opt ::= */ - -2, /* (424) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (425) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (426) cmd ::= KILL QUERY NK_STRING */ - -3, /* (427) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (428) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (429) cmd ::= BALANCE VGROUP */ - -4, /* (430) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -5, /* (431) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - -4, /* (432) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (433) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (434) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (435) on_vgroup_id ::= */ - -2, /* (436) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (437) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (438) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (439) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (440) cmd ::= query_or_subquery */ - -1, /* (441) cmd ::= insert_query */ - -7, /* (442) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (443) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (444) tags_literal ::= NK_INTEGER */ - -3, /* (445) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - -3, /* (446) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - -2, /* (447) tags_literal ::= NK_PLUS NK_INTEGER */ - -4, /* (448) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (449) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - -2, /* (450) tags_literal ::= NK_MINUS NK_INTEGER */ - -4, /* (451) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (452) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - -1, /* (453) tags_literal ::= NK_FLOAT */ - -2, /* (454) tags_literal ::= NK_PLUS NK_FLOAT */ - -2, /* (455) tags_literal ::= NK_MINUS NK_FLOAT */ - -1, /* (456) tags_literal ::= NK_BIN */ - -3, /* (457) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - -3, /* (458) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - -2, /* (459) tags_literal ::= NK_PLUS NK_BIN */ - -4, /* (460) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - -4, /* (461) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - -2, /* (462) tags_literal ::= NK_MINUS NK_BIN */ - -4, /* (463) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - -4, /* (464) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - -1, /* (465) tags_literal ::= NK_HEX */ - -3, /* (466) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - -3, /* (467) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - -2, /* (468) tags_literal ::= NK_PLUS NK_HEX */ - -4, /* (469) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - -4, /* (470) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - -2, /* (471) tags_literal ::= NK_MINUS NK_HEX */ - -4, /* (472) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - -4, /* (473) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - -1, /* (474) tags_literal ::= NK_STRING */ - -3, /* (475) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - -3, /* (476) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - -1, /* (477) tags_literal ::= NK_BOOL */ - -1, /* (478) tags_literal ::= NULL */ - -1, /* (479) tags_literal ::= literal_func */ - -3, /* (480) tags_literal ::= literal_func NK_PLUS duration_literal */ - -3, /* (481) tags_literal ::= literal_func NK_MINUS duration_literal */ - -1, /* (482) tags_literal_list ::= tags_literal */ - -3, /* (483) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - -1, /* (484) literal ::= NK_INTEGER */ - -1, /* (485) literal ::= NK_FLOAT */ - -1, /* (486) literal ::= NK_STRING */ - -1, /* (487) literal ::= NK_BOOL */ - -2, /* (488) literal ::= TIMESTAMP NK_STRING */ - -1, /* (489) literal ::= duration_literal */ - -1, /* (490) literal ::= NULL */ - -1, /* (491) literal ::= NK_QUESTION */ - -1, /* (492) duration_literal ::= NK_VARIABLE */ - -1, /* (493) signed ::= NK_INTEGER */ - -2, /* (494) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (495) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (496) signed ::= NK_FLOAT */ - -2, /* (497) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (498) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (499) signed_literal ::= signed */ - -1, /* (500) signed_literal ::= NK_STRING */ - -1, /* (501) signed_literal ::= NK_BOOL */ - -2, /* (502) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (503) signed_literal ::= duration_literal */ - -1, /* (504) signed_literal ::= NULL */ - -1, /* (505) signed_literal ::= literal_func */ - -1, /* (506) signed_literal ::= NK_QUESTION */ - -1, /* (507) literal_list ::= signed_literal */ - -3, /* (508) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (509) db_name ::= NK_ID */ - -1, /* (510) table_name ::= NK_ID */ - -1, /* (511) column_name ::= NK_ID */ - -1, /* (512) function_name ::= NK_ID */ - -1, /* (513) view_name ::= NK_ID */ - -1, /* (514) table_alias ::= NK_ID */ - -1, /* (515) column_alias ::= NK_ID */ - -1, /* (516) column_alias ::= NK_ALIAS */ - -1, /* (517) user_name ::= NK_ID */ - -1, /* (518) topic_name ::= NK_ID */ - -1, /* (519) stream_name ::= NK_ID */ - -1, /* (520) cgroup_name ::= NK_ID */ - -1, /* (521) index_name ::= NK_ID */ - -1, /* (522) tsma_name ::= NK_ID */ - -1, /* (523) expr_or_subquery ::= expression */ - -1, /* (524) expression ::= literal */ - -1, /* (525) expression ::= pseudo_column */ - -1, /* (526) expression ::= column_reference */ - -1, /* (527) expression ::= function_expression */ - -1, /* (528) expression ::= case_when_expression */ - -3, /* (529) expression ::= NK_LP expression NK_RP */ - -2, /* (530) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (531) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (532) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (533) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (534) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (535) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (536) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (537) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (538) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (539) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (540) expression_list ::= expr_or_subquery */ - -3, /* (541) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (542) column_reference ::= column_name */ - -3, /* (543) column_reference ::= table_name NK_DOT column_name */ - -1, /* (544) column_reference ::= NK_ALIAS */ - -3, /* (545) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (546) pseudo_column ::= ROWTS */ - -1, /* (547) pseudo_column ::= TBNAME */ - -3, /* (548) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (549) pseudo_column ::= QSTART */ - -1, /* (550) pseudo_column ::= QEND */ - -1, /* (551) pseudo_column ::= QDURATION */ - -1, /* (552) pseudo_column ::= WSTART */ - -1, /* (553) pseudo_column ::= WEND */ - -1, /* (554) pseudo_column ::= WDURATION */ - -1, /* (555) pseudo_column ::= IROWTS */ - -1, /* (556) pseudo_column ::= ISFILLED */ - -1, /* (557) pseudo_column ::= QTAGS */ - -4, /* (558) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (559) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (560) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -6, /* (561) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - -1, /* (562) function_expression ::= literal_func */ - -3, /* (563) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (564) literal_func ::= NOW */ - -1, /* (565) literal_func ::= TODAY */ - -1, /* (566) noarg_func ::= NOW */ - -1, /* (567) noarg_func ::= TODAY */ - -1, /* (568) noarg_func ::= TIMEZONE */ - -1, /* (569) noarg_func ::= DATABASE */ - -1, /* (570) noarg_func ::= CLIENT_VERSION */ - -1, /* (571) noarg_func ::= SERVER_VERSION */ - -1, /* (572) noarg_func ::= SERVER_STATUS */ - -1, /* (573) noarg_func ::= CURRENT_USER */ - -1, /* (574) noarg_func ::= USER */ - -1, /* (575) star_func ::= COUNT */ - -1, /* (576) star_func ::= FIRST */ - -1, /* (577) star_func ::= LAST */ - -1, /* (578) star_func ::= LAST_ROW */ - -1, /* (579) star_func_para_list ::= NK_STAR */ - -1, /* (580) star_func_para_list ::= other_para_list */ - -1, /* (581) other_para_list ::= star_func_para */ - -3, /* (582) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (583) star_func_para ::= expr_or_subquery */ - -3, /* (584) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (585) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (586) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (587) when_then_list ::= when_then_expr */ - -2, /* (588) when_then_list ::= when_then_list when_then_expr */ - -4, /* (589) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (590) case_when_else_opt ::= */ - -2, /* (591) case_when_else_opt ::= ELSE common_expression */ - -3, /* (592) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (593) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (594) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (595) predicate ::= expr_or_subquery IS NULL */ - -4, /* (596) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (597) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (598) compare_op ::= NK_LT */ - -1, /* (599) compare_op ::= NK_GT */ - -1, /* (600) compare_op ::= NK_LE */ - -1, /* (601) compare_op ::= NK_GE */ - -1, /* (602) compare_op ::= NK_NE */ - -1, /* (603) compare_op ::= NK_EQ */ - -1, /* (604) compare_op ::= LIKE */ - -2, /* (605) compare_op ::= NOT LIKE */ - -1, /* (606) compare_op ::= MATCH */ - -1, /* (607) compare_op ::= NMATCH */ - -1, /* (608) compare_op ::= CONTAINS */ - -1, /* (609) in_op ::= IN */ - -2, /* (610) in_op ::= NOT IN */ - -3, /* (611) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (612) boolean_value_expression ::= boolean_primary */ - -2, /* (613) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (614) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (615) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (616) boolean_primary ::= predicate */ - -3, /* (617) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (618) common_expression ::= expr_or_subquery */ - -1, /* (619) common_expression ::= boolean_value_expression */ - 0, /* (620) from_clause_opt ::= */ - -2, /* (621) from_clause_opt ::= FROM table_reference_list */ - -1, /* (622) table_reference_list ::= table_reference */ - -3, /* (623) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (624) table_reference ::= table_primary */ - -1, /* (625) table_reference ::= joined_table */ - -2, /* (626) table_primary ::= table_name alias_opt */ - -4, /* (627) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (628) table_primary ::= subquery alias_opt */ - -1, /* (629) table_primary ::= parenthesized_joined_table */ - 0, /* (630) alias_opt ::= */ - -1, /* (631) alias_opt ::= table_alias */ - -2, /* (632) alias_opt ::= AS table_alias */ - -3, /* (633) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (634) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -8, /* (635) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 0, /* (636) join_type ::= */ - -1, /* (637) join_type ::= INNER */ - -1, /* (638) join_type ::= LEFT */ - -1, /* (639) join_type ::= RIGHT */ - -1, /* (640) join_type ::= FULL */ - 0, /* (641) join_subtype ::= */ - -1, /* (642) join_subtype ::= OUTER */ - -1, /* (643) join_subtype ::= SEMI */ - -1, /* (644) join_subtype ::= ANTI */ - -1, /* (645) join_subtype ::= ASOF */ - -1, /* (646) join_subtype ::= WINDOW */ - 0, /* (647) join_on_clause_opt ::= */ - -2, /* (648) join_on_clause_opt ::= ON search_condition */ - 0, /* (649) window_offset_clause_opt ::= */ - -6, /* (650) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - -1, /* (651) window_offset_literal ::= NK_VARIABLE */ - -2, /* (652) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 0, /* (653) jlimit_clause_opt ::= */ - -2, /* (654) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - -14, /* (655) 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, /* (656) hint_list ::= */ - -1, /* (657) hint_list ::= NK_HINT */ - 0, /* (658) tag_mode_opt ::= */ - -1, /* (659) tag_mode_opt ::= TAGS */ - 0, /* (660) set_quantifier_opt ::= */ - -1, /* (661) set_quantifier_opt ::= DISTINCT */ - -1, /* (662) set_quantifier_opt ::= ALL */ - -1, /* (663) select_list ::= select_item */ - -3, /* (664) select_list ::= select_list NK_COMMA select_item */ - -1, /* (665) select_item ::= NK_STAR */ - -1, /* (666) select_item ::= common_expression */ - -2, /* (667) select_item ::= common_expression column_alias */ - -3, /* (668) select_item ::= common_expression AS column_alias */ - -3, /* (669) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (670) where_clause_opt ::= */ - -2, /* (671) where_clause_opt ::= WHERE search_condition */ - 0, /* (672) partition_by_clause_opt ::= */ - -3, /* (673) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (674) partition_list ::= partition_item */ - -3, /* (675) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (676) partition_item ::= expr_or_subquery */ - -2, /* (677) partition_item ::= expr_or_subquery column_alias */ - -3, /* (678) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (679) twindow_clause_opt ::= */ - -6, /* (680) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (681) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (682) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (683) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (684) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - -4, /* (685) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - -6, /* (686) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (687) sliding_opt ::= */ - -4, /* (688) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (689) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (690) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (691) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (692) fill_opt ::= */ - -4, /* (693) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (694) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (695) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (696) fill_mode ::= NONE */ - -1, /* (697) fill_mode ::= PREV */ - -1, /* (698) fill_mode ::= NULL */ - -1, /* (699) fill_mode ::= NULL_F */ - -1, /* (700) fill_mode ::= LINEAR */ - -1, /* (701) fill_mode ::= NEXT */ - 0, /* (702) group_by_clause_opt ::= */ - -3, /* (703) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (704) group_by_list ::= expr_or_subquery */ - -3, /* (705) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (706) having_clause_opt ::= */ - -2, /* (707) having_clause_opt ::= HAVING search_condition */ - 0, /* (708) range_opt ::= */ - -6, /* (709) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (710) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (711) every_opt ::= */ - -4, /* (712) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (713) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (714) query_simple ::= query_specification */ - -1, /* (715) query_simple ::= union_query_expression */ - -4, /* (716) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (717) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (718) query_simple_or_subquery ::= query_simple */ - -1, /* (719) query_simple_or_subquery ::= subquery */ - -1, /* (720) query_or_subquery ::= query_expression */ - -1, /* (721) query_or_subquery ::= subquery */ - 0, /* (722) order_by_clause_opt ::= */ - -3, /* (723) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (724) slimit_clause_opt ::= */ - -2, /* (725) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (726) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (727) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (728) limit_clause_opt ::= */ - -2, /* (729) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (730) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (731) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (732) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (733) subquery ::= NK_LP subquery NK_RP */ - -1, /* (734) search_condition ::= common_expression */ - -1, /* (735) sort_specification_list ::= sort_specification */ - -3, /* (736) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (737) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (738) ordering_specification_opt ::= */ - -1, /* (739) ordering_specification_opt ::= ASC */ - -1, /* (740) ordering_specification_opt ::= DESC */ - 0, /* (741) null_ordering_opt ::= */ - -2, /* (742) null_ordering_opt ::= NULLS FIRST */ - -2, /* (743) null_ordering_opt ::= NULLS LAST */ - 0, /* (744) column_options ::= */ - -3, /* (745) column_options ::= column_options PRIMARY KEY */ - -3, /* (746) column_options ::= column_options ENCODE NK_STRING */ - -3, /* (747) column_options ::= column_options COMPRESS NK_STRING */ - -3, /* (748) column_options ::= column_options LEVEL NK_STRING */ + 0, /* (29) is_import_opt ::= */ + -2, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ + 0, /* (31) is_createdb_opt ::= */ + -2, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ + -9, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ + -5, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ + -5, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + -5, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + -5, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ + -5, /* (38) cmd ::= ALTER USER user_name ADD white_list */ + -5, /* (39) cmd ::= ALTER USER user_name DROP white_list */ + -3, /* (40) cmd ::= DROP USER user_name */ + 0, /* (41) sysinfo_opt ::= */ + -2, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ + -7, /* (43) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + -7, /* (44) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + -1, /* (45) privileges ::= ALL */ + -1, /* (46) privileges ::= priv_type_list */ + -1, /* (47) privileges ::= SUBSCRIBE */ + -1, /* (48) priv_type_list ::= priv_type */ + -3, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + -1, /* (50) priv_type ::= READ */ + -1, /* (51) priv_type ::= WRITE */ + -1, /* (52) priv_type ::= ALTER */ + -3, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ + -3, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ + -3, /* (55) priv_level ::= db_name NK_DOT table_name */ + -1, /* (56) priv_level ::= topic_name */ + 0, /* (57) with_opt ::= */ + -2, /* (58) with_opt ::= WITH search_condition */ + -3, /* (59) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ + -3, /* (60) cmd ::= CREATE DNODE dnode_endpoint */ + -5, /* (61) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + -4, /* (62) cmd ::= DROP DNODE NK_INTEGER force_opt */ + -4, /* (63) cmd ::= DROP DNODE dnode_endpoint force_opt */ + -4, /* (64) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + -4, /* (65) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + -4, /* (66) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + -5, /* (67) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + -4, /* (68) cmd ::= ALTER ALL DNODES NK_STRING */ + -5, /* (69) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + -3, /* (70) cmd ::= RESTORE DNODE NK_INTEGER */ + -1, /* (71) dnode_endpoint ::= NK_STRING */ + -1, /* (72) dnode_endpoint ::= NK_ID */ + -1, /* (73) dnode_endpoint ::= NK_IPTOKEN */ + 0, /* (74) force_opt ::= */ + -1, /* (75) force_opt ::= FORCE */ + -1, /* (76) unsafe_opt ::= UNSAFE */ + -3, /* (77) cmd ::= ALTER CLUSTER NK_STRING */ + -4, /* (78) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + -3, /* (79) cmd ::= ALTER LOCAL NK_STRING */ + -4, /* (80) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + -5, /* (81) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + -5, /* (82) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + -5, /* (83) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + -5, /* (84) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + -5, /* (85) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + -5, /* (86) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + -5, /* (87) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + -5, /* (88) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + -5, /* (89) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + -5, /* (90) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + -5, /* (91) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + -5, /* (92) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + -4, /* (93) cmd ::= DROP DATABASE exists_opt db_name */ + -2, /* (94) cmd ::= USE db_name */ + -4, /* (95) cmd ::= ALTER DATABASE db_name alter_db_options */ + -3, /* (96) cmd ::= FLUSH DATABASE db_name */ + -4, /* (97) cmd ::= TRIM DATABASE db_name speed_opt */ + -3, /* (98) cmd ::= S3MIGRATE DATABASE db_name */ + -5, /* (99) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + -3, /* (100) not_exists_opt ::= IF NOT EXISTS */ + 0, /* (101) not_exists_opt ::= */ + -2, /* (102) exists_opt ::= IF EXISTS */ + 0, /* (103) exists_opt ::= */ + 0, /* (104) db_options ::= */ + -3, /* (105) db_options ::= db_options BUFFER NK_INTEGER */ + -3, /* (106) db_options ::= db_options CACHEMODEL NK_STRING */ + -3, /* (107) db_options ::= db_options CACHESIZE NK_INTEGER */ + -3, /* (108) db_options ::= db_options COMP NK_INTEGER */ + -3, /* (109) db_options ::= db_options DURATION NK_INTEGER */ + -3, /* (110) db_options ::= db_options DURATION NK_VARIABLE */ + -3, /* (111) db_options ::= db_options MAXROWS NK_INTEGER */ + -3, /* (112) db_options ::= db_options MINROWS NK_INTEGER */ + -3, /* (113) db_options ::= db_options KEEP integer_list */ + -3, /* (114) db_options ::= db_options KEEP variable_list */ + -3, /* (115) db_options ::= db_options PAGES NK_INTEGER */ + -3, /* (116) db_options ::= db_options PAGESIZE NK_INTEGER */ + -3, /* (117) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + -3, /* (118) db_options ::= db_options PRECISION NK_STRING */ + -3, /* (119) db_options ::= db_options REPLICA NK_INTEGER */ + -3, /* (120) db_options ::= db_options VGROUPS NK_INTEGER */ + -3, /* (121) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + -3, /* (122) db_options ::= db_options RETENTIONS retention_list */ + -3, /* (123) db_options ::= db_options SCHEMALESS NK_INTEGER */ + -3, /* (124) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + -3, /* (125) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + -3, /* (126) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + -4, /* (127) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -3, /* (128) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + -4, /* (129) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -3, /* (130) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + -3, /* (131) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + -3, /* (132) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + -3, /* (133) db_options ::= db_options TABLE_PREFIX signed */ + -3, /* (134) db_options ::= db_options TABLE_SUFFIX signed */ + -3, /* (135) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + -3, /* (136) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + -3, /* (137) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + -3, /* (138) db_options ::= db_options S3_COMPACT NK_INTEGER */ + -3, /* (139) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + -3, /* (140) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + -1, /* (141) alter_db_options ::= alter_db_option */ + -2, /* (142) alter_db_options ::= alter_db_options alter_db_option */ + -2, /* (143) alter_db_option ::= BUFFER NK_INTEGER */ + -2, /* (144) alter_db_option ::= CACHEMODEL NK_STRING */ + -2, /* (145) alter_db_option ::= CACHESIZE NK_INTEGER */ + -2, /* (146) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + -2, /* (147) alter_db_option ::= KEEP integer_list */ + -2, /* (148) alter_db_option ::= KEEP variable_list */ + -2, /* (149) alter_db_option ::= PAGES NK_INTEGER */ + -2, /* (150) alter_db_option ::= REPLICA NK_INTEGER */ + -2, /* (151) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + -2, /* (152) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + -2, /* (153) alter_db_option ::= MINROWS NK_INTEGER */ + -2, /* (154) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + -3, /* (155) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -2, /* (156) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + -3, /* (157) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -2, /* (158) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + -2, /* (159) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + -2, /* (160) alter_db_option ::= S3_COMPACT NK_INTEGER */ + -2, /* (161) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + -2, /* (162) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + -1, /* (163) integer_list ::= NK_INTEGER */ + -3, /* (164) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + -1, /* (165) variable_list ::= NK_VARIABLE */ + -3, /* (166) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + -1, /* (167) retention_list ::= retention */ + -3, /* (168) retention_list ::= retention_list NK_COMMA retention */ + -3, /* (169) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + -3, /* (170) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 0, /* (171) speed_opt ::= */ + -2, /* (172) speed_opt ::= BWLIMIT NK_INTEGER */ + 0, /* (173) start_opt ::= */ + -3, /* (174) start_opt ::= START WITH NK_INTEGER */ + -3, /* (175) start_opt ::= START WITH NK_STRING */ + -4, /* (176) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 0, /* (177) end_opt ::= */ + -3, /* (178) end_opt ::= END WITH NK_INTEGER */ + -3, /* (179) end_opt ::= END WITH NK_STRING */ + -4, /* (180) end_opt ::= END WITH TIMESTAMP NK_STRING */ + -9, /* (181) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + -3, /* (182) cmd ::= CREATE TABLE multi_create_clause */ + -9, /* (183) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + -3, /* (184) cmd ::= DROP TABLE multi_drop_clause */ + -4, /* (185) cmd ::= DROP STABLE exists_opt full_table_name */ + -3, /* (186) cmd ::= ALTER TABLE alter_table_clause */ + -3, /* (187) cmd ::= ALTER STABLE alter_table_clause */ + -2, /* (188) alter_table_clause ::= full_table_name alter_table_options */ + -6, /* (189) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + -4, /* (190) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + -5, /* (191) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + -5, /* (192) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + -5, /* (193) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + -5, /* (194) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + -4, /* (195) alter_table_clause ::= full_table_name DROP TAG column_name */ + -5, /* (196) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + -5, /* (197) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + -6, /* (198) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + -1, /* (199) multi_create_clause ::= create_subtable_clause */ + -2, /* (200) multi_create_clause ::= multi_create_clause create_subtable_clause */ + -10, /* (201) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ + -1, /* (202) multi_drop_clause ::= drop_table_clause */ + -3, /* (203) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + -2, /* (204) drop_table_clause ::= exists_opt full_table_name */ + 0, /* (205) specific_cols_opt ::= */ + -3, /* (206) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + -1, /* (207) full_table_name ::= table_name */ + -3, /* (208) full_table_name ::= db_name NK_DOT table_name */ + -1, /* (209) tag_def_list ::= tag_def */ + -3, /* (210) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + -2, /* (211) tag_def ::= column_name type_name */ + -1, /* (212) column_def_list ::= column_def */ + -3, /* (213) column_def_list ::= column_def_list NK_COMMA column_def */ + -3, /* (214) column_def ::= column_name type_name column_options */ + -1, /* (215) type_name ::= BOOL */ + -1, /* (216) type_name ::= TINYINT */ + -1, /* (217) type_name ::= SMALLINT */ + -1, /* (218) type_name ::= INT */ + -1, /* (219) type_name ::= INTEGER */ + -1, /* (220) type_name ::= BIGINT */ + -1, /* (221) type_name ::= FLOAT */ + -1, /* (222) type_name ::= DOUBLE */ + -4, /* (223) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (224) type_name ::= TIMESTAMP */ + -4, /* (225) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + -2, /* (226) type_name ::= TINYINT UNSIGNED */ + -2, /* (227) type_name ::= SMALLINT UNSIGNED */ + -2, /* (228) type_name ::= INT UNSIGNED */ + -2, /* (229) type_name ::= BIGINT UNSIGNED */ + -1, /* (230) type_name ::= JSON */ + -4, /* (231) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + -1, /* (232) type_name ::= MEDIUMBLOB */ + -1, /* (233) type_name ::= BLOB */ + -4, /* (234) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + -4, /* (235) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + -1, /* (236) type_name ::= DECIMAL */ + -4, /* (237) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + -6, /* (238) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + -1, /* (239) type_name_default_len ::= BINARY */ + -1, /* (240) type_name_default_len ::= NCHAR */ + -1, /* (241) type_name_default_len ::= VARCHAR */ + -1, /* (242) type_name_default_len ::= VARBINARY */ + 0, /* (243) tags_def_opt ::= */ + -1, /* (244) tags_def_opt ::= tags_def */ + -4, /* (245) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + 0, /* (246) table_options ::= */ + -3, /* (247) table_options ::= table_options COMMENT NK_STRING */ + -3, /* (248) table_options ::= table_options MAX_DELAY duration_list */ + -3, /* (249) table_options ::= table_options WATERMARK duration_list */ + -5, /* (250) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + -3, /* (251) table_options ::= table_options TTL NK_INTEGER */ + -5, /* (252) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + -3, /* (253) table_options ::= table_options DELETE_MARK duration_list */ + -1, /* (254) alter_table_options ::= alter_table_option */ + -2, /* (255) alter_table_options ::= alter_table_options alter_table_option */ + -2, /* (256) alter_table_option ::= COMMENT NK_STRING */ + -2, /* (257) alter_table_option ::= TTL NK_INTEGER */ + -1, /* (258) duration_list ::= duration_literal */ + -3, /* (259) duration_list ::= duration_list NK_COMMA duration_literal */ + -1, /* (260) rollup_func_list ::= rollup_func_name */ + -3, /* (261) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + -1, /* (262) rollup_func_name ::= function_name */ + -1, /* (263) rollup_func_name ::= FIRST */ + -1, /* (264) rollup_func_name ::= LAST */ + -1, /* (265) col_name_list ::= col_name */ + -3, /* (266) col_name_list ::= col_name_list NK_COMMA col_name */ + -1, /* (267) col_name ::= column_name */ + -2, /* (268) cmd ::= SHOW DNODES */ + -2, /* (269) cmd ::= SHOW USERS */ + -3, /* (270) cmd ::= SHOW USERS FULL */ + -3, /* (271) cmd ::= SHOW USER PRIVILEGES */ + -3, /* (272) cmd ::= SHOW db_kind_opt DATABASES */ + -4, /* (273) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + -4, /* (274) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + -3, /* (275) cmd ::= SHOW db_name_cond_opt VGROUPS */ + -2, /* (276) cmd ::= SHOW MNODES */ + -2, /* (277) cmd ::= SHOW QNODES */ + -2, /* (278) cmd ::= SHOW ARBGROUPS */ + -2, /* (279) cmd ::= SHOW FUNCTIONS */ + -5, /* (280) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + -6, /* (281) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + -2, /* (282) cmd ::= SHOW STREAMS */ + -2, /* (283) cmd ::= SHOW ACCOUNTS */ + -2, /* (284) cmd ::= SHOW APPS */ + -2, /* (285) cmd ::= SHOW CONNECTIONS */ + -2, /* (286) cmd ::= SHOW LICENCES */ + -2, /* (287) cmd ::= SHOW GRANTS */ + -3, /* (288) cmd ::= SHOW GRANTS FULL */ + -3, /* (289) cmd ::= SHOW GRANTS LOGS */ + -3, /* (290) cmd ::= SHOW CLUSTER MACHINES */ + -4, /* (291) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (292) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (293) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (294) cmd ::= SHOW ENCRYPTIONS */ + -2, /* (295) cmd ::= SHOW QUERIES */ + -2, /* (296) cmd ::= SHOW SCORES */ + -2, /* (297) cmd ::= SHOW TOPICS */ + -2, /* (298) cmd ::= SHOW VARIABLES */ + -3, /* (299) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (300) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (301) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (302) cmd ::= SHOW BNODES */ + -2, /* (303) cmd ::= SHOW SNODES */ + -2, /* (304) cmd ::= SHOW CLUSTER */ + -2, /* (305) cmd ::= SHOW TRANSACTIONS */ + -4, /* (306) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (307) cmd ::= SHOW CONSUMERS */ + -2, /* (308) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (309) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (310) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (311) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (312) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (313) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (314) cmd ::= SHOW VNODES */ + -3, /* (315) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (316) cmd ::= SHOW CLUSTER ALIVE */ + -4, /* (317) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + -4, /* (318) cmd ::= SHOW CREATE VIEW full_table_name */ + -2, /* (319) cmd ::= SHOW COMPACTS */ + -3, /* (320) cmd ::= SHOW COMPACT NK_INTEGER */ + 0, /* (321) table_kind_db_name_cond_opt ::= */ + -1, /* (322) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (323) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (324) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (325) table_kind ::= NORMAL */ + -1, /* (326) table_kind ::= CHILD */ + 0, /* (327) db_name_cond_opt ::= */ + -2, /* (328) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (329) like_pattern_opt ::= */ + -2, /* (330) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (331) table_name_cond ::= table_name */ + 0, /* (332) from_db_opt ::= */ + -2, /* (333) from_db_opt ::= FROM db_name */ + 0, /* (334) tag_list_opt ::= */ + -1, /* (335) tag_list_opt ::= tag_item */ + -3, /* (336) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (337) tag_item ::= TBNAME */ + -1, /* (338) tag_item ::= QTAGS */ + -1, /* (339) tag_item ::= column_name */ + -2, /* (340) tag_item ::= column_name column_alias */ + -3, /* (341) tag_item ::= column_name AS column_alias */ + 0, /* (342) db_kind_opt ::= */ + -1, /* (343) db_kind_opt ::= USER */ + -1, /* (344) db_kind_opt ::= SYSTEM */ + -11, /* (345) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + -11, /* (346) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + -4, /* (347) cmd ::= DROP TSMA exists_opt full_tsma_name */ + -3, /* (348) cmd ::= SHOW db_name_cond_opt TSMAS */ + -1, /* (349) full_tsma_name ::= tsma_name */ + -3, /* (350) full_tsma_name ::= db_name NK_DOT tsma_name */ + -4, /* (351) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + -8, /* (352) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (353) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (354) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (355) full_index_name ::= index_name */ + -3, /* (356) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (357) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (358) 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, /* (359) func_list ::= func */ + -3, /* (360) func_list ::= func_list NK_COMMA func */ + -4, /* (361) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (362) sma_func_name ::= function_name */ + -1, /* (363) sma_func_name ::= COUNT */ + -1, /* (364) sma_func_name ::= FIRST */ + -1, /* (365) sma_func_name ::= LAST */ + -1, /* (366) sma_func_name ::= LAST_ROW */ + 0, /* (367) sma_stream_opt ::= */ + -3, /* (368) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (369) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (370) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (371) with_meta ::= AS */ + -3, /* (372) with_meta ::= WITH META AS */ + -3, /* (373) with_meta ::= ONLY META AS */ + -6, /* (374) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (375) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (376) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (377) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (378) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (379) cmd ::= DESC full_table_name */ + -2, /* (380) cmd ::= DESCRIBE full_table_name */ + -3, /* (381) cmd ::= RESET QUERY CACHE */ + -4, /* (382) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (383) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (384) analyze_opt ::= */ + -1, /* (385) analyze_opt ::= ANALYZE */ + 0, /* (386) explain_options ::= */ + -3, /* (387) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (388) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (389) 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, /* (390) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (391) agg_func_opt ::= */ + -1, /* (392) agg_func_opt ::= AGGREGATE */ + 0, /* (393) bufsize_opt ::= */ + -2, /* (394) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (395) language_opt ::= */ + -2, /* (396) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (397) or_replace_opt ::= */ + -2, /* (398) or_replace_opt ::= OR REPLACE */ + -6, /* (399) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (400) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (401) full_view_name ::= view_name */ + -3, /* (402) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (403) 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, /* (404) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (405) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (406) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (407) col_list_opt ::= */ + -3, /* (408) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + -1, /* (409) column_stream_def_list ::= column_stream_def */ + -3, /* (410) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + -2, /* (411) column_stream_def ::= column_name stream_col_options */ + 0, /* (412) stream_col_options ::= */ + -3, /* (413) stream_col_options ::= stream_col_options PRIMARY KEY */ + 0, /* (414) tag_def_or_ref_opt ::= */ + -1, /* (415) tag_def_or_ref_opt ::= tags_def */ + -4, /* (416) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 0, /* (417) stream_options ::= */ + -3, /* (418) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (419) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (420) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (421) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (422) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (423) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (424) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (425) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (426) subtable_opt ::= */ + -4, /* (427) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (428) ignore_opt ::= */ + -2, /* (429) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (430) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (431) cmd ::= KILL QUERY NK_STRING */ + -3, /* (432) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (433) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (434) cmd ::= BALANCE VGROUP */ + -4, /* (435) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -5, /* (436) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + -4, /* (437) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (438) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (439) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (440) on_vgroup_id ::= */ + -2, /* (441) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (442) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (443) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (444) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (445) cmd ::= query_or_subquery */ + -1, /* (446) cmd ::= insert_query */ + -7, /* (447) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (448) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (449) tags_literal ::= NK_INTEGER */ + -3, /* (450) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + -3, /* (451) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + -2, /* (452) tags_literal ::= NK_PLUS NK_INTEGER */ + -4, /* (453) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (454) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + -2, /* (455) tags_literal ::= NK_MINUS NK_INTEGER */ + -4, /* (456) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (457) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + -1, /* (458) tags_literal ::= NK_FLOAT */ + -2, /* (459) tags_literal ::= NK_PLUS NK_FLOAT */ + -2, /* (460) tags_literal ::= NK_MINUS NK_FLOAT */ + -1, /* (461) tags_literal ::= NK_BIN */ + -3, /* (462) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + -3, /* (463) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + -2, /* (464) tags_literal ::= NK_PLUS NK_BIN */ + -4, /* (465) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + -4, /* (466) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + -2, /* (467) tags_literal ::= NK_MINUS NK_BIN */ + -4, /* (468) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + -4, /* (469) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + -1, /* (470) tags_literal ::= NK_HEX */ + -3, /* (471) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + -3, /* (472) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + -2, /* (473) tags_literal ::= NK_PLUS NK_HEX */ + -4, /* (474) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + -4, /* (475) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + -2, /* (476) tags_literal ::= NK_MINUS NK_HEX */ + -4, /* (477) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + -4, /* (478) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + -1, /* (479) tags_literal ::= NK_STRING */ + -3, /* (480) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + -3, /* (481) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + -1, /* (482) tags_literal ::= NK_BOOL */ + -1, /* (483) tags_literal ::= NULL */ + -1, /* (484) tags_literal ::= literal_func */ + -3, /* (485) tags_literal ::= literal_func NK_PLUS duration_literal */ + -3, /* (486) tags_literal ::= literal_func NK_MINUS duration_literal */ + -1, /* (487) tags_literal_list ::= tags_literal */ + -3, /* (488) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + -1, /* (489) literal ::= NK_INTEGER */ + -1, /* (490) literal ::= NK_FLOAT */ + -1, /* (491) literal ::= NK_STRING */ + -1, /* (492) literal ::= NK_BOOL */ + -2, /* (493) literal ::= TIMESTAMP NK_STRING */ + -1, /* (494) literal ::= duration_literal */ + -1, /* (495) literal ::= NULL */ + -1, /* (496) literal ::= NK_QUESTION */ + -1, /* (497) duration_literal ::= NK_VARIABLE */ + -1, /* (498) signed ::= NK_INTEGER */ + -2, /* (499) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (500) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (501) signed ::= NK_FLOAT */ + -2, /* (502) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (503) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (504) signed_literal ::= signed */ + -1, /* (505) signed_literal ::= NK_STRING */ + -1, /* (506) signed_literal ::= NK_BOOL */ + -2, /* (507) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (508) signed_literal ::= duration_literal */ + -1, /* (509) signed_literal ::= NULL */ + -1, /* (510) signed_literal ::= literal_func */ + -1, /* (511) signed_literal ::= NK_QUESTION */ + -1, /* (512) literal_list ::= signed_literal */ + -3, /* (513) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (514) db_name ::= NK_ID */ + -1, /* (515) table_name ::= NK_ID */ + -1, /* (516) column_name ::= NK_ID */ + -1, /* (517) function_name ::= NK_ID */ + -1, /* (518) view_name ::= NK_ID */ + -1, /* (519) table_alias ::= NK_ID */ + -1, /* (520) column_alias ::= NK_ID */ + -1, /* (521) column_alias ::= NK_ALIAS */ + -1, /* (522) user_name ::= NK_ID */ + -1, /* (523) topic_name ::= NK_ID */ + -1, /* (524) stream_name ::= NK_ID */ + -1, /* (525) cgroup_name ::= NK_ID */ + -1, /* (526) index_name ::= NK_ID */ + -1, /* (527) tsma_name ::= NK_ID */ + -1, /* (528) expr_or_subquery ::= expression */ + -1, /* (529) expression ::= literal */ + -1, /* (530) expression ::= pseudo_column */ + -1, /* (531) expression ::= column_reference */ + -1, /* (532) expression ::= function_expression */ + -1, /* (533) expression ::= case_when_expression */ + -3, /* (534) expression ::= NK_LP expression NK_RP */ + -2, /* (535) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (536) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (537) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (538) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (539) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (540) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (541) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (542) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (543) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (544) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (545) expression_list ::= expr_or_subquery */ + -3, /* (546) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (547) column_reference ::= column_name */ + -3, /* (548) column_reference ::= table_name NK_DOT column_name */ + -1, /* (549) column_reference ::= NK_ALIAS */ + -3, /* (550) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (551) pseudo_column ::= ROWTS */ + -1, /* (552) pseudo_column ::= TBNAME */ + -3, /* (553) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (554) pseudo_column ::= QSTART */ + -1, /* (555) pseudo_column ::= QEND */ + -1, /* (556) pseudo_column ::= QDURATION */ + -1, /* (557) pseudo_column ::= WSTART */ + -1, /* (558) pseudo_column ::= WEND */ + -1, /* (559) pseudo_column ::= WDURATION */ + -1, /* (560) pseudo_column ::= IROWTS */ + -1, /* (561) pseudo_column ::= ISFILLED */ + -1, /* (562) pseudo_column ::= QTAGS */ + -4, /* (563) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (564) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (565) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -6, /* (566) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + -1, /* (567) function_expression ::= literal_func */ + -3, /* (568) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (569) literal_func ::= NOW */ + -1, /* (570) literal_func ::= TODAY */ + -1, /* (571) noarg_func ::= NOW */ + -1, /* (572) noarg_func ::= TODAY */ + -1, /* (573) noarg_func ::= TIMEZONE */ + -1, /* (574) noarg_func ::= DATABASE */ + -1, /* (575) noarg_func ::= CLIENT_VERSION */ + -1, /* (576) noarg_func ::= SERVER_VERSION */ + -1, /* (577) noarg_func ::= SERVER_STATUS */ + -1, /* (578) noarg_func ::= CURRENT_USER */ + -1, /* (579) noarg_func ::= USER */ + -1, /* (580) star_func ::= COUNT */ + -1, /* (581) star_func ::= FIRST */ + -1, /* (582) star_func ::= LAST */ + -1, /* (583) star_func ::= LAST_ROW */ + -1, /* (584) star_func_para_list ::= NK_STAR */ + -1, /* (585) star_func_para_list ::= other_para_list */ + -1, /* (586) other_para_list ::= star_func_para */ + -3, /* (587) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (588) star_func_para ::= expr_or_subquery */ + -3, /* (589) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (590) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (591) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (592) when_then_list ::= when_then_expr */ + -2, /* (593) when_then_list ::= when_then_list when_then_expr */ + -4, /* (594) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (595) case_when_else_opt ::= */ + -2, /* (596) case_when_else_opt ::= ELSE common_expression */ + -3, /* (597) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (598) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (599) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (600) predicate ::= expr_or_subquery IS NULL */ + -4, /* (601) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (602) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (603) compare_op ::= NK_LT */ + -1, /* (604) compare_op ::= NK_GT */ + -1, /* (605) compare_op ::= NK_LE */ + -1, /* (606) compare_op ::= NK_GE */ + -1, /* (607) compare_op ::= NK_NE */ + -1, /* (608) compare_op ::= NK_EQ */ + -1, /* (609) compare_op ::= LIKE */ + -2, /* (610) compare_op ::= NOT LIKE */ + -1, /* (611) compare_op ::= MATCH */ + -1, /* (612) compare_op ::= NMATCH */ + -1, /* (613) compare_op ::= CONTAINS */ + -1, /* (614) in_op ::= IN */ + -2, /* (615) in_op ::= NOT IN */ + -3, /* (616) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (617) boolean_value_expression ::= boolean_primary */ + -2, /* (618) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (619) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (620) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (621) boolean_primary ::= predicate */ + -3, /* (622) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (623) common_expression ::= expr_or_subquery */ + -1, /* (624) common_expression ::= boolean_value_expression */ + 0, /* (625) from_clause_opt ::= */ + -2, /* (626) from_clause_opt ::= FROM table_reference_list */ + -1, /* (627) table_reference_list ::= table_reference */ + -3, /* (628) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (629) table_reference ::= table_primary */ + -1, /* (630) table_reference ::= joined_table */ + -2, /* (631) table_primary ::= table_name alias_opt */ + -4, /* (632) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (633) table_primary ::= subquery alias_opt */ + -1, /* (634) table_primary ::= parenthesized_joined_table */ + 0, /* (635) alias_opt ::= */ + -1, /* (636) alias_opt ::= table_alias */ + -2, /* (637) alias_opt ::= AS table_alias */ + -3, /* (638) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (639) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -8, /* (640) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 0, /* (641) join_type ::= */ + -1, /* (642) join_type ::= INNER */ + -1, /* (643) join_type ::= LEFT */ + -1, /* (644) join_type ::= RIGHT */ + -1, /* (645) join_type ::= FULL */ + 0, /* (646) join_subtype ::= */ + -1, /* (647) join_subtype ::= OUTER */ + -1, /* (648) join_subtype ::= SEMI */ + -1, /* (649) join_subtype ::= ANTI */ + -1, /* (650) join_subtype ::= ASOF */ + -1, /* (651) join_subtype ::= WINDOW */ + 0, /* (652) join_on_clause_opt ::= */ + -2, /* (653) join_on_clause_opt ::= ON search_condition */ + 0, /* (654) window_offset_clause_opt ::= */ + -6, /* (655) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + -1, /* (656) window_offset_literal ::= NK_VARIABLE */ + -2, /* (657) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 0, /* (658) jlimit_clause_opt ::= */ + -2, /* (659) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + -14, /* (660) 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, /* (661) hint_list ::= */ + -1, /* (662) hint_list ::= NK_HINT */ + 0, /* (663) tag_mode_opt ::= */ + -1, /* (664) tag_mode_opt ::= TAGS */ + 0, /* (665) set_quantifier_opt ::= */ + -1, /* (666) set_quantifier_opt ::= DISTINCT */ + -1, /* (667) set_quantifier_opt ::= ALL */ + -1, /* (668) select_list ::= select_item */ + -3, /* (669) select_list ::= select_list NK_COMMA select_item */ + -1, /* (670) select_item ::= NK_STAR */ + -1, /* (671) select_item ::= common_expression */ + -2, /* (672) select_item ::= common_expression column_alias */ + -3, /* (673) select_item ::= common_expression AS column_alias */ + -3, /* (674) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (675) where_clause_opt ::= */ + -2, /* (676) where_clause_opt ::= WHERE search_condition */ + 0, /* (677) partition_by_clause_opt ::= */ + -3, /* (678) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (679) partition_list ::= partition_item */ + -3, /* (680) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (681) partition_item ::= expr_or_subquery */ + -2, /* (682) partition_item ::= expr_or_subquery column_alias */ + -3, /* (683) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (684) twindow_clause_opt ::= */ + -6, /* (685) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (686) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (687) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (688) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (689) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + -4, /* (690) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + -6, /* (691) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 0, /* (692) sliding_opt ::= */ + -4, /* (693) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (694) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (695) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (696) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (697) fill_opt ::= */ + -4, /* (698) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (699) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (700) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (701) fill_mode ::= NONE */ + -1, /* (702) fill_mode ::= PREV */ + -1, /* (703) fill_mode ::= NULL */ + -1, /* (704) fill_mode ::= NULL_F */ + -1, /* (705) fill_mode ::= LINEAR */ + -1, /* (706) fill_mode ::= NEXT */ + 0, /* (707) group_by_clause_opt ::= */ + -3, /* (708) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (709) group_by_list ::= expr_or_subquery */ + -3, /* (710) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (711) having_clause_opt ::= */ + -2, /* (712) having_clause_opt ::= HAVING search_condition */ + 0, /* (713) range_opt ::= */ + -6, /* (714) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (715) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (716) every_opt ::= */ + -4, /* (717) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (718) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (719) query_simple ::= query_specification */ + -1, /* (720) query_simple ::= union_query_expression */ + -4, /* (721) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (722) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (723) query_simple_or_subquery ::= query_simple */ + -1, /* (724) query_simple_or_subquery ::= subquery */ + -1, /* (725) query_or_subquery ::= query_expression */ + -1, /* (726) query_or_subquery ::= subquery */ + 0, /* (727) order_by_clause_opt ::= */ + -3, /* (728) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (729) slimit_clause_opt ::= */ + -2, /* (730) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (731) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (732) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (733) limit_clause_opt ::= */ + -2, /* (734) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (735) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (736) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (737) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (738) subquery ::= NK_LP subquery NK_RP */ + -1, /* (739) search_condition ::= common_expression */ + -1, /* (740) sort_specification_list ::= sort_specification */ + -3, /* (741) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (742) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (743) ordering_specification_opt ::= */ + -1, /* (744) ordering_specification_opt ::= ASC */ + -1, /* (745) ordering_specification_opt ::= DESC */ + 0, /* (746) null_ordering_opt ::= */ + -2, /* (747) null_ordering_opt ::= NULLS FIRST */ + -2, /* (748) null_ordering_opt ::= NULLS LAST */ + 0, /* (749) column_options ::= */ + -3, /* (750) column_options ::= column_options PRIMARY KEY */ + -3, /* (751) column_options ::= column_options ENCODE NK_STRING */ + -3, /* (752) column_options ::= column_options COMPRESS NK_STRING */ + -3, /* (753) column_options ::= column_options LEVEL NK_STRING */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -5158,54 +5510,6 @@ static YYACTIONTYPE yy_reduce( (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; -#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 @@ -5220,11 +5524,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,378,&yymsp[0].minor); + yy_destructor(yypParser,379,&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,379,&yymsp[0].minor); + yy_destructor(yypParser,380,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -5238,20 +5542,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,378,&yymsp[-2].minor); +{ yy_destructor(yypParser,379,&yymsp[-2].minor); { } - yy_destructor(yypParser,380,&yymsp[0].minor); + yy_destructor(yypParser,381,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,381,&yymsp[0].minor); +{ yy_destructor(yypParser,382,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,379,&yymsp[-1].minor); +{ yy_destructor(yypParser,380,&yymsp[-1].minor); { } - yy_destructor(yypParser,381,&yymsp[0].minor); + yy_destructor(yypParser,382,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -5265,2053 +5569,2062 @@ 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,380,&yymsp[0].minor); + yy_destructor(yypParser,381,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -{ yylhsminor.yy34 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy34 = yylhsminor.yy34; +{ yylhsminor.yy316 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy316 = yylhsminor.yy316; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -{ yylhsminor.yy34 = addNodeToList(pCxt, yymsp[-2].minor.yy34, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy34 = yylhsminor.yy34; +{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy316 = yylhsminor.yy316; break; case 26: /* white_list ::= HOST ip_range_list */ -{ yymsp[-1].minor.yy34 = yymsp[0].minor.yy34; } +{ yymsp[-1].minor.yy316 = yymsp[0].minor.yy316; } break; case 27: /* white_list_opt ::= */ - case 201: /* specific_cols_opt ::= */ yytestcase(yyruleno==201); - case 239: /* tags_def_opt ::= */ yytestcase(yyruleno==239); - case 329: /* tag_list_opt ::= */ yytestcase(yyruleno==329); - case 402: /* col_list_opt ::= */ yytestcase(yyruleno==402); - case 409: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==409); - case 672: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==672); - case 702: /* group_by_clause_opt ::= */ yytestcase(yyruleno==702); - case 722: /* order_by_clause_opt ::= */ yytestcase(yyruleno==722); -{ yymsp[1].minor.yy34 = NULL; } + case 205: /* specific_cols_opt ::= */ yytestcase(yyruleno==205); + case 243: /* tags_def_opt ::= */ yytestcase(yyruleno==243); + case 334: /* tag_list_opt ::= */ yytestcase(yyruleno==334); + case 407: /* col_list_opt ::= */ yytestcase(yyruleno==407); + case 414: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==414); + case 677: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==677); + case 707: /* group_by_clause_opt ::= */ yytestcase(yyruleno==707); + case 727: /* order_by_clause_opt ::= */ yytestcase(yyruleno==727); +{ yymsp[1].minor.yy316 = NULL; } break; case 28: /* white_list_opt ::= white_list */ - case 240: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==240); - case 410: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==410); - case 580: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==580); -{ yylhsminor.yy34 = yymsp[0].minor.yy34; } - yymsp[0].minor.yy34 = yylhsminor.yy34; + case 244: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==244); + case 415: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==415); + case 585: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==585); +{ yylhsminor.yy316 = yymsp[0].minor.yy316; } + yymsp[0].minor.yy316 = yylhsminor.yy316; break; - case 29: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt white_list_opt */ + case 29: /* is_import_opt ::= */ + case 31: /* is_createdb_opt ::= */ yytestcase(yyruleno==31); +{ yymsp[1].minor.yy1043 = 0; } + break; + case 30: /* is_import_opt ::= IS_IMPORT NK_INTEGER */ + case 32: /* is_createdb_opt ::= CREATEDB NK_INTEGER */ yytestcase(yyruleno==32); + case 42: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ yytestcase(yyruleno==42); +{ yymsp[-1].minor.yy1043 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } + break; + case 33: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ { - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-4].minor.yy479, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy323); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy34); + pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-6].minor.yy1109, &yymsp[-4].minor.yy0, yymsp[-3].minor.yy1043, yymsp[-1].minor.yy1043, yymsp[-2].minor.yy1043); + pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy316); } break; - case 30: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy479, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } + case 34: /* cmd ::= ALTER USER user_name PASS NK_STRING */ +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, 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.yy479, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } + case 35: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, 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.yy479, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } + case 36: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; - case 33: /* cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy479, TSDB_ALTER_USER_CREATEDB, &yymsp[0].minor.yy0); } + case 37: /* cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_CREATEDB, &yymsp[0].minor.yy0); } break; - case 34: /* cmd ::= ALTER USER user_name ADD white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy479, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy34); } + case 38: /* cmd ::= ALTER USER user_name ADD white_list */ +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy316); } break; - case 35: /* cmd ::= ALTER USER user_name DROP white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy479, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy34); } + case 39: /* cmd ::= ALTER USER user_name DROP white_list */ +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy316); } break; - case 36: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy479); } + case 40: /* cmd ::= DROP USER user_name */ +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy1109); } break; - case 37: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy323 = 1; } + case 41: /* sysinfo_opt ::= */ +{ yymsp[1].minor.yy1043 = 1; } break; - case 38: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy323 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } + case 43: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy1089, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy1109, yymsp[-2].minor.yy416); } break; - case 39: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy579, &yymsp[-3].minor.yy687, &yymsp[0].minor.yy479, yymsp[-2].minor.yy452); } + case 44: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy1089, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy1109, yymsp[-2].minor.yy416); } break; - case 40: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy579, &yymsp[-3].minor.yy687, &yymsp[0].minor.yy479, yymsp[-2].minor.yy452); } + case 45: /* privileges ::= ALL */ +{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_ALL; } break; - case 41: /* privileges ::= ALL */ -{ yymsp[0].minor.yy579 = PRIVILEGE_TYPE_ALL; } + case 46: /* privileges ::= priv_type_list */ + case 48: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==48); +{ yylhsminor.yy1089 = yymsp[0].minor.yy1089; } + yymsp[0].minor.yy1089 = yylhsminor.yy1089; break; - case 42: /* privileges ::= priv_type_list */ - case 44: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==44); -{ yylhsminor.yy579 = yymsp[0].minor.yy579; } - yymsp[0].minor.yy579 = yylhsminor.yy579; + case 47: /* privileges ::= SUBSCRIBE */ +{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_SUBSCRIBE; } break; - case 43: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy579 = PRIVILEGE_TYPE_SUBSCRIBE; } + case 49: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ +{ yylhsminor.yy1089 = yymsp[-2].minor.yy1089 | yymsp[0].minor.yy1089; } + yymsp[-2].minor.yy1089 = yylhsminor.yy1089; break; - case 45: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy579 = yymsp[-2].minor.yy579 | yymsp[0].minor.yy579; } - yymsp[-2].minor.yy579 = yylhsminor.yy579; + case 50: /* priv_type ::= READ */ +{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_READ; } break; - case 46: /* priv_type ::= READ */ -{ yymsp[0].minor.yy579 = PRIVILEGE_TYPE_READ; } + case 51: /* priv_type ::= WRITE */ +{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_WRITE; } break; - case 47: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy579 = PRIVILEGE_TYPE_WRITE; } + case 52: /* priv_type ::= ALTER */ +{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_ALTER; } break; - case 48: /* priv_type ::= ALTER */ -{ yymsp[0].minor.yy579 = PRIVILEGE_TYPE_ALTER; } + case 53: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ +{ yylhsminor.yy849.first = yymsp[-2].minor.yy0; yylhsminor.yy849.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy849 = yylhsminor.yy849; break; - case 49: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy687.first = yymsp[-2].minor.yy0; yylhsminor.yy687.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy687 = yylhsminor.yy687; + case 54: /* priv_level ::= db_name NK_DOT NK_STAR */ +{ yylhsminor.yy849.first = yymsp[-2].minor.yy1109; yylhsminor.yy849.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy849 = yylhsminor.yy849; break; - case 50: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy687.first = yymsp[-2].minor.yy479; yylhsminor.yy687.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy687 = yylhsminor.yy687; + case 55: /* priv_level ::= db_name NK_DOT table_name */ +{ yylhsminor.yy849.first = yymsp[-2].minor.yy1109; yylhsminor.yy849.second = yymsp[0].minor.yy1109; } + yymsp[-2].minor.yy849 = yylhsminor.yy849; break; - case 51: /* priv_level ::= db_name NK_DOT table_name */ -{ yylhsminor.yy687.first = yymsp[-2].minor.yy479; yylhsminor.yy687.second = yymsp[0].minor.yy479; } - yymsp[-2].minor.yy687 = yylhsminor.yy687; + case 56: /* priv_level ::= topic_name */ +{ yylhsminor.yy849.first = yymsp[0].minor.yy1109; yylhsminor.yy849.second = nil_token; } + yymsp[0].minor.yy849 = yylhsminor.yy849; break; - case 52: /* priv_level ::= topic_name */ -{ yylhsminor.yy687.first = yymsp[0].minor.yy479; yylhsminor.yy687.second = nil_token; } - yymsp[0].minor.yy687 = yylhsminor.yy687; + case 57: /* with_opt ::= */ + case 173: /* start_opt ::= */ yytestcase(yyruleno==173); + case 177: /* end_opt ::= */ yytestcase(yyruleno==177); + case 329: /* like_pattern_opt ::= */ yytestcase(yyruleno==329); + case 426: /* subtable_opt ::= */ yytestcase(yyruleno==426); + case 595: /* case_when_else_opt ::= */ yytestcase(yyruleno==595); + case 625: /* from_clause_opt ::= */ yytestcase(yyruleno==625); + case 652: /* join_on_clause_opt ::= */ yytestcase(yyruleno==652); + case 654: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==654); + case 658: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==658); + case 675: /* where_clause_opt ::= */ yytestcase(yyruleno==675); + case 684: /* twindow_clause_opt ::= */ yytestcase(yyruleno==684); + case 692: /* sliding_opt ::= */ yytestcase(yyruleno==692); + case 697: /* fill_opt ::= */ yytestcase(yyruleno==697); + case 711: /* having_clause_opt ::= */ yytestcase(yyruleno==711); + case 713: /* range_opt ::= */ yytestcase(yyruleno==713); + case 716: /* every_opt ::= */ yytestcase(yyruleno==716); + case 729: /* slimit_clause_opt ::= */ yytestcase(yyruleno==729); + case 733: /* limit_clause_opt ::= */ yytestcase(yyruleno==733); +{ yymsp[1].minor.yy416 = NULL; } break; - case 53: /* with_opt ::= */ - case 169: /* start_opt ::= */ yytestcase(yyruleno==169); - case 173: /* end_opt ::= */ yytestcase(yyruleno==173); - case 324: /* like_pattern_opt ::= */ yytestcase(yyruleno==324); - case 421: /* subtable_opt ::= */ yytestcase(yyruleno==421); - case 590: /* case_when_else_opt ::= */ yytestcase(yyruleno==590); - case 620: /* from_clause_opt ::= */ yytestcase(yyruleno==620); - case 647: /* join_on_clause_opt ::= */ yytestcase(yyruleno==647); - case 649: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==649); - case 653: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==653); - case 670: /* where_clause_opt ::= */ yytestcase(yyruleno==670); - case 679: /* twindow_clause_opt ::= */ yytestcase(yyruleno==679); - case 687: /* sliding_opt ::= */ yytestcase(yyruleno==687); - case 692: /* fill_opt ::= */ yytestcase(yyruleno==692); - case 706: /* having_clause_opt ::= */ yytestcase(yyruleno==706); - case 708: /* range_opt ::= */ yytestcase(yyruleno==708); - case 711: /* every_opt ::= */ yytestcase(yyruleno==711); - case 724: /* slimit_clause_opt ::= */ yytestcase(yyruleno==724); - case 728: /* limit_clause_opt ::= */ yytestcase(yyruleno==728); -{ yymsp[1].minor.yy452 = NULL; } + case 58: /* with_opt ::= WITH search_condition */ + case 626: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==626); + case 653: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==653); + case 676: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==676); + case 712: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==712); +{ yymsp[-1].minor.yy416 = yymsp[0].minor.yy416; } break; - case 54: /* with_opt ::= WITH search_condition */ - case 621: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==621); - case 648: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==648); - case 671: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==671); - case 707: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==707); -{ yymsp[-1].minor.yy452 = yymsp[0].minor.yy452; } - break; - case 55: /* cmd ::= CREATE ENCRYPT_KEY NK_STRING */ + case 59: /* cmd ::= CREATE ENCRYPT_KEY NK_STRING */ { pCxt->pRootNode = createEncryptKeyStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 56: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy479, NULL); } + case 60: /* cmd ::= CREATE DNODE dnode_endpoint */ +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy1109, NULL); } break; - case 57: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0); } + case 61: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0); } break; - case 58: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy437, false); } + case 62: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy209, false); } break; - case 59: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy479, yymsp[0].minor.yy437, false); } + case 63: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy209, false); } break; - case 60: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy437); } + case 64: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy209); } break; - case 61: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy479, false, yymsp[0].minor.yy437); } + case 65: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy1109, false, yymsp[0].minor.yy209); } break; - case 62: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + case 66: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } break; - case 63: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + case 67: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 64: /* cmd ::= ALTER ALL DNODES NK_STRING */ + case 68: /* cmd ::= ALTER ALL DNODES NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } break; - case 65: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + case 69: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 66: /* cmd ::= RESTORE DNODE NK_INTEGER */ + case 70: /* cmd ::= RESTORE DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } break; - case 67: /* dnode_endpoint ::= NK_STRING */ - case 68: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==68); - case 69: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==69); - case 358: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==358); - case 359: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==359); - case 360: /* sma_func_name ::= LAST */ yytestcase(yyruleno==360); - case 361: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==361); - case 509: /* db_name ::= NK_ID */ yytestcase(yyruleno==509); - case 510: /* table_name ::= NK_ID */ yytestcase(yyruleno==510); - case 511: /* column_name ::= NK_ID */ yytestcase(yyruleno==511); - case 512: /* function_name ::= NK_ID */ yytestcase(yyruleno==512); - case 513: /* view_name ::= NK_ID */ yytestcase(yyruleno==513); - case 514: /* table_alias ::= NK_ID */ yytestcase(yyruleno==514); - case 515: /* column_alias ::= NK_ID */ yytestcase(yyruleno==515); - case 516: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==516); - case 517: /* user_name ::= NK_ID */ yytestcase(yyruleno==517); - case 518: /* topic_name ::= NK_ID */ yytestcase(yyruleno==518); - case 519: /* stream_name ::= NK_ID */ yytestcase(yyruleno==519); - case 520: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==520); - case 521: /* index_name ::= NK_ID */ yytestcase(yyruleno==521); - case 522: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==522); - case 566: /* noarg_func ::= NOW */ yytestcase(yyruleno==566); - case 567: /* noarg_func ::= TODAY */ yytestcase(yyruleno==567); - case 568: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==568); - case 569: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==569); - case 570: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==570); - case 571: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==571); - case 572: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==572); - case 573: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==573); - case 574: /* noarg_func ::= USER */ yytestcase(yyruleno==574); - case 575: /* star_func ::= COUNT */ yytestcase(yyruleno==575); - case 576: /* star_func ::= FIRST */ yytestcase(yyruleno==576); - case 577: /* star_func ::= LAST */ yytestcase(yyruleno==577); - case 578: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==578); -{ yylhsminor.yy479 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy479 = yylhsminor.yy479; + case 71: /* dnode_endpoint ::= NK_STRING */ + case 72: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==72); + case 73: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==73); + case 363: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==363); + case 364: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==364); + case 365: /* sma_func_name ::= LAST */ yytestcase(yyruleno==365); + case 366: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==366); + case 514: /* db_name ::= NK_ID */ yytestcase(yyruleno==514); + case 515: /* table_name ::= NK_ID */ yytestcase(yyruleno==515); + case 516: /* column_name ::= NK_ID */ yytestcase(yyruleno==516); + case 517: /* function_name ::= NK_ID */ yytestcase(yyruleno==517); + case 518: /* view_name ::= NK_ID */ yytestcase(yyruleno==518); + case 519: /* table_alias ::= NK_ID */ yytestcase(yyruleno==519); + case 520: /* column_alias ::= NK_ID */ yytestcase(yyruleno==520); + case 521: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==521); + case 522: /* user_name ::= NK_ID */ yytestcase(yyruleno==522); + case 523: /* topic_name ::= NK_ID */ yytestcase(yyruleno==523); + case 524: /* stream_name ::= NK_ID */ yytestcase(yyruleno==524); + case 525: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==525); + case 526: /* index_name ::= NK_ID */ yytestcase(yyruleno==526); + case 527: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==527); + case 571: /* noarg_func ::= NOW */ yytestcase(yyruleno==571); + case 572: /* noarg_func ::= TODAY */ yytestcase(yyruleno==572); + case 573: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==573); + case 574: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==574); + case 575: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==575); + case 576: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==576); + case 577: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==577); + case 578: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==578); + case 579: /* noarg_func ::= USER */ yytestcase(yyruleno==579); + case 580: /* star_func ::= COUNT */ yytestcase(yyruleno==580); + case 581: /* star_func ::= FIRST */ yytestcase(yyruleno==581); + case 582: /* star_func ::= LAST */ yytestcase(yyruleno==582); + case 583: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==583); +{ yylhsminor.yy1109 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy1109 = yylhsminor.yy1109; break; - case 70: /* force_opt ::= */ - case 97: /* not_exists_opt ::= */ yytestcase(yyruleno==97); - case 99: /* exists_opt ::= */ yytestcase(yyruleno==99); - case 379: /* analyze_opt ::= */ yytestcase(yyruleno==379); - case 386: /* agg_func_opt ::= */ yytestcase(yyruleno==386); - case 392: /* or_replace_opt ::= */ yytestcase(yyruleno==392); - case 423: /* ignore_opt ::= */ yytestcase(yyruleno==423); - case 658: /* tag_mode_opt ::= */ yytestcase(yyruleno==658); - case 660: /* set_quantifier_opt ::= */ yytestcase(yyruleno==660); -{ yymsp[1].minor.yy437 = false; } + case 74: /* force_opt ::= */ + case 101: /* not_exists_opt ::= */ yytestcase(yyruleno==101); + case 103: /* exists_opt ::= */ yytestcase(yyruleno==103); + case 384: /* analyze_opt ::= */ yytestcase(yyruleno==384); + case 391: /* agg_func_opt ::= */ yytestcase(yyruleno==391); + case 397: /* or_replace_opt ::= */ yytestcase(yyruleno==397); + case 428: /* ignore_opt ::= */ yytestcase(yyruleno==428); + case 663: /* tag_mode_opt ::= */ yytestcase(yyruleno==663); + case 665: /* set_quantifier_opt ::= */ yytestcase(yyruleno==665); +{ yymsp[1].minor.yy209 = false; } break; - case 71: /* force_opt ::= FORCE */ - case 72: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==72); - case 380: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==380); - case 387: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==387); - case 659: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==659); - case 661: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==661); -{ yymsp[0].minor.yy437 = true; } + case 75: /* force_opt ::= FORCE */ + case 76: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==76); + case 385: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==385); + case 392: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==392); + case 664: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==664); + case 666: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==666); +{ yymsp[0].minor.yy209 = true; } break; - case 73: /* cmd ::= ALTER CLUSTER NK_STRING */ + case 77: /* cmd ::= ALTER CLUSTER NK_STRING */ { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 74: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + case 78: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 75: /* cmd ::= ALTER LOCAL NK_STRING */ + case 79: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 76: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + case 80: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 77: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + case 81: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 78: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + case 82: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 79: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + case 83: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 80: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + case 84: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } break; - case 81: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + case 85: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } break; - case 82: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + case 86: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } break; - case 83: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + case 87: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } break; - case 84: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + case 88: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 85: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + case 89: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 86: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + case 90: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 87: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + case 91: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } break; - case 88: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy437, &yymsp[-1].minor.yy479, yymsp[0].minor.yy452); } + case 92: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy209, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy416); } break; - case 89: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy479); } + case 93: /* cmd ::= DROP DATABASE exists_opt db_name */ +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } break; - case 90: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy479); } + case 94: /* cmd ::= USE db_name */ +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } break; - case 91: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy479, yymsp[0].minor.yy452); } + case 95: /* cmd ::= ALTER DATABASE db_name alter_db_options */ +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy416); } break; - case 92: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy479); } + case 96: /* cmd ::= FLUSH DATABASE db_name */ +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } break; - case 93: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy479, yymsp[0].minor.yy100); } + case 97: /* cmd ::= TRIM DATABASE db_name speed_opt */ +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy820); } break; - case 94: /* cmd ::= S3MIGRATE DATABASE db_name */ -{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy479); } + case 98: /* cmd ::= S3MIGRATE DATABASE db_name */ +{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } break; - case 95: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy479, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 99: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy1109, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } break; - case 96: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy437 = true; } + case 100: /* not_exists_opt ::= IF NOT EXISTS */ +{ yymsp[-2].minor.yy209 = true; } break; - case 98: /* exists_opt ::= IF EXISTS */ - case 393: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==393); - case 424: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==424); -{ yymsp[-1].minor.yy437 = true; } + case 102: /* exists_opt ::= IF EXISTS */ + case 398: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==398); + case 429: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==429); +{ yymsp[-1].minor.yy209 = true; } break; - case 100: /* db_options ::= */ -{ yymsp[1].minor.yy452 = createDefaultDatabaseOptions(pCxt); } + case 104: /* db_options ::= */ +{ yymsp[1].minor.yy416 = createDefaultDatabaseOptions(pCxt); } break; - case 101: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 105: /* db_options ::= db_options BUFFER NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 102: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 106: /* db_options ::= db_options CACHEMODEL NK_STRING */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 103: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 107: /* db_options ::= db_options CACHESIZE NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 104: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 108: /* db_options ::= db_options COMP NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 105: /* db_options ::= db_options DURATION NK_INTEGER */ - case 106: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==106); -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 109: /* db_options ::= db_options DURATION NK_INTEGER */ + case 110: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==110); +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 107: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 111: /* db_options ::= db_options MAXROWS NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 108: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 112: /* db_options ::= db_options MINROWS NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 109: /* db_options ::= db_options KEEP integer_list */ - case 110: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==110); -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_KEEP, yymsp[0].minor.yy34); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 113: /* db_options ::= db_options KEEP integer_list */ + case 114: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==114); +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_KEEP, yymsp[0].minor.yy316); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 111: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 115: /* db_options ::= db_options PAGES NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 112: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 116: /* db_options ::= db_options PAGESIZE NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 113: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 117: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 114: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 118: /* db_options ::= db_options PRECISION NK_STRING */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 115: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 119: /* db_options ::= db_options REPLICA NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 116: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 120: /* db_options ::= db_options VGROUPS NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 117: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 121: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 118: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_RETENTIONS, yymsp[0].minor.yy34); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 122: /* db_options ::= db_options RETENTIONS retention_list */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_RETENTIONS, yymsp[0].minor.yy316); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 119: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 123: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 120: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 124: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 121: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 125: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 122: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 126: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 123: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 127: /* 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.yy452 = setDatabaseOption(pCxt, yymsp[-3].minor.yy452, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-3].minor.yy416, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 124: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 128: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 125: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 129: /* 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.yy452 = setDatabaseOption(pCxt, yymsp[-3].minor.yy452, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-3].minor.yy416, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 126: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 130: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 127: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 131: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 128: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 132: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 129: /* db_options ::= db_options TABLE_PREFIX signed */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy452); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 133: /* db_options ::= db_options TABLE_PREFIX signed */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy416); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 130: /* db_options ::= db_options TABLE_SUFFIX signed */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy452); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 134: /* db_options ::= db_options TABLE_SUFFIX signed */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy416); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 131: /* db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 135: /* db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 132: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - case 133: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==133); -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 136: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + case 137: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==137); +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 134: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 138: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 135: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 139: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 136: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ -{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 140: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ +{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 137: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy452 = createAlterDatabaseOptions(pCxt); yylhsminor.yy452 = setAlterDatabaseOption(pCxt, yylhsminor.yy452, &yymsp[0].minor.yy455); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 141: /* alter_db_options ::= alter_db_option */ +{ yylhsminor.yy416 = createAlterDatabaseOptions(pCxt); yylhsminor.yy416 = setAlterDatabaseOption(pCxt, yylhsminor.yy416, &yymsp[0].minor.yy101); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 138: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy452 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy452, &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 142: /* alter_db_options ::= alter_db_options alter_db_option */ +{ yylhsminor.yy416 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy416, &yymsp[0].minor.yy101); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 139: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 143: /* alter_db_option ::= BUFFER NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 140: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 144: /* alter_db_option ::= CACHEMODEL NK_STRING */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 141: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 145: /* alter_db_option ::= CACHESIZE NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 142: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 146: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 143: /* alter_db_option ::= KEEP integer_list */ - case 144: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==144); -{ yymsp[-1].minor.yy455.type = DB_OPTION_KEEP; yymsp[-1].minor.yy455.pList = yymsp[0].minor.yy34; } + case 147: /* alter_db_option ::= KEEP integer_list */ + case 148: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==148); +{ yymsp[-1].minor.yy101.type = DB_OPTION_KEEP; yymsp[-1].minor.yy101.pList = yymsp[0].minor.yy316; } break; - case 145: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_PAGES; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 149: /* alter_db_option ::= PAGES NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_PAGES; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 146: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 150: /* alter_db_option ::= REPLICA NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 147: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_WAL; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 151: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_WAL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 148: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 152: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 149: /* alter_db_option ::= MINROWS NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 153: /* alter_db_option ::= MINROWS NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 150: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 154: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 151: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 155: /* 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.yy455.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy455.val = t; + yymsp[-2].minor.yy101.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy101.val = t; } break; - case 152: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 156: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 153: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 157: /* 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.yy455.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy455.val = t; + yymsp[-2].minor.yy101.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy101.val = t; } break; - case 154: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - case 155: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==155); -{ yymsp[-1].minor.yy455.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } - break; - case 156: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } - break; - case 157: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } - break; - case 158: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ -{ yymsp[-1].minor.yy455.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } - break; - case 159: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy34 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy34 = yylhsminor.yy34; - break; - case 160: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 438: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==438); -{ yylhsminor.yy34 = addNodeToList(pCxt, yymsp[-2].minor.yy34, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy34 = yylhsminor.yy34; - break; - case 161: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy34 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy34 = yylhsminor.yy34; - break; - case 162: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy34 = addNodeToList(pCxt, yymsp[-2].minor.yy34, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy34 = yylhsminor.yy34; - break; - case 163: /* retention_list ::= retention */ - case 195: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==195); - case 198: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==198); - case 205: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==205); - case 208: /* column_def_list ::= column_def */ yytestcase(yyruleno==208); - case 256: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==256); - case 261: /* col_name_list ::= col_name */ yytestcase(yyruleno==261); - case 330: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==330); - case 354: /* func_list ::= func */ yytestcase(yyruleno==354); - case 404: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==404); - case 482: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==482); - case 507: /* literal_list ::= signed_literal */ yytestcase(yyruleno==507); - case 581: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==581); - case 587: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==587); - case 663: /* select_list ::= select_item */ yytestcase(yyruleno==663); - case 674: /* partition_list ::= partition_item */ yytestcase(yyruleno==674); - case 735: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==735); -{ yylhsminor.yy34 = createNodeList(pCxt, yymsp[0].minor.yy452); } - yymsp[0].minor.yy34 = yylhsminor.yy34; - break; - case 164: /* retention_list ::= retention_list NK_COMMA retention */ - case 199: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==199); - case 206: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==206); - case 209: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==209); - case 257: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==257); - case 262: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==262); - case 331: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==331); - case 355: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==355); - case 405: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==405); - case 483: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==483); - case 508: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==508); - case 582: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==582); - case 664: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==664); - case 675: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==675); - case 736: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==736); -{ yylhsminor.yy34 = addNodeToList(pCxt, yymsp[-2].minor.yy34, yymsp[0].minor.yy452); } - yymsp[-2].minor.yy34 = yylhsminor.yy34; - break; - case 165: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - case 166: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==166); -{ yylhsminor.yy452 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; - break; - case 167: /* speed_opt ::= */ - case 388: /* bufsize_opt ::= */ yytestcase(yyruleno==388); -{ yymsp[1].minor.yy100 = 0; } - break; - case 168: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 389: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==389); -{ yymsp[-1].minor.yy100 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } - break; - case 170: /* start_opt ::= START WITH NK_INTEGER */ - case 174: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==174); -{ yymsp[-2].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - break; - case 171: /* start_opt ::= START WITH NK_STRING */ - case 175: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==175); -{ yymsp[-2].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 172: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 176: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==176); -{ yymsp[-3].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 177: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 179: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==179); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy437, yymsp[-5].minor.yy452, yymsp[-3].minor.yy34, yymsp[-1].minor.yy34, yymsp[0].minor.yy452); } - break; - case 178: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy34); } - break; - case 180: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy34); } - break; - case 181: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy452); } - break; - case 182: /* cmd ::= ALTER TABLE alter_table_clause */ - case 440: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==440); - case 441: /* cmd ::= insert_query */ yytestcase(yyruleno==441); -{ pCxt->pRootNode = yymsp[0].minor.yy452; } - break; - case 183: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy452); } - break; - case 184: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy452 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; - break; - case 185: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ -{ yylhsminor.yy452 = createAlterTableAddModifyColOptions2(pCxt, yymsp[-5].minor.yy452, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-2].minor.yy479, yymsp[-1].minor.yy874, yymsp[0].minor.yy452); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; - break; - case 186: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy479); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; - break; - case 187: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy479, yymsp[0].minor.yy874); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; - break; - case 188: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ -{ yylhsminor.yy452 = createAlterTableAddModifyColOptions(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS, &yymsp[-1].minor.yy479, yymsp[0].minor.yy452); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; - break; - case 189: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; - break; - case 190: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy479, yymsp[0].minor.yy874); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; - break; - case 191: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy479); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 158: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + case 159: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==159); +{ yymsp[-1].minor.yy101.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } + break; + case 160: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } + break; + case 161: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } + break; + case 162: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ +{ yymsp[-1].minor.yy101.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } + break; + case 163: /* integer_list ::= NK_INTEGER */ +{ yylhsminor.yy316 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy316 = yylhsminor.yy316; + break; + case 164: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 443: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==443); +{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy316 = yylhsminor.yy316; + break; + case 165: /* variable_list ::= NK_VARIABLE */ +{ yylhsminor.yy316 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy316 = yylhsminor.yy316; + break; + case 166: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ +{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy316 = yylhsminor.yy316; + break; + case 167: /* retention_list ::= retention */ + case 199: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==199); + case 202: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==202); + case 209: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==209); + case 212: /* column_def_list ::= column_def */ yytestcase(yyruleno==212); + case 260: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==260); + case 265: /* col_name_list ::= col_name */ yytestcase(yyruleno==265); + case 335: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==335); + case 359: /* func_list ::= func */ yytestcase(yyruleno==359); + case 409: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==409); + case 487: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==487); + case 512: /* literal_list ::= signed_literal */ yytestcase(yyruleno==512); + case 586: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==586); + case 592: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==592); + case 668: /* select_list ::= select_item */ yytestcase(yyruleno==668); + case 679: /* partition_list ::= partition_item */ yytestcase(yyruleno==679); + case 740: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==740); +{ yylhsminor.yy316 = createNodeList(pCxt, yymsp[0].minor.yy416); } + yymsp[0].minor.yy316 = yylhsminor.yy316; + break; + case 168: /* retention_list ::= retention_list NK_COMMA retention */ + case 203: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==203); + case 210: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==210); + case 213: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==213); + case 261: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==261); + case 266: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==266); + case 336: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==336); + case 360: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==360); + case 410: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==410); + case 488: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==488); + case 513: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==513); + case 587: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==587); + case 669: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==669); + case 680: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==680); + case 741: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==741); +{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, yymsp[0].minor.yy416); } + yymsp[-2].minor.yy316 = yylhsminor.yy316; + break; + case 169: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 170: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==170); +{ yylhsminor.yy416 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; + break; + case 171: /* speed_opt ::= */ + case 393: /* bufsize_opt ::= */ yytestcase(yyruleno==393); +{ yymsp[1].minor.yy820 = 0; } + break; + case 172: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 394: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==394); +{ yymsp[-1].minor.yy820 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + break; + case 174: /* start_opt ::= START WITH NK_INTEGER */ + case 178: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==178); +{ yymsp[-2].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + break; + case 175: /* start_opt ::= START WITH NK_STRING */ + case 179: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==179); +{ yymsp[-2].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 176: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 180: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==180); +{ yymsp[-3].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 181: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 183: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==183); +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy209, yymsp[-5].minor.yy416, yymsp[-3].minor.yy316, yymsp[-1].minor.yy316, yymsp[0].minor.yy416); } + break; + case 182: /* cmd ::= CREATE TABLE multi_create_clause */ +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy316); } + break; + case 184: /* cmd ::= DROP TABLE multi_drop_clause */ +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy316); } + break; + case 185: /* cmd ::= DROP STABLE exists_opt full_table_name */ +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } + break; + case 186: /* cmd ::= ALTER TABLE alter_table_clause */ + case 445: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==445); + case 446: /* cmd ::= insert_query */ yytestcase(yyruleno==446); +{ pCxt->pRootNode = yymsp[0].minor.yy416; } + break; + case 187: /* cmd ::= ALTER STABLE alter_table_clause */ +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy416); } + break; + case 188: /* alter_table_clause ::= full_table_name alter_table_options */ +{ yylhsminor.yy416 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; + break; + case 189: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ +{ yylhsminor.yy416 = createAlterTableAddModifyColOptions2(pCxt, yymsp[-5].minor.yy416, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-2].minor.yy1109, yymsp[-1].minor.yy952, yymsp[0].minor.yy416); } + yymsp[-5].minor.yy416 = yylhsminor.yy416; + break; + case 190: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ +{ yylhsminor.yy416 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy416, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy1109); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; + break; + case 191: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ +{ yylhsminor.yy416 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; + break; + case 192: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ +{ yylhsminor.yy416 = createAlterTableAddModifyColOptions(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy416); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; + break; + case 193: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ +{ yylhsminor.yy416 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; + break; + case 194: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ +{ yylhsminor.yy416 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; + break; + case 195: /* alter_table_clause ::= full_table_name DROP TAG column_name */ +{ yylhsminor.yy416 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy416, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy1109); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 192: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy479, yymsp[0].minor.yy874); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; + case 196: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ +{ yylhsminor.yy416 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; break; - case 193: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; + case 197: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ +{ yylhsminor.yy416 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; break; - case 194: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ -{ yylhsminor.yy452 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy452, &yymsp[-2].minor.yy479, yymsp[0].minor.yy452); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; + case 198: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ +{ yylhsminor.yy416 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy416, &yymsp[-2].minor.yy1109, yymsp[0].minor.yy416); } + yymsp[-5].minor.yy416 = yylhsminor.yy416; break; - case 196: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 588: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==588); -{ yylhsminor.yy34 = addNodeToList(pCxt, yymsp[-1].minor.yy34, yymsp[0].minor.yy452); } - yymsp[-1].minor.yy34 = yylhsminor.yy34; + case 200: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 593: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==593); +{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-1].minor.yy316, yymsp[0].minor.yy416); } + yymsp[-1].minor.yy316 = yylhsminor.yy316; break; - case 197: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ -{ yylhsminor.yy452 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy437, yymsp[-8].minor.yy452, yymsp[-6].minor.yy452, yymsp[-5].minor.yy34, yymsp[-2].minor.yy34, yymsp[0].minor.yy452); } - yymsp[-9].minor.yy452 = yylhsminor.yy452; + case 201: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ +{ yylhsminor.yy416 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy209, yymsp[-8].minor.yy416, yymsp[-6].minor.yy416, yymsp[-5].minor.yy316, yymsp[-2].minor.yy316, yymsp[0].minor.yy416); } + yymsp[-9].minor.yy416 = yylhsminor.yy416; break; - case 200: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy452 = createDropTableClause(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy452); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 204: /* drop_table_clause ::= exists_opt full_table_name */ +{ yylhsminor.yy416 = createDropTableClause(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 202: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 403: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==403); -{ yymsp[-2].minor.yy34 = yymsp[-1].minor.yy34; } + case 206: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 408: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==408); +{ yymsp[-2].minor.yy316 = yymsp[-1].minor.yy316; } break; - case 203: /* full_table_name ::= table_name */ - case 344: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==344); -{ yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy479, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 207: /* full_table_name ::= table_name */ + case 349: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==349); +{ yylhsminor.yy416 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy1109, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 204: /* full_table_name ::= db_name NK_DOT table_name */ - case 345: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==345); -{ yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479, NULL); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 208: /* full_table_name ::= db_name NK_DOT table_name */ + case 350: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==350); +{ yylhsminor.yy416 = createRealTableNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109, NULL); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 207: /* tag_def ::= column_name type_name */ -{ yylhsminor.yy452 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy479, yymsp[0].minor.yy874, NULL); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 211: /* tag_def ::= column_name type_name */ +{ yylhsminor.yy416 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952, NULL); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 210: /* column_def ::= column_name type_name column_options */ -{ yylhsminor.yy452 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy479, yymsp[-1].minor.yy874, yymsp[0].minor.yy452); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 214: /* column_def ::= column_name type_name column_options */ +{ yylhsminor.yy416 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy1109, yymsp[-1].minor.yy952, yymsp[0].minor.yy416); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 211: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_BOOL); } + case 215: /* type_name ::= BOOL */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 212: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_TINYINT); } + case 216: /* type_name ::= TINYINT */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 213: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_SMALLINT); } + case 217: /* type_name ::= SMALLINT */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 214: /* type_name ::= INT */ - case 215: /* type_name ::= INTEGER */ yytestcase(yyruleno==215); -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_INT); } + case 218: /* type_name ::= INT */ + case 219: /* type_name ::= INTEGER */ yytestcase(yyruleno==219); +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 216: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_BIGINT); } + case 220: /* type_name ::= BIGINT */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 217: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_FLOAT); } + case 221: /* type_name ::= FLOAT */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 218: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_DOUBLE); } + case 222: /* type_name ::= DOUBLE */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 219: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } + case 223: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 220: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } + case 224: /* type_name ::= TIMESTAMP */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 221: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } + case 225: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 222: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy874 = createDataType(TSDB_DATA_TYPE_UTINYINT); } + case 226: /* type_name ::= TINYINT UNSIGNED */ +{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 223: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy874 = createDataType(TSDB_DATA_TYPE_USMALLINT); } + case 227: /* type_name ::= SMALLINT UNSIGNED */ +{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 224: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy874 = createDataType(TSDB_DATA_TYPE_UINT); } + case 228: /* type_name ::= INT UNSIGNED */ +{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 225: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy874 = createDataType(TSDB_DATA_TYPE_UBIGINT); } + case 229: /* type_name ::= BIGINT UNSIGNED */ +{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 226: /* type_name ::= JSON */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_JSON); } + case 230: /* type_name ::= JSON */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 227: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } + case 231: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 228: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } + case 232: /* type_name ::= MEDIUMBLOB */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 229: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_BLOB); } + case 233: /* type_name ::= BLOB */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 230: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } + case 234: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 231: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } + case 235: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; - case 232: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy874 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 236: /* type_name ::= DECIMAL */ +{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 233: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy874 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 237: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 234: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy874 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 238: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 235: /* type_name_default_len ::= BINARY */ -{ yymsp[0].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } + case 239: /* type_name_default_len ::= BINARY */ +{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } break; - case 236: /* type_name_default_len ::= NCHAR */ -{ yymsp[0].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } + case 240: /* type_name_default_len ::= NCHAR */ +{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } break; - case 237: /* type_name_default_len ::= VARCHAR */ -{ yymsp[0].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } + case 241: /* type_name_default_len ::= VARCHAR */ +{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } break; - case 238: /* type_name_default_len ::= VARBINARY */ -{ yymsp[0].minor.yy874 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } + case 242: /* type_name_default_len ::= VARBINARY */ +{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } break; - case 241: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - case 411: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==411); -{ yymsp[-3].minor.yy34 = yymsp[-1].minor.yy34; } + case 245: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + case 416: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==416); +{ yymsp[-3].minor.yy316 = yymsp[-1].minor.yy316; } break; - case 242: /* table_options ::= */ -{ yymsp[1].minor.yy452 = createDefaultTableOptions(pCxt); } + case 246: /* table_options ::= */ +{ yymsp[1].minor.yy416 = createDefaultTableOptions(pCxt); } break; - case 243: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 247: /* table_options ::= table_options COMMENT NK_STRING */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 244: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy34); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 248: /* table_options ::= table_options MAX_DELAY duration_list */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy316); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 245: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy34); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 249: /* table_options ::= table_options WATERMARK duration_list */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy316); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 246: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-4].minor.yy452, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy34); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; + case 250: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-4].minor.yy416, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy316); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; break; - case 247: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 251: /* table_options ::= table_options TTL NK_INTEGER */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 248: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-4].minor.yy452, TABLE_OPTION_SMA, yymsp[-1].minor.yy34); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; + case 252: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-4].minor.yy416, TABLE_OPTION_SMA, yymsp[-1].minor.yy316); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; break; - case 249: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy34); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 253: /* table_options ::= table_options DELETE_MARK duration_list */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy316); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 250: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy452 = createAlterTableOptions(pCxt); yylhsminor.yy452 = setTableOption(pCxt, yylhsminor.yy452, yymsp[0].minor.yy455.type, &yymsp[0].minor.yy455.val); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 254: /* alter_table_options ::= alter_table_option */ +{ yylhsminor.yy416 = createAlterTableOptions(pCxt); yylhsminor.yy416 = setTableOption(pCxt, yylhsminor.yy416, yymsp[0].minor.yy101.type, &yymsp[0].minor.yy101.val); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 251: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy455.type, &yymsp[0].minor.yy455.val); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 255: /* alter_table_options ::= alter_table_options alter_table_option */ +{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy101.type, &yymsp[0].minor.yy101.val); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 252: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy455.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 256: /* alter_table_option ::= COMMENT NK_STRING */ +{ yymsp[-1].minor.yy101.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 253: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy455.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy455.val = yymsp[0].minor.yy0; } + case 257: /* alter_table_option ::= TTL NK_INTEGER */ +{ yymsp[-1].minor.yy101.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } break; - case 254: /* duration_list ::= duration_literal */ - case 540: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==540); -{ yylhsminor.yy34 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } - yymsp[0].minor.yy34 = yylhsminor.yy34; + case 258: /* duration_list ::= duration_literal */ + case 545: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==545); +{ yylhsminor.yy316 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } + yymsp[0].minor.yy316 = yylhsminor.yy316; break; - case 255: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 541: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==541); -{ yylhsminor.yy34 = addNodeToList(pCxt, yymsp[-2].minor.yy34, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } - yymsp[-2].minor.yy34 = yylhsminor.yy34; + case 259: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 546: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==546); +{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } + yymsp[-2].minor.yy316 = yylhsminor.yy316; break; - case 258: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[0].minor.yy479, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 262: /* rollup_func_name ::= function_name */ +{ yylhsminor.yy416 = createFunctionNode(pCxt, &yymsp[0].minor.yy1109, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 259: /* rollup_func_name ::= FIRST */ - case 260: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==260); - case 333: /* tag_item ::= QTAGS */ yytestcase(yyruleno==333); -{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 263: /* rollup_func_name ::= FIRST */ + case 264: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==264); + case 338: /* tag_item ::= QTAGS */ yytestcase(yyruleno==338); +{ yylhsminor.yy416 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 263: /* col_name ::= column_name */ - case 334: /* tag_item ::= column_name */ yytestcase(yyruleno==334); -{ yylhsminor.yy452 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy479); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 267: /* col_name ::= column_name */ + case 339: /* tag_item ::= column_name */ yytestcase(yyruleno==339); +{ yylhsminor.yy416 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy1109); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 264: /* cmd ::= SHOW DNODES */ + case 268: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 265: /* cmd ::= SHOW USERS */ + case 269: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 266: /* cmd ::= SHOW USER PRIVILEGES */ + case 270: /* cmd ::= SHOW USERS FULL */ +{ pCxt->pRootNode = createShowStmtWithFull(pCxt, QUERY_NODE_SHOW_USERS_FULL_STMT); } + break; + case 271: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 267: /* cmd ::= SHOW db_kind_opt DATABASES */ + case 272: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy39); + setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy681); } break; - case 268: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + case 273: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy397, yymsp[0].minor.yy452, OP_TYPE_LIKE); + pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy925, yymsp[0].minor.yy416, OP_TYPE_LIKE); } break; - case 269: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, OP_TYPE_LIKE); } + case 274: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, OP_TYPE_LIKE); } break; - case 270: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy452, NULL, OP_TYPE_LIKE); } + case 275: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy416, NULL, OP_TYPE_LIKE); } break; - case 271: /* cmd ::= SHOW MNODES */ + case 276: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 272: /* cmd ::= SHOW QNODES */ + case 277: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 273: /* cmd ::= SHOW ARBGROUPS */ + case 278: /* cmd ::= SHOW ARBGROUPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } break; - case 274: /* cmd ::= SHOW FUNCTIONS */ + case 279: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 275: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy452, yymsp[-1].minor.yy452, OP_TYPE_EQUAL); } + case 280: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy416, yymsp[-1].minor.yy416, OP_TYPE_EQUAL); } break; - case 276: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy479), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy479), OP_TYPE_EQUAL); } + case 281: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1109), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109), OP_TYPE_EQUAL); } break; - case 277: /* cmd ::= SHOW STREAMS */ + case 282: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 278: /* cmd ::= SHOW ACCOUNTS */ + case 283: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 279: /* cmd ::= SHOW APPS */ + case 284: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 280: /* cmd ::= SHOW CONNECTIONS */ + case 285: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 281: /* cmd ::= SHOW LICENCES */ - case 282: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==282); + case 286: /* cmd ::= SHOW LICENCES */ + case 287: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==287); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 283: /* cmd ::= SHOW GRANTS FULL */ + case 288: /* cmd ::= SHOW GRANTS FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } break; - case 284: /* cmd ::= SHOW GRANTS LOGS */ + case 289: /* cmd ::= SHOW GRANTS LOGS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } break; - case 285: /* cmd ::= SHOW CLUSTER MACHINES */ + case 290: /* cmd ::= SHOW CLUSTER MACHINES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } break; - case 286: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy479); } + case 291: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } break; - case 287: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy452); } + case 292: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy416); } break; - case 288: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 293: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, -yymsp[0].minor.yy452); } +yymsp[0].minor.yy416); } break; - case 289: /* cmd ::= SHOW ENCRYPTIONS */ + case 294: /* cmd ::= SHOW ENCRYPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ENCRYPTIONS_STMT); } break; - case 290: /* cmd ::= SHOW QUERIES */ + case 295: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 291: /* cmd ::= SHOW SCORES */ + case 296: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 292: /* cmd ::= SHOW TOPICS */ + case 297: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 293: /* cmd ::= SHOW VARIABLES */ - case 294: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==294); + case 298: /* cmd ::= SHOW VARIABLES */ + case 299: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==299); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 295: /* cmd ::= SHOW LOCAL VARIABLES */ + case 300: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 296: /* 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.yy452); } + case 301: /* 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.yy416); } break; - case 297: /* cmd ::= SHOW BNODES */ + case 302: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 298: /* cmd ::= SHOW SNODES */ + case 303: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 299: /* cmd ::= SHOW CLUSTER */ + case 304: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 300: /* cmd ::= SHOW TRANSACTIONS */ + case 305: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 301: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy452); } + case 306: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy416); } break; - case 302: /* cmd ::= SHOW CONSUMERS */ + case 307: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 303: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 308: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 304: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy452, yymsp[-1].minor.yy452, OP_TYPE_EQUAL); } + case 309: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy416, yymsp[-1].minor.yy416, OP_TYPE_EQUAL); } break; - case 305: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy479), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy479), OP_TYPE_EQUAL); } + case 310: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1109), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109), OP_TYPE_EQUAL); } break; - case 306: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452, yymsp[-3].minor.yy34); } + case 311: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy416, yymsp[-3].minor.yy316); } break; - case 307: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy479), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy479), yymsp[-4].minor.yy34); } + case 312: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1109), yymsp[-4].minor.yy316); } break; - case 308: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + case 313: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 309: /* cmd ::= SHOW VNODES */ + case 314: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } break; - case 310: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy452, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + case 315: /* cmd ::= SHOW db_name_cond_opt ALIVE */ +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy416, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 311: /* cmd ::= SHOW CLUSTER ALIVE */ + case 316: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 312: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, OP_TYPE_LIKE); } + case 317: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, OP_TYPE_LIKE); } break; - case 313: /* cmd ::= SHOW CREATE VIEW full_table_name */ -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy452); } + case 318: /* cmd ::= SHOW CREATE VIEW full_table_name */ +{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy416); } break; - case 314: /* cmd ::= SHOW COMPACTS */ + case 319: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } break; - case 315: /* cmd ::= SHOW COMPACT NK_INTEGER */ + case 320: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 316: /* table_kind_db_name_cond_opt ::= */ -{ yymsp[1].minor.yy397.kind = SHOW_KIND_ALL; yymsp[1].minor.yy397.dbName = nil_token; } + case 321: /* table_kind_db_name_cond_opt ::= */ +{ yymsp[1].minor.yy925.kind = SHOW_KIND_ALL; yymsp[1].minor.yy925.dbName = nil_token; } break; - case 317: /* table_kind_db_name_cond_opt ::= table_kind */ -{ yylhsminor.yy397.kind = yymsp[0].minor.yy39; yylhsminor.yy397.dbName = nil_token; } - yymsp[0].minor.yy397 = yylhsminor.yy397; + case 322: /* table_kind_db_name_cond_opt ::= table_kind */ +{ yylhsminor.yy925.kind = yymsp[0].minor.yy681; yylhsminor.yy925.dbName = nil_token; } + yymsp[0].minor.yy925 = yylhsminor.yy925; break; - case 318: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy397.kind = SHOW_KIND_ALL; yylhsminor.yy397.dbName = yymsp[-1].minor.yy479; } - yymsp[-1].minor.yy397 = yylhsminor.yy397; + case 323: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy925.kind = SHOW_KIND_ALL; yylhsminor.yy925.dbName = yymsp[-1].minor.yy1109; } + yymsp[-1].minor.yy925 = yylhsminor.yy925; break; - case 319: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -{ yylhsminor.yy397.kind = yymsp[-2].minor.yy39; yylhsminor.yy397.dbName = yymsp[-1].minor.yy479; } - yymsp[-2].minor.yy397 = yylhsminor.yy397; + case 324: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ +{ yylhsminor.yy925.kind = yymsp[-2].minor.yy681; yylhsminor.yy925.dbName = yymsp[-1].minor.yy1109; } + yymsp[-2].minor.yy925 = yylhsminor.yy925; break; - case 320: /* table_kind ::= NORMAL */ -{ yymsp[0].minor.yy39 = SHOW_KIND_TABLES_NORMAL; } + case 325: /* table_kind ::= NORMAL */ +{ yymsp[0].minor.yy681 = SHOW_KIND_TABLES_NORMAL; } break; - case 321: /* table_kind ::= CHILD */ -{ yymsp[0].minor.yy39 = SHOW_KIND_TABLES_CHILD; } + case 326: /* table_kind ::= CHILD */ +{ yymsp[0].minor.yy681 = SHOW_KIND_TABLES_CHILD; } break; - case 322: /* db_name_cond_opt ::= */ - case 327: /* from_db_opt ::= */ yytestcase(yyruleno==327); -{ yymsp[1].minor.yy452 = createDefaultDatabaseCondValue(pCxt); } + case 327: /* db_name_cond_opt ::= */ + case 332: /* from_db_opt ::= */ yytestcase(yyruleno==332); +{ yymsp[1].minor.yy416 = createDefaultDatabaseCondValue(pCxt); } break; - case 323: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy452 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 328: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy416 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy1109); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 325: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 330: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 326: /* table_name_cond ::= table_name */ -{ yylhsminor.yy452 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy479); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 331: /* table_name_cond ::= table_name */ +{ yylhsminor.yy416 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 328: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy452 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy479); } + case 333: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy416 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109); } break; - case 332: /* tag_item ::= TBNAME */ -{ yylhsminor.yy452 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 337: /* tag_item ::= TBNAME */ +{ yylhsminor.yy416 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 335: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy452 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy479), &yymsp[0].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 340: /* tag_item ::= column_name column_alias */ +{ yylhsminor.yy416 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy1109), &yymsp[0].minor.yy1109); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 336: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy452 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy479), &yymsp[0].minor.yy479); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 341: /* tag_item ::= column_name AS column_alias */ +{ yylhsminor.yy416 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy1109), &yymsp[0].minor.yy1109); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 337: /* db_kind_opt ::= */ -{ yymsp[1].minor.yy39 = SHOW_KIND_ALL; } + case 342: /* db_kind_opt ::= */ +{ yymsp[1].minor.yy681 = SHOW_KIND_ALL; } break; - case 338: /* db_kind_opt ::= USER */ -{ yymsp[0].minor.yy39 = SHOW_KIND_DATABASES_USER; } + case 343: /* db_kind_opt ::= USER */ +{ yymsp[0].minor.yy681 = SHOW_KIND_DATABASES_USER; } break; - case 339: /* db_kind_opt ::= SYSTEM */ -{ yymsp[0].minor.yy39 = SHOW_KIND_DATABASES_SYSTEM; } + case 344: /* db_kind_opt ::= SYSTEM */ +{ yymsp[0].minor.yy681 = SHOW_KIND_DATABASES_SYSTEM; } break; - case 340: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ -{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy437, &yymsp[-7].minor.yy479, yymsp[-4].minor.yy452, yymsp[-5].minor.yy452, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 345: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ +{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy209, &yymsp[-7].minor.yy1109, yymsp[-4].minor.yy416, yymsp[-5].minor.yy416, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } break; - case 341: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ -{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-7].minor.yy437, &yymsp[-6].minor.yy479, NULL, yymsp[-4].minor.yy452, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 346: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ +{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-7].minor.yy209, &yymsp[-6].minor.yy1109, NULL, yymsp[-4].minor.yy416, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } break; - case 342: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ -{ pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy452); } + case 347: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ +{ pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } break; - case 343: /* cmd ::= SHOW db_name_cond_opt TSMAS */ -{ pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy452); } + case 348: /* cmd ::= SHOW db_name_cond_opt TSMAS */ +{ pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy416); } break; - case 346: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ -{ yymsp[-3].minor.yy452 = createTSMAOptions(pCxt, yymsp[-1].minor.yy34); } + case 351: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ +{ yymsp[-3].minor.yy416 = createTSMAOptions(pCxt, yymsp[-1].minor.yy316); } break; - case 347: /* 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.yy452, yymsp[-1].minor.yy452, NULL, yymsp[0].minor.yy452); } + case 352: /* 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.yy209, yymsp[-3].minor.yy416, yymsp[-1].minor.yy416, NULL, yymsp[0].minor.yy416); } break; - case 348: /* 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.yy452, yymsp[-3].minor.yy452, yymsp[-1].minor.yy34, NULL); } + case 353: /* 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.yy209, yymsp[-5].minor.yy416, yymsp[-3].minor.yy416, yymsp[-1].minor.yy316, NULL); } break; - case 349: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy452); } + case 354: /* cmd ::= DROP INDEX exists_opt full_index_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } break; - case 350: /* full_index_name ::= index_name */ -{ yylhsminor.yy452 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy479); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 355: /* full_index_name ::= index_name */ +{ yylhsminor.yy416 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy1109); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 351: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy452 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 356: /* full_index_name ::= db_name NK_DOT index_name */ +{ yylhsminor.yy416 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 352: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy452 = createIndexOption(pCxt, yymsp[-7].minor.yy34, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 357: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-9].minor.yy416 = createIndexOption(pCxt, yymsp[-7].minor.yy316, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), NULL, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } break; - case 353: /* 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.yy452 = createIndexOption(pCxt, yymsp[-9].minor.yy34, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 358: /* 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.yy416 = createIndexOption(pCxt, yymsp[-9].minor.yy316, releaseRawExprNode(pCxt, yymsp[-5].minor.yy416), releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } break; - case 356: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[-3].minor.yy479, yymsp[-1].minor.yy34); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 361: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy416 = createFunctionNode(pCxt, &yymsp[-3].minor.yy1109, yymsp[-1].minor.yy316); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 357: /* sma_func_name ::= function_name */ - case 631: /* alias_opt ::= table_alias */ yytestcase(yyruleno==631); -{ yylhsminor.yy479 = yymsp[0].minor.yy479; } - yymsp[0].minor.yy479 = yylhsminor.yy479; + case 362: /* sma_func_name ::= function_name */ + case 636: /* alias_opt ::= table_alias */ yytestcase(yyruleno==636); +{ yylhsminor.yy1109 = yymsp[0].minor.yy1109; } + yymsp[0].minor.yy1109 = yylhsminor.yy1109; break; - case 362: /* sma_stream_opt ::= */ - case 412: /* stream_options ::= */ yytestcase(yyruleno==412); -{ yymsp[1].minor.yy452 = createStreamOptions(pCxt); } + case 367: /* sma_stream_opt ::= */ + case 417: /* stream_options ::= */ yytestcase(yyruleno==417); +{ yymsp[1].minor.yy416 = createStreamOptions(pCxt); } break; - case 363: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy452)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 368: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy416)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); yylhsminor.yy416 = yymsp[-2].minor.yy416; } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 364: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy452)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 369: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy416)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); yylhsminor.yy416 = yymsp[-2].minor.yy416; } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 365: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy452)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 370: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy416)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); yylhsminor.yy416 = yymsp[-2].minor.yy416; } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 366: /* with_meta ::= AS */ -{ yymsp[0].minor.yy100 = 0; } + case 371: /* with_meta ::= AS */ +{ yymsp[0].minor.yy820 = 0; } break; - case 367: /* with_meta ::= WITH META AS */ -{ yymsp[-2].minor.yy100 = 1; } + case 372: /* with_meta ::= WITH META AS */ +{ yymsp[-2].minor.yy820 = 1; } break; - case 368: /* with_meta ::= ONLY META AS */ -{ yymsp[-2].minor.yy100 = 2; } + case 373: /* with_meta ::= ONLY META AS */ +{ yymsp[-2].minor.yy820 = 2; } break; - case 369: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy437, &yymsp[-2].minor.yy479, yymsp[0].minor.yy452); } + case 374: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy209, &yymsp[-2].minor.yy1109, yymsp[0].minor.yy416); } break; - case 370: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy437, &yymsp[-3].minor.yy479, &yymsp[0].minor.yy479, yymsp[-2].minor.yy100); } + case 375: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy209, &yymsp[-3].minor.yy1109, &yymsp[0].minor.yy1109, yymsp[-2].minor.yy820); } break; - case 371: /* 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.yy479, yymsp[-1].minor.yy452, yymsp[-3].minor.yy100, yymsp[0].minor.yy452); } + case 376: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy209, &yymsp[-4].minor.yy1109, yymsp[-1].minor.yy416, yymsp[-3].minor.yy820, yymsp[0].minor.yy416); } break; - case 372: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy479); } + case 377: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } break; - case 373: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy437, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479); } + case 378: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy209, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109); } break; - case 374: /* cmd ::= DESC full_table_name */ - case 375: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==375); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy452); } + case 379: /* cmd ::= DESC full_table_name */ + case 380: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==380); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy416); } break; - case 376: /* cmd ::= RESET QUERY CACHE */ + case 381: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 377: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 378: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==378); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy437, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 382: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 383: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==383); +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy209, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } break; - case 381: /* explain_options ::= */ -{ yymsp[1].minor.yy452 = createDefaultExplainOptions(pCxt); } + case 386: /* explain_options ::= */ +{ yymsp[1].minor.yy416 = createDefaultExplainOptions(pCxt); } break; - case 382: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy452 = setExplainVerbose(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 387: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy416 = setExplainVerbose(pCxt, yymsp[-2].minor.yy416, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 383: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy452 = setExplainRatio(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 388: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy416 = setExplainRatio(pCxt, yymsp[-2].minor.yy416, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 384: /* 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.yy479, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy874, yymsp[-1].minor.yy100, &yymsp[0].minor.yy479, yymsp[-10].minor.yy437); } + case 389: /* 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.yy209, yymsp[-9].minor.yy209, &yymsp[-6].minor.yy1109, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy952, yymsp[-1].minor.yy820, &yymsp[0].minor.yy1109, yymsp[-10].minor.yy209); } break; - case 385: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy479); } + case 390: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } break; - case 390: /* language_opt ::= */ - case 435: /* on_vgroup_id ::= */ yytestcase(yyruleno==435); -{ yymsp[1].minor.yy479 = nil_token; } + case 395: /* language_opt ::= */ + case 440: /* on_vgroup_id ::= */ yytestcase(yyruleno==440); +{ yymsp[1].minor.yy1109 = nil_token; } break; - case 391: /* language_opt ::= LANGUAGE NK_STRING */ - case 436: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==436); -{ yymsp[-1].minor.yy479 = yymsp[0].minor.yy0; } + case 396: /* language_opt ::= LANGUAGE NK_STRING */ + case 441: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==441); +{ yymsp[-1].minor.yy1109 = yymsp[0].minor.yy0; } break; - case 394: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy437, yymsp[-2].minor.yy452, &yymsp[-1].minor.yy0, yymsp[0].minor.yy452); } + case 399: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy209, yymsp[-2].minor.yy416, &yymsp[-1].minor.yy0, yymsp[0].minor.yy416); } break; - case 395: /* cmd ::= DROP VIEW exists_opt full_view_name */ -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy437, yymsp[0].minor.yy452); } + case 400: /* cmd ::= DROP VIEW exists_opt full_view_name */ +{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } break; - case 396: /* full_view_name ::= view_name */ -{ yylhsminor.yy452 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy479); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 401: /* full_view_name ::= view_name */ +{ yylhsminor.yy416 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy1109); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 397: /* full_view_name ::= db_name NK_DOT view_name */ -{ yylhsminor.yy452 = createViewNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 402: /* full_view_name ::= db_name NK_DOT view_name */ +{ yylhsminor.yy416 = createViewNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 398: /* 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.yy479, yymsp[-5].minor.yy452, yymsp[-7].minor.yy452, yymsp[-3].minor.yy34, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, yymsp[-4].minor.yy34); } + case 403: /* 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.yy209, &yymsp[-8].minor.yy1109, yymsp[-5].minor.yy416, yymsp[-7].minor.yy416, yymsp[-3].minor.yy316, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, yymsp[-4].minor.yy316); } break; - case 399: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy479); } + case 404: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } break; - case 400: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy437, &yymsp[0].minor.yy479); } + case 405: /* cmd ::= PAUSE STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } break; - case 401: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy437, yymsp[-1].minor.yy437, &yymsp[0].minor.yy479); } + case 406: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy209, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } break; - case 406: /* column_stream_def ::= column_name stream_col_options */ -{ yylhsminor.yy452 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy479, createDataType(TSDB_DATA_TYPE_NULL), yymsp[0].minor.yy452); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 411: /* column_stream_def ::= column_name stream_col_options */ +{ yylhsminor.yy416 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy1109, createDataType(TSDB_DATA_TYPE_NULL), yymsp[0].minor.yy416); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 407: /* stream_col_options ::= */ - case 744: /* column_options ::= */ yytestcase(yyruleno==744); -{ yymsp[1].minor.yy452 = createDefaultColumnOptions(pCxt); } + case 412: /* stream_col_options ::= */ + case 749: /* column_options ::= */ yytestcase(yyruleno==749); +{ yymsp[1].minor.yy416 = createDefaultColumnOptions(pCxt); } break; - case 408: /* stream_col_options ::= stream_col_options PRIMARY KEY */ - case 745: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==745); -{ yylhsminor.yy452 = setColumnOptions(pCxt, yymsp[-2].minor.yy452, COLUMN_OPTION_PRIMARYKEY, NULL); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 413: /* stream_col_options ::= stream_col_options PRIMARY KEY */ + case 750: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==750); +{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_PRIMARYKEY, NULL); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 413: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 414: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==414); -{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 418: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 419: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==419); +{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 415: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 420: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-3].minor.yy416, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 416: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 421: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 417: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 422: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-3].minor.yy416, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 418: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 423: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 419: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 424: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 420: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 425: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-3].minor.yy416, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 422: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 688: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==688); - case 712: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==712); -{ yymsp[-3].minor.yy452 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy452); } + case 427: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 693: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==693); + case 717: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==717); +{ yymsp[-3].minor.yy416 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy416); } break; - case 425: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 430: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 426: /* cmd ::= KILL QUERY NK_STRING */ + case 431: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 427: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 432: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 428: /* cmd ::= KILL COMPACT NK_INTEGER */ + case 433: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } break; - case 429: /* cmd ::= BALANCE VGROUP */ + case 434: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 430: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy479); } + case 435: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ +{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy1109); } break; - case 431: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ -{ pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy479); } + case 436: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ +{ pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy1109); } break; - case 432: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 437: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 433: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy34); } + case 438: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy316); } break; - case 434: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 439: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 437: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy34 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 442: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy316 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 439: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 444: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } break; - case 442: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy452 = createInsertStmt(pCxt, yymsp[-4].minor.yy452, yymsp[-2].minor.yy34, yymsp[0].minor.yy452); } + case 447: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ yymsp[-6].minor.yy416 = createInsertStmt(pCxt, yymsp[-4].minor.yy416, yymsp[-2].minor.yy316, yymsp[0].minor.yy416); } break; - case 443: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy452 = createInsertStmt(pCxt, yymsp[-1].minor.yy452, NULL, yymsp[0].minor.yy452); } + case 448: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +{ yymsp[-3].minor.yy416 = createInsertStmt(pCxt, yymsp[-1].minor.yy416, NULL, yymsp[0].minor.yy416); } break; - case 444: /* tags_literal ::= NK_INTEGER */ - case 456: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==456); - case 465: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==465); -{ yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 449: /* tags_literal ::= NK_INTEGER */ + case 461: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==461); + case 470: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==470); +{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 445: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - case 446: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==446); - case 457: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==457); - case 458: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==458); - case 466: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==466); - case 467: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==467); - case 475: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==475); - case 476: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==476); + case 450: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 451: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==451); + case 462: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==462); + case 463: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==463); + case 471: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==471); + case 472: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==472); + case 480: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==480); + case 481: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==481); { SToken l = yymsp[-2].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); l.n = (r.z + r.n) - l.z; - yylhsminor.yy452 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy452); + yylhsminor.yy416 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy416); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 447: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 450: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==450); - case 459: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==459); - case 462: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==462); - case 468: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==468); - case 471: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==471); + case 452: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 455: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==455); + case 464: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==464); + case 467: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==467); + case 473: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==473); + case 476: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==476); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); + yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 448: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - case 449: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==449); - case 451: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==451); - case 452: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==452); - case 460: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==460); - case 461: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==461); - case 463: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==463); - case 464: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==464); - case 469: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==469); - case 470: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==470); - case 472: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==472); - case 473: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==473); + case 453: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 454: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==454); + case 456: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==456); + case 457: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==457); + case 465: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==465); + case 466: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==466); + case 468: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==468); + case 469: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==469); + case 474: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==474); + case 475: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==475); + case 477: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==477); + case 478: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==478); { SToken l = yymsp[-3].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); l.n = (r.z + r.n) - l.z; - yylhsminor.yy452 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy452); + yylhsminor.yy416 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy416); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 453: /* tags_literal ::= NK_FLOAT */ -{ yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 458: /* tags_literal ::= NK_FLOAT */ +{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 454: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 455: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==455); + case 459: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 460: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==460); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); + yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 474: /* tags_literal ::= NK_STRING */ -{ yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 479: /* tags_literal ::= NK_STRING */ +{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 477: /* tags_literal ::= NK_BOOL */ -{ yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 482: /* tags_literal ::= NK_BOOL */ +{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 478: /* tags_literal ::= NULL */ -{ yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 483: /* tags_literal ::= NULL */ +{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 479: /* tags_literal ::= literal_func */ -{ yylhsminor.yy452 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy452); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 484: /* tags_literal ::= literal_func */ +{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy416); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 480: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 481: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==481); + case 485: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 486: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==486); { - SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); + SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); l.n = (r.z + r.n) - l.z; - yylhsminor.yy452 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); + yylhsminor.yy416 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy416, yymsp[0].minor.yy416); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 484: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 489: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 485: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 490: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 486: /* literal ::= NK_STRING */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 491: /* literal ::= NK_STRING */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 487: /* literal ::= NK_BOOL */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 492: /* literal ::= NK_BOOL */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 488: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 493: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 489: /* literal ::= duration_literal */ - case 499: /* signed_literal ::= signed */ yytestcase(yyruleno==499); - case 523: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==523); - case 524: /* expression ::= literal */ yytestcase(yyruleno==524); - case 526: /* expression ::= column_reference */ yytestcase(yyruleno==526); - case 527: /* expression ::= function_expression */ yytestcase(yyruleno==527); - case 528: /* expression ::= case_when_expression */ yytestcase(yyruleno==528); - case 562: /* function_expression ::= literal_func */ yytestcase(yyruleno==562); - case 612: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==612); - case 616: /* boolean_primary ::= predicate */ yytestcase(yyruleno==616); - case 618: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==618); - case 619: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==619); - case 622: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==622); - case 624: /* table_reference ::= table_primary */ yytestcase(yyruleno==624); - case 625: /* table_reference ::= joined_table */ yytestcase(yyruleno==625); - case 629: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==629); - case 714: /* query_simple ::= query_specification */ yytestcase(yyruleno==714); - case 715: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==715); - case 718: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==718); - case 720: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==720); -{ yylhsminor.yy452 = yymsp[0].minor.yy452; } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 494: /* literal ::= duration_literal */ + case 504: /* signed_literal ::= signed */ yytestcase(yyruleno==504); + case 528: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==528); + case 529: /* expression ::= literal */ yytestcase(yyruleno==529); + case 531: /* expression ::= column_reference */ yytestcase(yyruleno==531); + case 532: /* expression ::= function_expression */ yytestcase(yyruleno==532); + case 533: /* expression ::= case_when_expression */ yytestcase(yyruleno==533); + case 567: /* function_expression ::= literal_func */ yytestcase(yyruleno==567); + case 617: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==617); + case 621: /* boolean_primary ::= predicate */ yytestcase(yyruleno==621); + case 623: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==623); + case 624: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==624); + case 627: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==627); + case 629: /* table_reference ::= table_primary */ yytestcase(yyruleno==629); + case 630: /* table_reference ::= joined_table */ yytestcase(yyruleno==630); + case 634: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==634); + case 719: /* query_simple ::= query_specification */ yytestcase(yyruleno==719); + case 720: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==720); + case 723: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==723); + case 725: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==725); +{ yylhsminor.yy416 = yymsp[0].minor.yy416; } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 490: /* literal ::= NULL */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 495: /* literal ::= NULL */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 491: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 496: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 492: /* duration_literal ::= NK_VARIABLE */ - case 689: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==689); - case 690: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==690); - case 691: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==691); -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 497: /* duration_literal ::= NK_VARIABLE */ + case 694: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==694); + case 695: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==695); + case 696: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==696); +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 493: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 498: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 494: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 499: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 495: /* signed ::= NK_MINUS NK_INTEGER */ + case 500: /* 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.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 496: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 501: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 497: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 502: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 498: /* signed ::= NK_MINUS NK_FLOAT */ + case 503: /* 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.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 500: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 505: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 501: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 506: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 502: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 507: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 503: /* signed_literal ::= duration_literal */ - case 505: /* signed_literal ::= literal_func */ yytestcase(yyruleno==505); - case 583: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==583); - case 666: /* select_item ::= common_expression */ yytestcase(yyruleno==666); - case 676: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==676); - case 719: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==719); - case 721: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==721); - case 734: /* search_condition ::= common_expression */ yytestcase(yyruleno==734); -{ yylhsminor.yy452 = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 508: /* signed_literal ::= duration_literal */ + case 510: /* signed_literal ::= literal_func */ yytestcase(yyruleno==510); + case 588: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==588); + case 671: /* select_item ::= common_expression */ yytestcase(yyruleno==671); + case 681: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==681); + case 724: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==724); + case 726: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==726); + case 739: /* search_condition ::= common_expression */ yytestcase(yyruleno==739); +{ yylhsminor.yy416 = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 504: /* signed_literal ::= NULL */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 509: /* signed_literal ::= NULL */ +{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 506: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy452 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 511: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy416 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 525: /* expression ::= pseudo_column */ -{ yylhsminor.yy452 = yymsp[0].minor.yy452; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy452, true); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 530: /* expression ::= pseudo_column */ +{ yylhsminor.yy416 = yymsp[0].minor.yy416; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy416, true); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 529: /* expression ::= NK_LP expression NK_RP */ - case 617: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==617); - case 733: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==733); -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 534: /* expression ::= NK_LP expression NK_RP */ + case 622: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==622); + case 738: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==738); +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 530: /* expression ::= NK_PLUS expr_or_subquery */ + case 535: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 531: /* expression ::= NK_MINUS expr_or_subquery */ + case 536: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy416), NULL)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 532: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 537: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 533: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 538: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 534: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 539: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 535: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 540: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 536: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 541: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 537: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 542: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 538: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 543: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 539: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 544: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 542: /* column_reference ::= column_name */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy479, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy479)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 547: /* column_reference ::= column_name */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy1109, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy1109)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 543: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479, createColumnNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 548: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109, createColumnNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 544: /* column_reference ::= NK_ALIAS */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 549: /* column_reference ::= NK_ALIAS */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 545: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 550: /* column_reference ::= table_name NK_DOT NK_ALIAS */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 546: /* pseudo_column ::= ROWTS */ - case 547: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==547); - case 549: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==549); - case 550: /* pseudo_column ::= QEND */ yytestcase(yyruleno==550); - case 551: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==551); - case 552: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==552); - case 553: /* pseudo_column ::= WEND */ yytestcase(yyruleno==553); - case 554: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==554); - case 555: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==555); - case 556: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==556); - case 557: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==557); - case 564: /* literal_func ::= NOW */ yytestcase(yyruleno==564); - case 565: /* literal_func ::= TODAY */ yytestcase(yyruleno==565); -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 551: /* pseudo_column ::= ROWTS */ + case 552: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==552); + case 554: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==554); + case 555: /* pseudo_column ::= QEND */ yytestcase(yyruleno==555); + case 556: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==556); + case 557: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==557); + case 558: /* pseudo_column ::= WEND */ yytestcase(yyruleno==558); + case 559: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==559); + case 560: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==560); + case 561: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==561); + case 562: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==562); + case 569: /* literal_func ::= NOW */ yytestcase(yyruleno==569); + case 570: /* literal_func ::= TODAY */ yytestcase(yyruleno==570); +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 548: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy479)))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 553: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy1109)))); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 558: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 559: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==559); -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy479, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy479, yymsp[-1].minor.yy34)); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 563: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 564: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==564); +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy1109, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy1109, yymsp[-1].minor.yy316)); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 560: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - case 561: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==561); -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy874)); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; + case 565: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 566: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==566); +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-1].minor.yy952)); } + yymsp[-5].minor.yy416 = yylhsminor.yy416; break; - case 563: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy479, NULL)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 568: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy1109, NULL)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 579: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy34 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy34 = yylhsminor.yy34; + case 584: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy316 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy316 = yylhsminor.yy316; break; - case 584: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 669: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==669); -{ yylhsminor.yy452 = createColumnNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 589: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 674: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==674); +{ yylhsminor.yy416 = createColumnNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 585: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy34, yymsp[-1].minor.yy452)); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 590: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy316, yymsp[-1].minor.yy416)); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 586: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-2].minor.yy34, yymsp[-1].minor.yy452)); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; + case 591: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-2].minor.yy316, yymsp[-1].minor.yy416)); } + yymsp[-4].minor.yy416 = yylhsminor.yy416; break; - case 589: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy452 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } + case 594: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy416 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } break; - case 591: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy452 = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); } + case 596: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy416 = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); } break; - case 592: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 597: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==597); + case 597: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 602: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==602); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy440, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy848, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 593: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 598: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy452), releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy416), releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; + yymsp[-4].minor.yy416 = yylhsminor.yy416; break; - case 594: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 599: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy416), releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; + yymsp[-5].minor.yy416 = yylhsminor.yy416; break; - case 595: /* predicate ::= expr_or_subquery IS NULL */ + case 600: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), NULL)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 596: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 601: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), NULL)); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 598: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy440 = OP_TYPE_LOWER_THAN; } + case 603: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy848 = OP_TYPE_LOWER_THAN; } break; - case 599: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy440 = OP_TYPE_GREATER_THAN; } + case 604: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy848 = OP_TYPE_GREATER_THAN; } break; - case 600: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy440 = OP_TYPE_LOWER_EQUAL; } + case 605: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy848 = OP_TYPE_LOWER_EQUAL; } break; - case 601: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy440 = OP_TYPE_GREATER_EQUAL; } + case 606: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy848 = OP_TYPE_GREATER_EQUAL; } break; - case 602: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy440 = OP_TYPE_NOT_EQUAL; } + case 607: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy848 = OP_TYPE_NOT_EQUAL; } break; - case 603: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy440 = OP_TYPE_EQUAL; } + case 608: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy848 = OP_TYPE_EQUAL; } break; - case 604: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy440 = OP_TYPE_LIKE; } + case 609: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy848 = OP_TYPE_LIKE; } break; - case 605: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy440 = OP_TYPE_NOT_LIKE; } + case 610: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy848 = OP_TYPE_NOT_LIKE; } break; - case 606: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy440 = OP_TYPE_MATCH; } + case 611: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy848 = OP_TYPE_MATCH; } break; - case 607: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy440 = OP_TYPE_NMATCH; } + case 612: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy848 = OP_TYPE_NMATCH; } break; - case 608: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy440 = OP_TYPE_JSON_CONTAINS; } + case 613: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy848 = OP_TYPE_JSON_CONTAINS; } break; - case 609: /* in_op ::= IN */ -{ yymsp[0].minor.yy440 = OP_TYPE_IN; } + case 614: /* in_op ::= IN */ +{ yymsp[0].minor.yy848 = OP_TYPE_IN; } break; - case 610: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy440 = OP_TYPE_NOT_IN; } + case 615: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy848 = OP_TYPE_NOT_IN; } break; - case 611: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy34)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 616: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy316)); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 613: /* boolean_value_expression ::= NOT boolean_primary */ + case 618: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy416), NULL)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 614: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 619: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 615: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 620: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); + yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 623: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy452 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, NULL); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 628: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy416 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, NULL); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 626: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 631: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy416 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 627: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-3].minor.yy479, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 632: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy416 = createRealTableNode(pCxt, &yymsp[-3].minor.yy1109, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 628: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy452 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 633: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy416 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416), &yymsp[0].minor.yy1109); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 630: /* alias_opt ::= */ -{ yymsp[1].minor.yy479 = nil_token; } + case 635: /* alias_opt ::= */ +{ yymsp[1].minor.yy1109 = nil_token; } break; - case 632: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy479 = yymsp[0].minor.yy479; } + case 637: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy1109 = yymsp[0].minor.yy1109; } break; - case 633: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 634: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==634); -{ yymsp[-2].minor.yy452 = yymsp[-1].minor.yy452; } + case 638: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 639: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==639); +{ yymsp[-2].minor.yy416 = yymsp[-1].minor.yy416; } break; - case 635: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + case 640: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ { - yylhsminor.yy452 = createJoinTableNode(pCxt, yymsp[-6].minor.yy162, yymsp[-5].minor.yy444, yymsp[-7].minor.yy452, yymsp[-3].minor.yy452, yymsp[-2].minor.yy452); - yylhsminor.yy452 = addWindowOffsetClause(pCxt, yylhsminor.yy452, yymsp[-1].minor.yy452); - yylhsminor.yy452 = addJLimitClause(pCxt, yylhsminor.yy452, yymsp[0].minor.yy452); + yylhsminor.yy416 = createJoinTableNode(pCxt, yymsp[-6].minor.yy972, yymsp[-5].minor.yy630, yymsp[-7].minor.yy416, yymsp[-3].minor.yy416, yymsp[-2].minor.yy416); + yylhsminor.yy416 = addWindowOffsetClause(pCxt, yylhsminor.yy416, yymsp[-1].minor.yy416); + yylhsminor.yy416 = addJLimitClause(pCxt, yylhsminor.yy416, yymsp[0].minor.yy416); } - yymsp[-7].minor.yy452 = yylhsminor.yy452; + yymsp[-7].minor.yy416 = yylhsminor.yy416; break; - case 636: /* join_type ::= */ -{ yymsp[1].minor.yy162 = JOIN_TYPE_INNER; } + case 641: /* join_type ::= */ +{ yymsp[1].minor.yy972 = JOIN_TYPE_INNER; } break; - case 637: /* join_type ::= INNER */ -{ yymsp[0].minor.yy162 = JOIN_TYPE_INNER; } + case 642: /* join_type ::= INNER */ +{ yymsp[0].minor.yy972 = JOIN_TYPE_INNER; } break; - case 638: /* join_type ::= LEFT */ -{ yymsp[0].minor.yy162 = JOIN_TYPE_LEFT; } + case 643: /* join_type ::= LEFT */ +{ yymsp[0].minor.yy972 = JOIN_TYPE_LEFT; } break; - case 639: /* join_type ::= RIGHT */ -{ yymsp[0].minor.yy162 = JOIN_TYPE_RIGHT; } + case 644: /* join_type ::= RIGHT */ +{ yymsp[0].minor.yy972 = JOIN_TYPE_RIGHT; } break; - case 640: /* join_type ::= FULL */ -{ yymsp[0].minor.yy162 = JOIN_TYPE_FULL; } + case 645: /* join_type ::= FULL */ +{ yymsp[0].minor.yy972 = JOIN_TYPE_FULL; } break; - case 641: /* join_subtype ::= */ -{ yymsp[1].minor.yy444 = JOIN_STYPE_NONE; } + case 646: /* join_subtype ::= */ +{ yymsp[1].minor.yy630 = JOIN_STYPE_NONE; } break; - case 642: /* join_subtype ::= OUTER */ -{ yymsp[0].minor.yy444 = JOIN_STYPE_OUTER; } + case 647: /* join_subtype ::= OUTER */ +{ yymsp[0].minor.yy630 = JOIN_STYPE_OUTER; } break; - case 643: /* join_subtype ::= SEMI */ -{ yymsp[0].minor.yy444 = JOIN_STYPE_SEMI; } + case 648: /* join_subtype ::= SEMI */ +{ yymsp[0].minor.yy630 = JOIN_STYPE_SEMI; } break; - case 644: /* join_subtype ::= ANTI */ -{ yymsp[0].minor.yy444 = JOIN_STYPE_ANTI; } + case 649: /* join_subtype ::= ANTI */ +{ yymsp[0].minor.yy630 = JOIN_STYPE_ANTI; } break; - case 645: /* join_subtype ::= ASOF */ -{ yymsp[0].minor.yy444 = JOIN_STYPE_ASOF; } + case 650: /* join_subtype ::= ASOF */ +{ yymsp[0].minor.yy630 = JOIN_STYPE_ASOF; } break; - case 646: /* join_subtype ::= WINDOW */ -{ yymsp[0].minor.yy444 = JOIN_STYPE_WIN; } + case 651: /* join_subtype ::= WINDOW */ +{ yymsp[0].minor.yy630 = JOIN_STYPE_WIN; } break; - case 650: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ -{ yymsp[-5].minor.yy452 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 655: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ +{ yymsp[-5].minor.yy416 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } break; - case 651: /* window_offset_literal ::= NK_VARIABLE */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 656: /* window_offset_literal ::= NK_VARIABLE */ +{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 652: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ + case 657: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy452 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); + yylhsminor.yy416 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 654: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - case 725: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==725); - case 729: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==729); -{ yymsp[-1].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 659: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + case 730: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==730); + case 734: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==734); +{ yymsp[-1].minor.yy416 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 655: /* 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 660: /* 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.yy452 = createSelectStmt(pCxt, yymsp[-11].minor.yy437, yymsp[-9].minor.yy34, yymsp[-8].minor.yy452, yymsp[-12].minor.yy34); - yymsp[-13].minor.yy452 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy452, yymsp[-10].minor.yy437); - yymsp[-13].minor.yy452 = addWhereClause(pCxt, yymsp[-13].minor.yy452, yymsp[-7].minor.yy452); - yymsp[-13].minor.yy452 = addPartitionByClause(pCxt, yymsp[-13].minor.yy452, yymsp[-6].minor.yy34); - yymsp[-13].minor.yy452 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy452, yymsp[-2].minor.yy452); - yymsp[-13].minor.yy452 = addGroupByClause(pCxt, yymsp[-13].minor.yy452, yymsp[-1].minor.yy34); - yymsp[-13].minor.yy452 = addHavingClause(pCxt, yymsp[-13].minor.yy452, yymsp[0].minor.yy452); - yymsp[-13].minor.yy452 = addRangeClause(pCxt, yymsp[-13].minor.yy452, yymsp[-5].minor.yy452); - yymsp[-13].minor.yy452 = addEveryClause(pCxt, yymsp[-13].minor.yy452, yymsp[-4].minor.yy452); - yymsp[-13].minor.yy452 = addFillClause(pCxt, yymsp[-13].minor.yy452, yymsp[-3].minor.yy452); + yymsp[-13].minor.yy416 = createSelectStmt(pCxt, yymsp[-11].minor.yy209, yymsp[-9].minor.yy316, yymsp[-8].minor.yy416, yymsp[-12].minor.yy316); + yymsp[-13].minor.yy416 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy416, yymsp[-10].minor.yy209); + yymsp[-13].minor.yy416 = addWhereClause(pCxt, yymsp[-13].minor.yy416, yymsp[-7].minor.yy416); + yymsp[-13].minor.yy416 = addPartitionByClause(pCxt, yymsp[-13].minor.yy416, yymsp[-6].minor.yy316); + yymsp[-13].minor.yy416 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy416, yymsp[-2].minor.yy416); + yymsp[-13].minor.yy416 = addGroupByClause(pCxt, yymsp[-13].minor.yy416, yymsp[-1].minor.yy316); + yymsp[-13].minor.yy416 = addHavingClause(pCxt, yymsp[-13].minor.yy416, yymsp[0].minor.yy416); + yymsp[-13].minor.yy416 = addRangeClause(pCxt, yymsp[-13].minor.yy416, yymsp[-5].minor.yy416); + yymsp[-13].minor.yy416 = addEveryClause(pCxt, yymsp[-13].minor.yy416, yymsp[-4].minor.yy416); + yymsp[-13].minor.yy416 = addFillClause(pCxt, yymsp[-13].minor.yy416, yymsp[-3].minor.yy416); } break; - case 656: /* hint_list ::= */ -{ yymsp[1].minor.yy34 = createHintNodeList(pCxt, NULL); } + case 661: /* hint_list ::= */ +{ yymsp[1].minor.yy316 = createHintNodeList(pCxt, NULL); } break; - case 657: /* hint_list ::= NK_HINT */ -{ yylhsminor.yy34 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy34 = yylhsminor.yy34; + case 662: /* hint_list ::= NK_HINT */ +{ yylhsminor.yy316 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy316 = yylhsminor.yy316; break; - case 662: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy437 = false; } + case 667: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy209 = false; } break; - case 665: /* select_item ::= NK_STAR */ -{ yylhsminor.yy452 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 670: /* select_item ::= NK_STAR */ +{ yylhsminor.yy416 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy416 = yylhsminor.yy416; break; - case 667: /* select_item ::= common_expression column_alias */ - case 677: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==677); -{ yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 672: /* select_item ::= common_expression column_alias */ + case 682: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==682); +{ yylhsminor.yy416 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416), &yymsp[0].minor.yy1109); } + yymsp[-1].minor.yy416 = yylhsminor.yy416; break; - case 668: /* select_item ::= common_expression AS column_alias */ - case 678: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==678); -{ yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), &yymsp[0].minor.yy479); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 673: /* select_item ::= common_expression AS column_alias */ + case 683: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==683); +{ yylhsminor.yy416 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), &yymsp[0].minor.yy1109); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 673: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 703: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==703); - case 723: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==723); -{ yymsp[-2].minor.yy34 = yymsp[0].minor.yy34; } + case 678: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 708: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==708); + case 728: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==728); +{ yymsp[-2].minor.yy316 = yymsp[0].minor.yy316; } break; - case 680: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -{ yymsp[-5].minor.yy452 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 685: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ +{ yymsp[-5].minor.yy416 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } break; - case 681: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy452 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 686: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy416 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } break; - case 682: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 687: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy416 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), NULL, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } break; - case 683: /* 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.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 688: /* 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.yy416 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy416), releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } break; - case 684: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy452 = createEventWindowNode(pCxt, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); } + case 689: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy416 = createEventWindowNode(pCxt, yymsp[-3].minor.yy416, yymsp[0].minor.yy416); } break; - case 685: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy452 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } + case 690: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy416 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 686: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy452 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } + case 691: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy416 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 693: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy452 = createFillNode(pCxt, yymsp[-1].minor.yy984, NULL); } + case 698: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy416 = createFillNode(pCxt, yymsp[-1].minor.yy882, NULL); } break; - case 694: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy452 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy34)); } + case 699: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy416 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy316)); } break; - case 695: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy452 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy34)); } + case 700: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy416 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy316)); } break; - case 696: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy984 = FILL_MODE_NONE; } + case 701: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy882 = FILL_MODE_NONE; } break; - case 697: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy984 = FILL_MODE_PREV; } + case 702: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy882 = FILL_MODE_PREV; } break; - case 698: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy984 = FILL_MODE_NULL; } + case 703: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy882 = FILL_MODE_NULL; } break; - case 699: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy984 = FILL_MODE_NULL_F; } + case 704: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy882 = FILL_MODE_NULL_F; } break; - case 700: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy984 = FILL_MODE_LINEAR; } + case 705: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy882 = FILL_MODE_LINEAR; } break; - case 701: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy984 = FILL_MODE_NEXT; } + case 706: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy882 = FILL_MODE_NEXT; } break; - case 704: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy34 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); } - yymsp[0].minor.yy34 = yylhsminor.yy34; + case 709: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy316 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } + yymsp[0].minor.yy316 = yylhsminor.yy316; break; - case 705: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy34 = addNodeToList(pCxt, yymsp[-2].minor.yy34, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); } - yymsp[-2].minor.yy34 = yylhsminor.yy34; + case 710: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } + yymsp[-2].minor.yy316 = yylhsminor.yy316; break; - case 709: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy452 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 714: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy416 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } break; - case 710: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy452 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 715: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy416 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } break; - case 713: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 718: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy452 = addOrderByClause(pCxt, yymsp[-3].minor.yy452, yymsp[-2].minor.yy34); - yylhsminor.yy452 = addSlimitClause(pCxt, yylhsminor.yy452, yymsp[-1].minor.yy452); - yylhsminor.yy452 = addLimitClause(pCxt, yylhsminor.yy452, yymsp[0].minor.yy452); + yylhsminor.yy416 = addOrderByClause(pCxt, yymsp[-3].minor.yy416, yymsp[-2].minor.yy316); + yylhsminor.yy416 = addSlimitClause(pCxt, yylhsminor.yy416, yymsp[-1].minor.yy416); + yylhsminor.yy416 = addLimitClause(pCxt, yylhsminor.yy416, yymsp[0].minor.yy416); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 716: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy452 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 721: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy416 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy416, yymsp[0].minor.yy416); } + yymsp[-3].minor.yy416 = yylhsminor.yy416; break; - case 717: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy452 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 722: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy416 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy416, yymsp[0].minor.yy416); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 726: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 730: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==730); -{ yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 731: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 735: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==735); +{ yymsp[-3].minor.yy416 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 727: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 731: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==731); -{ yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 732: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 736: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==736); +{ yymsp[-3].minor.yy416 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 732: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy452); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 737: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy416); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 737: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy452 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), yymsp[-1].minor.yy548, yymsp[0].minor.yy817); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 742: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy416 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), yymsp[-1].minor.yy506, yymsp[0].minor.yy1045); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 738: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy548 = ORDER_ASC; } + case 743: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy506 = ORDER_ASC; } break; - case 739: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy548 = ORDER_ASC; } + case 744: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy506 = ORDER_ASC; } break; - case 740: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy548 = ORDER_DESC; } + case 745: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy506 = ORDER_DESC; } break; - case 741: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy817 = NULL_ORDER_DEFAULT; } + case 746: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy1045 = NULL_ORDER_DEFAULT; } break; - case 742: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy817 = NULL_ORDER_FIRST; } + case 747: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy1045 = NULL_ORDER_FIRST; } break; - case 743: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy817 = NULL_ORDER_LAST; } + case 748: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy1045 = NULL_ORDER_LAST; } break; - case 746: /* column_options ::= column_options ENCODE NK_STRING */ -{ yylhsminor.yy452 = setColumnOptions(pCxt, yymsp[-2].minor.yy452, COLUMN_OPTION_ENCODE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 751: /* column_options ::= column_options ENCODE NK_STRING */ +{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_ENCODE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 747: /* column_options ::= column_options COMPRESS NK_STRING */ -{ yylhsminor.yy452 = setColumnOptions(pCxt, yymsp[-2].minor.yy452, COLUMN_OPTION_COMPRESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 752: /* column_options ::= column_options COMPRESS NK_STRING */ +{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_COMPRESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; - case 748: /* column_options ::= column_options LEVEL NK_STRING */ -{ yylhsminor.yy452 = setColumnOptions(pCxt, yymsp[-2].minor.yy452, COLUMN_OPTION_LEVEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 753: /* column_options ::= column_options LEVEL NK_STRING */ +{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_LEVEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy416 = yylhsminor.yy416; break; default: break; @@ -7468,12 +7781,56 @@ void Parse( } #endif - do{ + while(1){ /* Exit by "break" */ + assert( yypParser->yytos>=yypParser->yystack ); assert( yyact==yypParser->yytos->stateno ); yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); if( yyact >= YY_MIN_REDUCE ){ - yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor, - yyminor ParseCTX_PARAM); + 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); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY @@ -7529,14 +7886,13 @@ 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)) > YY_MAX_SHIFTREDUCE - ){ + while( yypParser->yytos > yypParser->yystack ){ + yyact = yy_find_reduce_action(yypParser->yytos->stateno, + YYERRORSYMBOL); + if( yyact<=YY_MAX_SHIFTREDUCE ) break; 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 @@ -7586,7 +7942,7 @@ void Parse( break; #endif } - }while( yypParser->yytos>yypParser->yystack ); + } #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; From 7fc72f1ba5b0385a44e1e0205ff40f5a4b28ab13 Mon Sep 17 00:00:00 2001 From: dmchen Date: Mon, 17 Jun 2024 09:14:11 +0000 Subject: [PATCH 08/53] license --- source/libs/monitorfw/inc/taos_assert.h | 21 ++++++++++--------- .../monitorfw/inc/taos_collector_registry_i.h | 21 ++++++++++--------- .../monitorfw/inc/taos_collector_registry_t.h | 21 ++++++++++--------- source/libs/monitorfw/inc/taos_collector_t.h | 21 ++++++++++--------- source/libs/monitorfw/inc/taos_errors.h | 21 ++++++++++--------- .../libs/monitorfw/inc/taos_linked_list_i.h | 21 ++++++++++--------- .../libs/monitorfw/inc/taos_linked_list_t.h | 21 ++++++++++--------- source/libs/monitorfw/inc/taos_log.h | 21 ++++++++++--------- source/libs/monitorfw/inc/taos_map_i.h | 21 ++++++++++--------- source/libs/monitorfw/inc/taos_map_t.h | 21 ++++++++++--------- .../inc/taos_metric_formatter_custom_i.h | 21 ++++++++++--------- .../monitorfw/inc/taos_metric_formatter_i.h | 21 ++++++++++--------- .../monitorfw/inc/taos_metric_formatter_t.h | 21 ++++++++++--------- source/libs/monitorfw/inc/taos_metric_i.h | 21 ++++++++++--------- .../libs/monitorfw/inc/taos_metric_sample_i.h | 21 ++++++++++--------- .../libs/monitorfw/inc/taos_metric_sample_t.h | 21 ++++++++++--------- source/libs/monitorfw/inc/taos_metric_t.h | 21 ++++++++++--------- .../libs/monitorfw/inc/taos_monitor_util_i.h | 21 ++++++++++--------- .../monitorfw/inc/taos_string_builder_i.h | 21 ++++++++++--------- .../monitorfw/inc/taos_string_builder_t.h | 21 ++++++++++--------- source/libs/monitorfw/src/taos_collector.c | 21 ++++++++++--------- .../monitorfw/src/taos_collector_registry.c | 21 ++++++++++--------- source/libs/monitorfw/src/taos_counter.c | 21 ++++++++++--------- source/libs/monitorfw/src/taos_gauge.c | 21 ++++++++++--------- source/libs/monitorfw/src/taos_linked_list.c | 21 ++++++++++--------- source/libs/monitorfw/src/taos_map.c | 21 ++++++++++--------- source/libs/monitorfw/src/taos_metric.c | 21 ++++++++++--------- .../monitorfw/src/taos_metric_formatter.c | 21 ++++++++++--------- .../src/taos_metric_formatter_custom.c | 21 ++++++++++--------- .../libs/monitorfw/src/taos_metric_sample.c | 21 ++++++++++--------- source/libs/monitorfw/src/taos_monitor_util.c | 21 ++++++++++--------- .../libs/monitorfw/src/taos_string_builder.c | 21 ++++++++++--------- 32 files changed, 352 insertions(+), 320 deletions(-) diff --git a/source/libs/monitorfw/inc/taos_assert.h b/source/libs/monitorfw/inc/taos_assert.h index d3226eed26..9d2732acc5 100644 --- a/source/libs/monitorfw/inc/taos_assert.h +++ b/source/libs/monitorfw/inc/taos_assert.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include diff --git a/source/libs/monitorfw/inc/taos_collector_registry_i.h b/source/libs/monitorfw/inc/taos_collector_registry_i.h index ed5bb1fe19..c69abf54c0 100644 --- a/source/libs/monitorfw/inc/taos_collector_registry_i.h +++ b/source/libs/monitorfw/inc/taos_collector_registry_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "taos_collector_registry_t.h" diff --git a/source/libs/monitorfw/inc/taos_collector_registry_t.h b/source/libs/monitorfw/inc/taos_collector_registry_t.h index 8e8a881fca..9c00270abd 100644 --- a/source/libs/monitorfw/inc/taos_collector_registry_t.h +++ b/source/libs/monitorfw/inc/taos_collector_registry_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_REGISTRY_T_H diff --git a/source/libs/monitorfw/inc/taos_collector_t.h b/source/libs/monitorfw/inc/taos_collector_t.h index 264e8e9ad9..b7748357fc 100644 --- a/source/libs/monitorfw/inc/taos_collector_t.h +++ b/source/libs/monitorfw/inc/taos_collector_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_COLLECTOR_T_H diff --git a/source/libs/monitorfw/inc/taos_errors.h b/source/libs/monitorfw/inc/taos_errors.h index ee2a894df3..50e92c3093 100644 --- a/source/libs/monitorfw/inc/taos_errors.h +++ b/source/libs/monitorfw/inc/taos_errors.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #define TAOS_STDIO_CLOSE_DIR_ERROR "failed to close dir" diff --git a/source/libs/monitorfw/inc/taos_linked_list_i.h b/source/libs/monitorfw/inc/taos_linked_list_i.h index 015f8a57ad..73be405023 100644 --- a/source/libs/monitorfw/inc/taos_linked_list_i.h +++ b/source/libs/monitorfw/inc/taos_linked_list_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_LIST_I_INCLUDED diff --git a/source/libs/monitorfw/inc/taos_linked_list_t.h b/source/libs/monitorfw/inc/taos_linked_list_t.h index ccd82ffb61..abb7ff5418 100644 --- a/source/libs/monitorfw/inc/taos_linked_list_t.h +++ b/source/libs/monitorfw/inc/taos_linked_list_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_LIST_T_H diff --git a/source/libs/monitorfw/inc/taos_log.h b/source/libs/monitorfw/inc/taos_log.h index fecbda59e5..3b3be4efbf 100644 --- a/source/libs/monitorfw/inc/taos_log.h +++ b/source/libs/monitorfw/inc/taos_log.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include diff --git a/source/libs/monitorfw/inc/taos_map_i.h b/source/libs/monitorfw/inc/taos_map_i.h index 55f248b96a..c9d584315b 100644 --- a/source/libs/monitorfw/inc/taos_map_i.h +++ b/source/libs/monitorfw/inc/taos_map_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_MAP_I_INCLUDED diff --git a/source/libs/monitorfw/inc/taos_map_t.h b/source/libs/monitorfw/inc/taos_map_t.h index 6fcbda1366..8119397e5d 100644 --- a/source/libs/monitorfw/inc/taos_map_t.h +++ b/source/libs/monitorfw/inc/taos_map_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_MAP_T_H diff --git a/source/libs/monitorfw/inc/taos_metric_formatter_custom_i.h b/source/libs/monitorfw/inc/taos_metric_formatter_custom_i.h index f3e4ebae75..169e170e1a 100644 --- a/source/libs/monitorfw/inc/taos_metric_formatter_custom_i.h +++ b/source/libs/monitorfw/inc/taos_metric_formatter_custom_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_METRIC_FORMATTER_CUSTOMV2_I_H diff --git a/source/libs/monitorfw/inc/taos_metric_formatter_i.h b/source/libs/monitorfw/inc/taos_metric_formatter_i.h index fba30d9eeb..ab60359f4a 100644 --- a/source/libs/monitorfw/inc/taos_metric_formatter_i.h +++ b/source/libs/monitorfw/inc/taos_metric_formatter_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_METRIC_FORMATTER_I_H diff --git a/source/libs/monitorfw/inc/taos_metric_formatter_t.h b/source/libs/monitorfw/inc/taos_metric_formatter_t.h index 0d7425aa59..0a629469a8 100644 --- a/source/libs/monitorfw/inc/taos_metric_formatter_t.h +++ b/source/libs/monitorfw/inc/taos_metric_formatter_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_METRIC_FORMATTER_T_H diff --git a/source/libs/monitorfw/inc/taos_metric_i.h b/source/libs/monitorfw/inc/taos_metric_i.h index e8ae799547..489ba2ac0b 100644 --- a/source/libs/monitorfw/inc/taos_metric_i.h +++ b/source/libs/monitorfw/inc/taos_metric_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ // Private diff --git a/source/libs/monitorfw/inc/taos_metric_sample_i.h b/source/libs/monitorfw/inc/taos_metric_sample_i.h index b5e90f1933..a354432774 100644 --- a/source/libs/monitorfw/inc/taos_metric_sample_i.h +++ b/source/libs/monitorfw/inc/taos_metric_sample_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include "taos_metric_sample_t.h" diff --git a/source/libs/monitorfw/inc/taos_metric_sample_t.h b/source/libs/monitorfw/inc/taos_metric_sample_t.h index 387512af9d..59dd92aba8 100644 --- a/source/libs/monitorfw/inc/taos_metric_sample_t.h +++ b/source/libs/monitorfw/inc/taos_metric_sample_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_METRIC_SAMPLE_T_H diff --git a/source/libs/monitorfw/inc/taos_metric_t.h b/source/libs/monitorfw/inc/taos_metric_t.h index da237aa814..d285b56d33 100644 --- a/source/libs/monitorfw/inc/taos_metric_t.h +++ b/source/libs/monitorfw/inc/taos_metric_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_METRIC_T_H diff --git a/source/libs/monitorfw/inc/taos_monitor_util_i.h b/source/libs/monitorfw/inc/taos_monitor_util_i.h index fe072204a3..8ac048c8b5 100644 --- a/source/libs/monitorfw/inc/taos_monitor_util_i.h +++ b/source/libs/monitorfw/inc/taos_monitor_util_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_MONITOR_UTIL_I_H diff --git a/source/libs/monitorfw/inc/taos_string_builder_i.h b/source/libs/monitorfw/inc/taos_string_builder_i.h index 142ca020ba..933d778691 100644 --- a/source/libs/monitorfw/inc/taos_string_builder_i.h +++ b/source/libs/monitorfw/inc/taos_string_builder_i.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_STRING_BUILDER_I_H diff --git a/source/libs/monitorfw/inc/taos_string_builder_t.h b/source/libs/monitorfw/inc/taos_string_builder_t.h index edd3d574fa..c0d487865c 100644 --- a/source/libs/monitorfw/inc/taos_string_builder_t.h +++ b/source/libs/monitorfw/inc/taos_string_builder_t.h @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef TAOS_STRING_BUILDER_T_H diff --git a/source/libs/monitorfw/src/taos_collector.c b/source/libs/monitorfw/src/taos_collector.c index 414c02121d..8be4edaef9 100644 --- a/source/libs/monitorfw/src/taos_collector.c +++ b/source/libs/monitorfw/src/taos_collector.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include diff --git a/source/libs/monitorfw/src/taos_collector_registry.c b/source/libs/monitorfw/src/taos_collector_registry.c index d4838ef301..0c8385791d 100644 --- a/source/libs/monitorfw/src/taos_collector_registry.c +++ b/source/libs/monitorfw/src/taos_collector_registry.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include diff --git a/source/libs/monitorfw/src/taos_counter.c b/source/libs/monitorfw/src/taos_counter.c index d522411b2b..b4c867c66f 100644 --- a/source/libs/monitorfw/src/taos_counter.c +++ b/source/libs/monitorfw/src/taos_counter.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ // Public diff --git a/source/libs/monitorfw/src/taos_gauge.c b/source/libs/monitorfw/src/taos_gauge.c index 7793f4c464..1f9fa6fc9c 100644 --- a/source/libs/monitorfw/src/taos_gauge.c +++ b/source/libs/monitorfw/src/taos_gauge.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ // Public diff --git a/source/libs/monitorfw/src/taos_linked_list.c b/source/libs/monitorfw/src/taos_linked_list.c index 2becb08a07..7c46e89ab0 100644 --- a/source/libs/monitorfw/src/taos_linked_list.c +++ b/source/libs/monitorfw/src/taos_linked_list.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ // Public diff --git a/source/libs/monitorfw/src/taos_map.c b/source/libs/monitorfw/src/taos_map.c index ffb7d000fc..55aaabf1a7 100644 --- a/source/libs/monitorfw/src/taos_map.c +++ b/source/libs/monitorfw/src/taos_map.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include diff --git a/source/libs/monitorfw/src/taos_metric.c b/source/libs/monitorfw/src/taos_metric.c index 5cecbc927f..056bf131f2 100644 --- a/source/libs/monitorfw/src/taos_metric.c +++ b/source/libs/monitorfw/src/taos_metric.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include diff --git a/source/libs/monitorfw/src/taos_metric_formatter.c b/source/libs/monitorfw/src/taos_metric_formatter.c index 53012935ba..5f34edf3e6 100644 --- a/source/libs/monitorfw/src/taos_metric_formatter.c +++ b/source/libs/monitorfw/src/taos_metric_formatter.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include diff --git a/source/libs/monitorfw/src/taos_metric_formatter_custom.c b/source/libs/monitorfw/src/taos_metric_formatter_custom.c index 3b1318dfc0..553227c801 100644 --- a/source/libs/monitorfw/src/taos_metric_formatter_custom.c +++ b/source/libs/monitorfw/src/taos_metric_formatter_custom.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #define ALLOW_FORBID_FUNC diff --git a/source/libs/monitorfw/src/taos_metric_sample.c b/source/libs/monitorfw/src/taos_metric_sample.c index c6d817b513..4688672835 100644 --- a/source/libs/monitorfw/src/taos_metric_sample.c +++ b/source/libs/monitorfw/src/taos_metric_sample.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ diff --git a/source/libs/monitorfw/src/taos_monitor_util.c b/source/libs/monitorfw/src/taos_monitor_util.c index 182402b3ff..d338215426 100644 --- a/source/libs/monitorfw/src/taos_monitor_util.c +++ b/source/libs/monitorfw/src/taos_monitor_util.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ diff --git a/source/libs/monitorfw/src/taos_string_builder.c b/source/libs/monitorfw/src/taos_string_builder.c index 0f3940cdab..e1bfa4142c 100644 --- a/source/libs/monitorfw/src/taos_string_builder.c +++ b/source/libs/monitorfw/src/taos_string_builder.c @@ -1,16 +1,17 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. +/** + * Copyright 2019-2020 DigitalOcean 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. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * 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. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include From e59e52d34373e9a6c922690c4fb339265a339f52 Mon Sep 17 00:00:00 2001 From: dmchen Date: Mon, 17 Jun 2024 10:44:53 +0000 Subject: [PATCH 09/53] fix case --- source/libs/executor/src/sysscanoperator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 10d38b3d95..415c7d1f0e 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -1090,6 +1090,10 @@ int32_t buildDbTableInfoBlock(bool sysInfo, const SSDataBlock* p, const SSysTabl continue; } + if(strcmp(pm->name, TSDB_INS_TABLE_USERS_FULL) == 0){ + continue; + } + SColumnInfoData* pColInfoData = taosArrayGet(p->pDataBlock, 0); STR_TO_VARSTR(n, pm->name); From 00c64ed0e367ee45df6bc04e8b996e2b4afc7b19 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Mon, 17 Jun 2024 19:33:01 +0800 Subject: [PATCH 10/53] adj create count window state --- source/libs/stream/src/streamSessionState.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/libs/stream/src/streamSessionState.c b/source/libs/stream/src/streamSessionState.c index 005fd1603c..84db657392 100644 --- a/source/libs/stream/src/streamSessionState.c +++ b/source/libs/stream/src/streamSessionState.c @@ -874,9 +874,8 @@ int32_t createCountWinResultBuff(SStreamFileState* pFileState, SSessionKey* pKey void* pFileStore = getStateFileStore(pFileState); void* p = NULL; - SStreamStateCur* pCur = streamStateSessionSeekToLast_rocksdb(pFileStore, pKey->groupId); - int32_t code_file = streamStateSessionGetKVByCur_rocksdb(pCur, pWinKey, &p, pVLen); - if (code_file == TSDB_CODE_SUCCESS || isFlushedState(pFileState, endTs, 0)) { + int32_t code_file = getCountWinStateFromDisc(pFileStore, pWinKey, &p, pVLen); + if (code_file == TSDB_CODE_SUCCESS && isFlushedState(pFileState, endTs, 0)) { (*pVal) = createSessionWinBuff(pFileState, pWinKey, p, pVLen); code = code_file; qDebug("===stream===0 get state win:%" PRId64 ",%" PRId64 " from disc, res %d", pWinKey->win.skey, pWinKey->win.ekey, code_file); @@ -885,7 +884,6 @@ int32_t createCountWinResultBuff(SStreamFileState* pFileState, SSessionKey* pKey code = TSDB_CODE_FAILED; taosMemoryFree(p); } - streamStateFreeCur(pCur); goto _end; } else { (*pVal) = addNewSessionWindow(pFileState, pWinStates, pWinKey); From ec1e7c77d6faa4378eea227693e972e1fab7c133 Mon Sep 17 00:00:00 2001 From: dmchen Date: Mon, 17 Jun 2024 12:40:23 +0000 Subject: [PATCH 11/53] fix case --- source/libs/executor/src/scanoperator.c | 1 + tests/system-test/0-others/information_schema.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 1b90088605..d21d9332cf 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -4961,6 +4961,7 @@ static SSDataBlock* buildSysDbTableCount(SOperatorInfo* pOperator, STableCountSc size_t infodbTableNum; getInfosDbMeta(NULL, &infodbTableNum); + infodbTableNum -= 1; size_t perfdbTableNum; getPerfDbMeta(NULL, &perfdbTableNum); diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index 7a0d1b048a..d5754b1063 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -222,7 +222,7 @@ class TDTestCase: tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'") tdLog.info(len(tdSql.queryResult)) - tdSql.checkEqual(True, len(tdSql.queryResult) in range(261, 262)) + tdSql.checkEqual(True, len(tdSql.queryResult) in range(261, 269)) tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'") tdSql.checkEqual(54, len(tdSql.queryResult)) From f5bb4df8467e92a513f48fdec98fec82c2e8fecc Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Tue, 18 Jun 2024 11:30:24 +0800 Subject: [PATCH 12/53] adj test case --- tests/script/tsim/stream/pauseAndResume.sim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/script/tsim/stream/pauseAndResume.sim b/tests/script/tsim/stream/pauseAndResume.sim index 9a05e645c2..b9d6e141be 100644 --- a/tests/script/tsim/stream/pauseAndResume.sim +++ b/tests/script/tsim/stream/pauseAndResume.sim @@ -336,6 +336,8 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream streams6 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 1d into streamt6 as select _wstart, count(*) c1 from st interval(10s); +sleep 1000 + sql insert into ts1 values(1648791213001,1,12,3,1.0); sql insert into ts2 values(1648791213001,1,12,3,1.0); @@ -354,6 +356,8 @@ sql insert into ts2 values(1648791233001,1,12,3,1.0); sql resume stream streams6; +sleep 1000 + sql insert into ts3 values(1648791243001,1,12,3,1.0); sql insert into ts4 values(1648791253001,1,12,3,1.0); From 4bbd858335ae89581b7b9ccd60541c6e77f3d19b Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Tue, 18 Jun 2024 14:50:43 +0800 Subject: [PATCH 13/53] docs: add ttl/comment spec for 'alter table' --- docs/en/12-taos-sql/03-table.md | 26 +++++++++++++++++++++++++- docs/zh/12-taos-sql/03-table.md | 28 ++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/docs/en/12-taos-sql/03-table.md b/docs/en/12-taos-sql/03-table.md index ca22a6ace7..f41dea9707 100644 --- a/docs/en/12-taos-sql/03-table.md +++ b/docs/en/12-taos-sql/03-table.md @@ -25,7 +25,7 @@ create_definition: col_name column_definition column_definition: - type_name [comment 'string_value'] [PRIMARY KEY] [ENCODE 'encode_type'] [COMPRESS 'compress_type'] [LEVEL 'level_type'] + type_name [comment 'string_value'] [PRIMARY KEY] [ENCODE 'encode_type'] [COMPRESS 'compress_type'] [LEVEL 'level_type'] table_options: table_option ... @@ -136,6 +136,18 @@ ALTER TABLE tb_name MODIFY COLUMN field_name data_type(length); ALTER TABLE tb_name RENAME COLUMN old_col_name new_col_name ``` +### Alter Table TTL + +```sql +ALTER TABLE tb_name TTL value +``` + +### Alter Table Comment + +```sql +ALTER TABLE tb_name COMMENT 'string_value' +``` + ## Modify a Subtable ```sql @@ -165,6 +177,18 @@ alter_table_option: { ALTER TABLE tb_name SET TAG tag_name=new_tag_value; ``` +### Alter Table TTL + +```sql +ALTER TABLE tb_name TTL value +``` + +### Alter Table Comment + +```sql +ALTER TABLE tb_name COMMENT 'string_value' +``` + ## Delete a Table The following SQL statement deletes one or more tables. diff --git a/docs/zh/12-taos-sql/03-table.md b/docs/zh/12-taos-sql/03-table.md index 773ce75430..f848bbfd80 100644 --- a/docs/zh/12-taos-sql/03-table.md +++ b/docs/zh/12-taos-sql/03-table.md @@ -23,10 +23,10 @@ create_subtable_clause: { } create_definition: - col_name column_definition + col_name column_definition column_definition: - type_name [comment 'string_value'] [PRIMARY KEY] [ENCODE 'encode_type'] [COMPRESS 'compress_type'] [LEVEL 'level_type'] + type_name [comment 'string_value'] [PRIMARY KEY] [ENCODE 'encode_type'] [COMPRESS 'compress_type'] [LEVEL 'level_type'] table_options: table_option ... @@ -136,6 +136,18 @@ ALTER TABLE tb_name MODIFY COLUMN field_name data_type(length); ALTER TABLE tb_name RENAME COLUMN old_col_name new_col_name ``` +### 修改表生命周期 + +```sql +ALTER TABLE tb_name TTL value +``` + +### 修改表注释 + +```sql +ALTER TABLE tb_name COMMENT 'string_value' +``` + ## 修改子表 ```sql @@ -165,6 +177,18 @@ alter_table_option: { ALTER TABLE tb_name SET TAG tag_name=new_tag_value; ``` +### 修改表生命周期 + +```sql +ALTER TABLE tb_name TTL value +``` + +### 修改表注释 + +```sql +ALTER TABLE tb_name COMMENT 'string_value' +``` + ## 删除表 可以在一条 SQL 语句中删除一个或多个普通表或子表。 From de19557abe8d17bcb004a714da78f9bd5cf5f452 Mon Sep 17 00:00:00 2001 From: dmchen Date: Tue, 18 Jun 2024 09:36:19 +0000 Subject: [PATCH 14/53] fix/TD-30625 --- source/dnode/mnode/impl/src/mndCompact.c | 29 ++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 75b4531dbb..341c2def0f 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -613,6 +613,19 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { sdbRelease(pMnode->pSdb, pDetail); } + SCompactObj *pCompact = mndAcquireCompact(pMnode, compactId); + if(pCompact == NULL) return 0; + + SDbObj *pDb = mndAcquireDb(pMnode, pCompact->dbname); + if(pDb == NULL){ + needSave = true; + mWarn("compact:%" PRId32 ", no db exist, set needSave:%s" , compactId, pCompact->dbname); + } + else{ + mndReleaseDb(pMnode, pDb); + pDb = NULL; + } + if(!needSave) { mDebug("compact:%" PRId32 ", no need to save" , compactId); return 0; @@ -625,8 +638,6 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { } mInfo("compact:%d, trans:%d, used to update compact progress.", compactId, pTrans->id); - SCompactObj *pCompact = mndAcquireCompact(pMnode, compactId); - mndTransSetDbName(pTrans, pCompact->dbname, NULL); pIter = NULL; @@ -657,6 +668,7 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { } bool allFinished = true; + pIter = NULL; while (1) { SCompactDetailObj *pDetail = NULL; pIter = sdbFetch(pMnode->pSdb, SDB_COMPACT_DETAIL, pIter, (void **)&pDetail); @@ -682,8 +694,19 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { sdbRelease(pMnode->pSdb, pDetail); } + pDb = mndAcquireDb(pMnode, pCompact->dbname); + if(pDb == NULL){ + allFinished = true; + mWarn("compact:%" PRId32 ", no db exist, set all finished:%s" , compactId, pCompact->dbname); + } + else{ + mndReleaseDb(pMnode, pDb); + pDb = NULL; + } + if(allFinished){ mInfo("compact:%d, all finished", pCompact->compactId); + pIter = NULL; while (1) { SCompactDetailObj *pDetail = NULL; pIter = sdbFetch(pMnode->pSdb, SDB_COMPACT_DETAIL, pIter, (void **)&pDetail); @@ -697,6 +720,7 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { return -1; } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED); + mInfo("compact:%d, add drop compactdetail action", pDetail->compactDetailId); } sdbRelease(pMnode->pSdb, pDetail); @@ -709,6 +733,7 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { return -1; } (void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED); + mInfo("compact:%d, add drop compact action", pCompact->compactId); } if (mndTransPrepare(pMnode, pTrans) != 0) { From 7cccaa12d892dfbe75e68c91994befb2b6fd7ce0 Mon Sep 17 00:00:00 2001 From: Shungang Li Date: Tue, 18 Jun 2024 17:48:26 +0800 Subject: [PATCH 15/53] docs: add more info for 'alter table' --- docs/en/12-taos-sql/03-table.md | 14 ++++++++++++-- docs/zh/12-taos-sql/03-table.md | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/en/12-taos-sql/03-table.md b/docs/en/12-taos-sql/03-table.md index f41dea9707..487ce92e03 100644 --- a/docs/en/12-taos-sql/03-table.md +++ b/docs/en/12-taos-sql/03-table.md @@ -52,9 +52,9 @@ table_option: { **Parameter description** -1. COMMENT: specifies comments for the table. This parameter can be used with supertables, standard tables, and subtables. +1. COMMENT: specifies comments for the table. This parameter can be used with supertables, standard tables, and subtables. The maximum length of the comment is 1024 bytes. 2. SMA: specifies functions on which to enable small materialized aggregates (SMA). SMA is user-defined precomputation of aggregates based on data blocks. Enter one of the following values: max, min, or sum This parameter can be used with supertables and standard tables. -3. TTL: specifies the time to live (TTL) for the table. If TTL is specified when creatinga table, after the time period for which the table has been existing is over TTL, TDengine will automatically delete the table. Please be noted that the system may not delete the table at the exact moment that the TTL expires but guarantee there is such a system and finally the table will be deleted. The unit of TTL is in days. The default value is 0, i.e. never expire. +3. TTL: specifies the time to live (TTL) for the table. If TTL is specified when creatinga table, after the time period for which the table has been existing is over TTL, TDengine will automatically delete the table. Please be noted that the system may not delete the table at the exact moment that the TTL expires but guarantee there is such a system and finally the table will be deleted. The unit of TTL is in days. The value range is [0, 2147483647]. The default value is 0, i.e. never expire. ## Create Subtables @@ -112,6 +112,11 @@ You can perform the following modifications on existing tables: 4. RENAME COLUMN: renames a specified column in the table. 5. The primary key column of a table cannot be modified or added or deleted using ADD/DROP COLUMN. +**Parameter description** + +1. COMMENT: specifies comments for the table. This parameter can be used with supertables, standard tables, and subtables. The maximum length of the comment is 1024 bytes. +2. TTL: specifies the time to live (TTL) for the table. If TTL is specified when creatinga table, after the time period for which the table has been existing is over TTL, TDengine will automatically delete the table. Please be noted that the system may not delete the table at the exact moment that the TTL expires but guarantee there is such a system and finally the table will be deleted. The unit of TTL is in days. The value range is [0, 2147483647]. The default value is 0, i.e. never expire. + ### Add a Column ```sql @@ -171,6 +176,11 @@ alter_table_option: { 1. Only the value of a tag can be modified directly. For all other modifications, you must modify the supertable from which the subtable was created. +**Parameter description** + +1. COMMENT: specifies comments for the table. This parameter can be used with supertables, standard tables, and subtables. The maximum length of the comment is 1024 bytes. +2. TTL: specifies the time to live (TTL) for the table. If TTL is specified when creatinga table, after the time period for which the table has been existing is over TTL, TDengine will automatically delete the table. Please be noted that the system may not delete the table at the exact moment that the TTL expires but guarantee there is such a system and finally the table will be deleted. The unit of TTL is in days. The value range is [0, 2147483647]. The default value is 0, i.e. never expire. + ### Change Tag Value Of Sub Table ``` diff --git a/docs/zh/12-taos-sql/03-table.md b/docs/zh/12-taos-sql/03-table.md index f848bbfd80..09580fb788 100644 --- a/docs/zh/12-taos-sql/03-table.md +++ b/docs/zh/12-taos-sql/03-table.md @@ -52,9 +52,9 @@ table_option: { **参数说明** -1. COMMENT:表注释。可用于超级表、子表和普通表。 +1. COMMENT:表注释。可用于超级表、子表和普通表。最大长度为 1024 个字节。 2. SMA:Small Materialized Aggregates,提供基于数据块的自定义预计算功能。预计算类型包括 MAX、MIN 和 SUM。可用于超级表/普通表。 -3. TTL:Time to Live,是用户用来指定表的生命周期的参数。如果创建表时指定了这个参数,当该表的存在时间超过 TTL 指定的时间后,TDengine 自动删除该表。这个 TTL 的时间只是一个大概时间,系统不保证到了时间一定会将其删除,而只保证存在这样一个机制且最终一定会删除。TTL 单位是天,默认为 0,表示不限制,到期时间为表创建时间加上 TTL 时间。TTL 与数据库 KEEP 参数没有关联,如果 KEEP 比 TTL 小,在表被删除之前数据也可能已经被删除。 +3. TTL:Time to Live,是用户用来指定表的生命周期的参数。如果创建表时指定了这个参数,当该表的存在时间超过 TTL 指定的时间后,TDengine 自动删除该表。这个 TTL 的时间只是一个大概时间,系统不保证到了时间一定会将其删除,而只保证存在这样一个机制且最终一定会删除。TTL 单位是天,取值范围为[0, 2147483647],默认为 0,表示不限制,到期时间为表创建时间加上 TTL 时间。TTL 与数据库 KEEP 参数没有关联,如果 KEEP 比 TTL 小,在表被删除之前数据也可能已经被删除。 ## 创建子表 @@ -112,6 +112,11 @@ alter_table_option: { 4. RENAME COLUMN:修改列名称。 5. 普通表的主键列不能被修改,也不能通过 ADD/DROP COLUMN 来添加/删除主键列。 +**参数说明** + +1. COMMENT:表注释。可用于超级表、子表和普通表。最大长度为 1024 个字节。 +2. TTL:Time to Live,是用户用来指定表的生命周期的参数。如果创建表时指定了这个参数,当该表的存在时间超过 TTL 指定的时间后,TDengine 自动删除该表。这个 TTL 的时间只是一个大概时间,系统不保证到了时间一定会将其删除,而只保证存在这样一个机制且最终一定会删除。TTL 单位是天,取值范围为[0, 2147483647],默认为 0,表示不限制,到期时间为表创建时间加上 TTL 时间。TTL 与数据库 KEEP 参数没有关联,如果 KEEP 比 TTL 小,在表被删除之前数据也可能已经被删除。 + ### 增加列 ```sql @@ -171,6 +176,11 @@ alter_table_option: { 1. 对子表的列和标签的修改,除了更改标签值以外,都要通过超级表才能进行。 +**参数说明** + +1. COMMENT:表注释。可用于超级表、子表和普通表。最大长度为 1024 个字节。 +2. TTL:Time to Live,是用户用来指定表的生命周期的参数。如果创建表时指定了这个参数,当该表的存在时间超过 TTL 指定的时间后,TDengine 自动删除该表。这个 TTL 的时间只是一个大概时间,系统不保证到了时间一定会将其删除,而只保证存在这样一个机制且最终一定会删除。TTL 单位是天,取值范围为[0, 2147483647],默认为 0,表示不限制,到期时间为表创建时间加上 TTL 时间。TTL 与数据库 KEEP 参数没有关联,如果 KEEP 比 TTL 小,在表被删除之前数据也可能已经被删除。 + ### 修改子表标签值 ``` From 6d2b8fe2bf3be692ac675c5267611e82636627e0 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 18 Jun 2024 19:08:00 +0800 Subject: [PATCH 16/53] tfs: support disable create new file --- include/util/tdef.h | 4 ++-- source/libs/tfs/inc/tfsInt.h | 3 ++- source/libs/tfs/src/tfs.c | 5 ----- source/libs/tfs/src/tfsDisk.c | 3 ++- source/libs/tfs/src/tfsTier.c | 10 +++++++-- tests/system-test/0-others/multilevel.py | 26 ++++++++++++------------ 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/include/util/tdef.h b/include/util/tdef.h index a7ebb4da22..9e61ec8fe6 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -548,8 +548,8 @@ enum { ENCRYPT_KEY_STAT_UNKNOWN = 0, ENCRYPT_KEY_STAT_UNSET, ENCRYPT_KEY_STAT_SE typedef struct { char dir[TSDB_FILENAME_LEN]; int32_t level; - int8_t primary; - int8_t disable; // disable create new file + int32_t primary; + int8_t disable; // disable create new file } SDiskCfg; typedef struct { diff --git a/source/libs/tfs/inc/tfsInt.h b/source/libs/tfs/inc/tfsInt.h index 713f548e9e..b3bde3abba 100644 --- a/source/libs/tfs/inc/tfsInt.h +++ b/source/libs/tfs/inc/tfsInt.h @@ -38,6 +38,7 @@ typedef struct { int32_t level; int32_t id; + int8_t disable; // disable create new file char *path; SDiskSize size; } STfsDisk; @@ -73,7 +74,7 @@ typedef struct STfs { SHashObj *hash; // name to did map } STfs; -STfsDisk *tfsNewDisk(int32_t level, int32_t id, const char *dir); +STfsDisk *tfsNewDisk(int32_t level, int32_t id, int8_t disable, const char *dir); STfsDisk *tfsFreeDisk(STfsDisk *pDisk); int32_t tfsUpdateDiskSize(STfsDisk *pDisk); diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index ac1fe40f24..4110652f6f 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -494,11 +494,6 @@ static int32_t tfsMount(STfs *pTfs, SDiskCfg *pCfg) { return -1; } - if (pCfg->disable == 1 && pCfg->primary != 1) { - fInfo("skip to mount disk %s to level %d since disable is %" PRIi8, pCfg->dir, pCfg->level, pCfg->disable); - return 0; - } - SDiskID did = {.level = pCfg->level}; STfsDisk *pDisk = tfsMountDiskToTier(TFS_TIER_AT(pTfs, did.level), pCfg); if (pDisk == NULL) { diff --git a/source/libs/tfs/src/tfsDisk.c b/source/libs/tfs/src/tfsDisk.c index 3717bf1a6d..06eb1cd42e 100644 --- a/source/libs/tfs/src/tfsDisk.c +++ b/source/libs/tfs/src/tfsDisk.c @@ -16,7 +16,7 @@ #define _DEFAULT_SOURCE #include "tfsInt.h" -STfsDisk *tfsNewDisk(int32_t level, int32_t id, const char *path) { +STfsDisk *tfsNewDisk(int32_t level, int32_t id, int8_t disable, const char *path) { STfsDisk *pDisk = taosMemoryCalloc(1, sizeof(STfsDisk)); if (pDisk == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -32,6 +32,7 @@ STfsDisk *tfsNewDisk(int32_t level, int32_t id, const char *path) { pDisk->level = level; pDisk->id = id; + pDisk->disable = disable; taosGetDiskSize(pDisk->path, &pDisk->size); return pDisk; } diff --git a/source/libs/tfs/src/tfsTier.c b/source/libs/tfs/src/tfsTier.c index 911fdc52b7..cb79c334bf 100644 --- a/source/libs/tfs/src/tfsTier.c +++ b/source/libs/tfs/src/tfsTier.c @@ -65,7 +65,7 @@ STfsDisk *tfsMountDiskToTier(STfsTier *pTier, SDiskCfg *pCfg) { return NULL; } - STfsDisk *pDisk = tfsNewDisk(pCfg->level, id, pCfg->dir); + STfsDisk *pDisk = tfsNewDisk(pCfg->level, id, pCfg->disable, pCfg->dir); if (pDisk == NULL) return NULL; pTier->disks[id] = pDisk; @@ -89,7 +89,7 @@ void tfsUpdateTierSize(STfsTier *pTier) { size.total += pDisk->size.total; size.used += pDisk->size.used; size.avail += pDisk->size.avail; - nAvailDisks++; + if (pDisk->disable == 0) nAvailDisks++; } pTier->size = size; @@ -118,6 +118,12 @@ int32_t tfsAllocDiskOnTier(STfsTier *pTier) { if (pDisk == NULL) continue; + if (pDisk->disable == 1) { + uTrace("disk %s is disabled and skip it, level:%d id:%d disable:%" PRIi8, pDisk->path, pDisk->level, pDisk->id, + pDisk->disable); + continue; + } + if (pDisk->size.avail < tsMinDiskFreeSize) { uInfo("disk %s is full and skip it, level:%d id:%d free size:%" PRId64 " min free size:%" PRId64, pDisk->path, pDisk->level, pDisk->id, pDisk->size.avail, tsMinDiskFreeSize); diff --git a/tests/system-test/0-others/multilevel.py b/tests/system-test/0-others/multilevel.py index aaecbae50e..7e657fd3ba 100644 --- a/tests/system-test/0-others/multilevel.py +++ b/tests/system-test/0-others/multilevel.py @@ -52,7 +52,7 @@ class TDTestCase: tdLog.info("============== basic test ===============") cfg={ '/mnt/data1' : 'dataDir', - '/mnt/data2 0 0' : 'dataDir' + '/mnt/data2 0 0 0' : 'dataDir' } tdSql.createDir('/mnt/data1') tdSql.createDir('/mnt/data2') @@ -112,9 +112,9 @@ class TDTestCase: cfg={ '/mnt/data00 0 1' : 'dataDir', '/mnt/data01 0 0' : 'dataDir', - '/mnt/data02 0 0' : 'dataDir', + '/mnt/data02 0 0 0' : 'dataDir', '/mnt/data03 0 0' : 'dataDir', - '/mnt/data04 0 0' : 'dataDir' + '/mnt/data04 0 0 0' : 'dataDir' } dir_list = ['/mnt/data00','/mnt/data01','/mnt/data02','/mnt/data03','/mnt/data04'] for i in dir_list: @@ -160,15 +160,15 @@ class TDTestCase: tdDnodes.stop(1) # Test1 1 dataDir cfg={ - '/mnt/data000 0 1' : 'dataDir', + '/mnt/data000 0 1 0' : 'dataDir', '/mnt/data001 0 0' : 'dataDir', - '/mnt/data002 0 0' : 'dataDir', + '/mnt/data002 0 0 0' : 'dataDir', '/mnt/data010 1 0' : 'dataDir', - '/mnt/data011 1 0' : 'dataDir', + '/mnt/data011 1 0 0' : 'dataDir', '/mnt/data012 1 0' : 'dataDir', - '/mnt/data020 2 0' : 'dataDir', - '/mnt/data021 2 0' : 'dataDir', - '/mnt/data022 2 0' : 'dataDir' + '/mnt/data020 2 0 0' : 'dataDir', + '/mnt/data021 2 0 0' : 'dataDir', + '/mnt/data022 2 0 0' : 'dataDir' } dir_list = ['/mnt/data000','/mnt/data001','/mnt/data002','/mnt/data010','/mnt/data011','/mnt/data012','/mnt/data020','/mnt/data021''/mnt/data022'] for i in dir_list: @@ -189,7 +189,7 @@ class TDTestCase: if i == 0 : datadir = '/mnt/data%d 0 1' % (i+1) else: - datadir = '/mnt/data%d 0 0' % (i+1) + datadir = '/mnt/data%d 0 0 0' % (i+1) cfg.update({ datadir : 'dataDir' }) tdSql.createDir('/mnt/data%d' % (i+1)) @@ -250,9 +250,9 @@ class TDTestCase: tdDnodes.stop(1) cfg={ '/mnt/data1 0 1' : 'dataDir', - '/mnt/data2 1 0 1' : 'dataDir', - '/mnt/data3 1 0 0' : 'dataDir', - '/mnt/data4 1 0' : 'dataDir', + '/mnt/data2 1 0 0' : 'dataDir', + '/mnt/data3 1 0 1' : 'dataDir', + '/mnt/data4 2 0' : 'dataDir', } tdSql.createDir('/mnt/data2') tdSql.createDir('/mnt/data3') From 4c410086576362fa342cb6b5e54d4ee1175eca12 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 18 Jun 2024 19:11:33 +0800 Subject: [PATCH 17/53] fix: print format --- source/libs/tfs/src/tfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index 4110652f6f..97feee7d9a 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -520,7 +520,7 @@ static int32_t tfsCheckAndFormatCfg(STfs *pTfs, SDiskCfg *pCfg) { } if (pCfg->primary < 0 || pCfg->primary > 1) { - fError("failed to mount %s to FS since invalid primary %" PRIi8, pCfg->dir, pCfg->primary); + fError("failed to mount %s to FS since invalid primary %d", pCfg->dir, pCfg->primary); terrno = TSDB_CODE_FS_INVLD_CFG; return -1; } From f0cbf11ac7add261acdc22939466c9463420a5a1 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 18 Jun 2024 19:39:57 +0800 Subject: [PATCH 18/53] fix: double covert ulong warning --- utils/TSZ/sz/src/sz_double.c | 4 ++-- utils/TSZ/sz/src/sz_float.c | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/utils/TSZ/sz/src/sz_double.c b/utils/TSZ/sz/src/sz_double.c index 0510fc612d..7fe5a07843 100644 --- a/utils/TSZ/sz/src/sz_double.c +++ b/utils/TSZ/sz/src/sz_double.c @@ -385,11 +385,11 @@ unsigned int optimize_intervals_double_1D_opt(double *oriData, size_t dataLength totalSampleSize++; pred_value = data_pos[-1]; pred_err = fabs(pred_value - *data_pos); - double dbri = (unsigned long)((pred_err/realPrecision+1)/2); + double dbri = (pred_err/realPrecision+1)/2; if(dbri >= (double)confparams_cpr->maxRangeRadius) radiusIndex = confparams_cpr->maxRangeRadius - 1; else - radiusIndex = dbri; + radiusIndex = (size_t)dbri; intervals[radiusIndex]++; data_pos += confparams_cpr->sampleDistance; diff --git a/utils/TSZ/sz/src/sz_float.c b/utils/TSZ/sz/src/sz_float.c index 4b18eb6ee8..e5dc40f003 100644 --- a/utils/TSZ/sz/src/sz_float.c +++ b/utils/TSZ/sz/src/sz_float.c @@ -53,9 +53,12 @@ unsigned int optimize_intervals_float_1D(float *oriData, size_t dataLength, doub //pred_value = 2*oriData[i-1] - oriData[i-2]; pred_value = oriData[i-1]; pred_err = fabs(pred_value - oriData[i]); - radiusIndex = (unsigned long)((pred_err/realPrecision+1)/2); - if(radiusIndex>=confparams_cpr->maxRangeRadius) - radiusIndex = confparams_cpr->maxRangeRadius - 1; + double dbri = (pred_err/realPrecision+1)/2; + if(dbri >= confparams_cpr->maxRangeRadius) { + radiusIndex = confparams_cpr->maxRangeRadius - 1; + } else { + radiusIndex = (size_t)dbri; + } intervals[radiusIndex]++; } } @@ -404,9 +407,12 @@ unsigned int optimize_intervals_float_1D_opt(float *oriData, size_t dataLength, totalSampleSize++; pred_value = data_pos[-1]; pred_err = fabs(pred_value - *data_pos); - radiusIndex = (unsigned long)((pred_err/realPrecision+1)/2); - if(radiusIndex>=confparams_cpr->maxRangeRadius) - radiusIndex = confparams_cpr->maxRangeRadius - 1; + double dbri = (pred_err/realPrecision+1)/2; + if(dbri >= confparams_cpr->maxRangeRadius) { + radiusIndex = confparams_cpr->maxRangeRadius - 1; + } else { + radiusIndex = (size_t)dbri; + } intervals[radiusIndex]++; data_pos += confparams_cpr->sampleDistance; From 2534ce5071c808943d6b3b7619b0080254f61f85 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 19 Jun 2024 10:29:01 +0800 Subject: [PATCH 19/53] fix(stream): fix a typo. --- include/libs/executor/storageapi.h | 2 +- include/libs/stream/streamState.h | 3 +-- source/dnode/vnode/src/sma/smaRollup.c | 2 +- source/dnode/vnode/src/tqCommon/tqCommon.c | 2 +- source/libs/stream/src/streamState.c | 3 +-- source/libs/stream/test/backendTest.cpp | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/libs/executor/storageapi.h b/include/libs/executor/storageapi.h index 8c67f77adb..1b2280115a 100644 --- a/include/libs/executor/storageapi.h +++ b/include/libs/executor/storageapi.h @@ -410,7 +410,7 @@ typedef struct SStateStore { void (*streamFileStateClear)(struct SStreamFileState* pFileState); bool (*needClearDiskBuff)(struct SStreamFileState* pFileState); - SStreamState* (*streamStateOpen)(const char* path, void* pTask, int64_t streamId, int32_t taskId, bool specPath, int32_t szPage, int32_t pages); + SStreamState* (*streamStateOpen)(const char* path, void* pTask, int64_t streamId, int32_t taskId); void (*streamStateClose)(SStreamState* pState, bool remove); int32_t (*streamStateBegin)(SStreamState* pState); int32_t (*streamStateCommit)(SStreamState* pState); diff --git a/include/libs/stream/streamState.h b/include/libs/stream/streamState.h index 1333257dfb..106efa8947 100644 --- a/include/libs/stream/streamState.h +++ b/include/libs/stream/streamState.h @@ -29,8 +29,7 @@ extern "C" { #include "storageapi.h" -SStreamState* streamStateOpen(const char* path, void* pTask, int64_t streamId, int32_t taskId, bool specPath, - int32_t szPage, int32_t pages); +SStreamState* streamStateOpen(const char* path, void* pTask, int64_t streamId, int32_t taskId); void streamStateClose(SStreamState* pState, bool remove); int32_t streamStateBegin(SStreamState* pState); int32_t streamStateCommit(SStreamState* pState); diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index ac5463e492..81bb519b27 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -299,7 +299,7 @@ static int32_t tdSetRSmaInfoItemParams(SSma *pSma, SRSmaParam *param, SRSmaStat tdRSmaTaskInit(pStreamTask->pMeta, pItem, &pStreamTask->id); pStreamTask->status.pSM = streamCreateStateMachine(pStreamTask); pStreamTask->chkInfo.pActiveInfo = streamTaskCreateActiveChkptInfo(); - pStreamState = streamStateOpen(taskInfDir, pStreamTask, pStreamTask->id.streamId, pStreamTask->id.taskId, true, -1, -1); + pStreamState = streamStateOpen(taskInfDir, pStreamTask, pStreamTask->id.streamId, pStreamTask->id.taskId); if (!pStreamState) { terrno = TSDB_CODE_RSMA_STREAM_STATE_OPEN; return TSDB_CODE_FAILED; diff --git a/source/dnode/vnode/src/tqCommon/tqCommon.c b/source/dnode/vnode/src/tqCommon/tqCommon.c index 963503c135..50a52e58c5 100644 --- a/source/dnode/vnode/src/tqCommon/tqCommon.c +++ b/source/dnode/vnode/src/tqCommon/tqCommon.c @@ -49,7 +49,7 @@ int32_t tqExpandStreamTask(SStreamTask* pTask) { // sink task does not need the pState if (pTask->info.taskLevel != TASK_LEVEL__SINK) { - pTask->pState = streamStateOpen(pMeta->path, pTask, false, streamId, taskId, -1, -1); + pTask->pState = streamStateOpen(pMeta->path, pTask, streamId, taskId); if (pTask->pState == NULL) { tqError("s-task:%s (vgId:%d) failed to open state for task, expand task failed", pTask->id.idStr, vgId); return -1; diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 8919bd48ac..e87d812a92 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -98,8 +98,7 @@ int stateKeyCmpr(const void* pKey1, int kLen1, const void* pKey2, int kLen2) { return winKeyCmprImpl(&pWin1->key, &pWin2->key); } -SStreamState* streamStateOpen(const char* path, void* pTask, int64_t streamId, int32_t taskId, bool specPath, - int32_t szPage, int32_t pages) { +SStreamState* streamStateOpen(const char* path, void* pTask, int64_t streamId, int32_t taskId) { SStreamState* pState = taosMemoryCalloc(1, sizeof(SStreamState)); stDebug("open stream state %p, %s", pState, path); if (pState == NULL) { diff --git a/source/libs/stream/test/backendTest.cpp b/source/libs/stream/test/backendTest.cpp index e6a508f6f7..2fb257fe4e 100644 --- a/source/libs/stream/test/backendTest.cpp +++ b/source/libs/stream/test/backendTest.cpp @@ -46,7 +46,7 @@ SStreamState *stateCreate(const char *path) { SStreamMeta *pMeta = streamMetaOpen((path), NULL, NULL, NULL, 0, 0, NULL); pTask->pMeta = pMeta; - SStreamState *p = streamStateOpen((char *)path, pTask, 0, 0, true, 32, 32 * 1024); + SStreamState *p = streamStateOpen((char *)path, pTask, 0, 0); ASSERT(p != NULL); return p; } From c130b0e04c614ea63cdc5f4909046c2689034ae3 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 19 Jun 2024 10:45:01 +0800 Subject: [PATCH 20/53] feat: add export buildInfo api --- include/client/taos.h | 2 +- source/util/src/version.c.in | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/client/taos.h b/include/client/taos.h index a22c8e5138..1d2b3a913c 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -366,7 +366,7 @@ typedef enum { } TSDB_SERVER_STATUS; DLL_EXPORT TSDB_SERVER_STATUS taos_check_server_status(const char *fqdn, int port, char *details, int maxlen); - +DLL_EXPORT char* getBuildInfo(); #ifdef __cplusplus } #endif diff --git a/source/util/src/version.c.in b/source/util/src/version.c.in index 2446bf9278..07bb1d42f8 100644 --- a/source/util/src/version.c.in +++ b/source/util/src/version.c.in @@ -5,3 +5,6 @@ char gitinfoOfInternal[48] = "${TD_VER_GIT_INTERNAL}"; char buildinfo[64] = "${TD_VER_OSTYPE}-${TD_VER_CPUTYPE} ${TD_VER_DATE}"; void libtaos_${TD_LIB_VER_NUMBER}_${TD_VER_OSTYPE}_${TD_VER_CPUTYPE}_${TD_VER_VERTYPE}() {}; +char* getBuildInfo(){ + return buildinfo; +} From 6e2a5b9292c30eab74f9414fa510cb58502abbbd Mon Sep 17 00:00:00 2001 From: Kai Jiang Date: Tue, 23 Jan 2024 15:14:04 +0800 Subject: [PATCH 21/53] Improve tsDecompressIntImpl_Hw performance with AVX512. Signed-off-by: Kai Jiang Huanrui Zhang --- cmake/cmake.define | 12 ++-- source/util/src/tdecompress.c | 110 +++++++++++++++++++++++++++++----- 2 files changed, 102 insertions(+), 20 deletions(-) diff --git a/cmake/cmake.define b/cmake/cmake.define index 12e1b50539..735735f0cc 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -181,12 +181,12 @@ ELSE () ENDIF() MESSAGE(STATUS "SIMD instructions (FMA/AVX/AVX2) is ACTIVATED") -# IF (COMPILER_SUPPORT_AVX512F AND COMPILER_SUPPORT_AVX512BMI) -# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512f -mavx512vbmi") -# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -mavx512vbmi") -# MESSAGE(STATUS "avx512f/avx512bmi supported by compiler") -# ENDIF() -# + IF (COMPILER_SUPPORT_AVX512F AND COMPILER_SUPPORT_AVX512BMI) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512f -mavx512vbmi") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -mavx512vbmi") + MESSAGE(STATUS "avx512f/avx512bmi supported by compiler") + ENDIF() + # IF (COMPILER_SUPPORT_AVX512VL) # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512vl") # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512vl") diff --git a/source/util/src/tdecompress.c b/source/util/src/tdecompress.c index f212bf5231..d3cb3118d2 100644 --- a/source/util/src/tdecompress.c +++ b/source/util/src/tdecompress.c @@ -52,7 +52,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, int32_t _pos = 0; int64_t prevValue = 0; -#if __AVX2__ +#if __AVX2__ || __AVX512F__ while (_pos < nelements) { uint64_t w = *(uint64_t*) ip; @@ -72,10 +72,33 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, int32_t gRemainder = (nelements - _pos); int32_t num = (gRemainder > elems)? elems:gRemainder; - int32_t batch = num >> 2; - int32_t remain = num & 0x03; + int32_t batch = 0; + int32_t remain = 0; + if (tsSIMDEnable && tsAVX512Enable) { +#if __AVX512F__ + batch = num >> 3; + remain = num & 0x07; +#endif + } else if (tsSIMDEnable && tsAVX2Enable) { +#if __AVX2__ + batch = num >> 2; + remain = num & 0x03; +#endif + } + if (selector == 0 || selector == 1) { - if (tsSIMDEnable && tsAVX2Enable) { + if (tsSIMDEnable && tsAVX512Enable) { +#if __AVX512F__ + for (int32_t i = 0; i < batch; ++i) { + __m512i prev = _mm512_set1_epi64(prevValue); + _mm512_storeu_si512((__m512i *)&p[_pos], prev); + _pos += 8; //handle 64bit x 8 = 512bit + } + for (int32_t i = 0; i < remain; ++i) { + p[_pos++] = prevValue; + } +#endif + } else if (tsSIMDEnable && tsAVX2Enable) { for (int32_t i = 0; i < batch; ++i) { __m256i prev = _mm256_set1_epi64x(prevValue); _mm256_storeu_si256((__m256i *)&p[_pos], prev); @@ -85,10 +108,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, for (int32_t i = 0; i < remain; ++i) { p[_pos++] = prevValue; } - } else if (tsSIMDEnable && tsAVX512Enable) { -#if __AVX512F__ - // todo add avx512 impl -#endif + } else { // alternative implementation without SIMD instructions. for (int32_t i = 0; i < elems && count < nelements; i++, count++) { p[_pos++] = prevValue; @@ -96,7 +116,73 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, } } } else { - if (tsSIMDEnable && tsAVX2Enable) { + if (tsSIMDEnable && tsAVX512Enable) { + #if __AVX512F__ + __m512i sum_mask1 = _mm512_set_epi64(6, 6, 4, 4, 2, 2, 0, 0); + __m512i sum_mask2 = _mm512_set_epi64(5, 5, 5, 5, 1, 1, 1, 1); + __m512i sum_mask3 = _mm512_set_epi64(3, 3, 3, 3, 3, 3, 3, 3); + __m512i base = _mm512_set1_epi64(w); + __m512i maskVal = _mm512_set1_epi64(mask); + __m512i shiftBits = _mm512_set_epi64(bit * 7 + 4, bit * 6 + 4, bit * 5 + 4, bit * 4 + 4, bit * 3 + 4, bit * 2 + 4, bit + 4, 4); + __m512i inc = _mm512_set1_epi64(bit << 3); + + for (int32_t i = 0; i < batch; ++i) { + + __m512i after = _mm512_srlv_epi64(base, shiftBits); + __m512i zigzagVal = _mm512_and_si512(after, maskVal); + + // ZIGZAG_DECODE(T, v) (((v) >> 1) ^ -((T)((v)&1))) + __m512i signmask = _mm512_and_si512(_mm512_set1_epi64(1), zigzagVal); + signmask = _mm512_sub_epi64(_mm512_setzero_si512(), signmask); + __m512i delta = _mm512_xor_si512(_mm512_srli_epi64(zigzagVal, 1), signmask); + + // calculate the cumulative sum (prefix sum) for each number + // decode[0] = prevValue + final[0] + // decode[1] = decode[0] + final[1] -----> prevValue + final[0] + final[1] + // decode[2] = decode[1] + final[2] -----> prevValue + final[0] + final[1] + final[2] + // decode[3] = decode[2] + final[3] -----> prevValue + final[0] + final[1] + final[2] + final[3] + + + //7 6 5 4 3 2 1 0 + //D7 D6 D5 D4 D3 D2 D1 D0 + //D6 0 D4 0 D2 0 D0 0 + //D7+D6 D6 D5+D4 D4 D3+D2 D2 D1+D0 D0 + //13 6 9 4 5 2 1 0 + __m512i prev = _mm512_set1_epi64(prevValue); + __m512i cum_sum = _mm512_add_epi64(delta, _mm512_maskz_permutexvar_epi64(0xaa, sum_mask1, delta)); + cum_sum = _mm512_add_epi64(cum_sum, _mm512_maskz_permutexvar_epi64(0xcc, sum_mask2, cum_sum)); + cum_sum = _mm512_add_epi64(cum_sum, _mm512_maskz_permutexvar_epi64(0xf0, sum_mask3, cum_sum)); + + + + //13 6 9 4 5 2 1 0 + //D7,D6 D6 D5,D4 D4 D3,D2 D2 D1,D0 D0 + //+D5,D4 D5,D4, 0 0 D1,D0 D1,D0 0 0 + //D7~D4 D6~D4 D5~D4 D4 D3~D0 D2~D0 D1~D0 D0 + //22 15 9 4 6 3 1 0 + // + //D3~D0 D3~D0 D3~D0 D3~D0 0 0 0 0 + //28 21 15 10 6 3 1 0 + + + cum_sum = _mm512_add_epi64(cum_sum, prev); + _mm512_storeu_si512((__m512i *)&p[_pos], cum_sum); + + shiftBits = _mm512_add_epi64(shiftBits, inc); + prevValue = p[_pos + 7]; + _pos += 8; + + } + // handle the remain value + for (int32_t i = 0; i < remain; i++) { + zigzag_value = ((w >> (v + (batch * bit * 8))) & mask); + prevValue += ZIGZAG_DECODE(int64_t, zigzag_value); + + p[_pos++] = prevValue; + v += bit; + } +#endif + } else if (tsSIMDEnable && tsAVX2Enable) { __m256i base = _mm256_set1_epi64x(w); __m256i maskVal = _mm256_set1_epi64x(mask); @@ -157,10 +243,6 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, p[_pos++] = prevValue; v += bit; } - } else if (tsSIMDEnable && tsAVX512Enable) { -#if __AVX512F__ - // todo add avx512 impl -#endif } else { // alternative implementation without SIMD instructions. for (int32_t i = 0; i < elems && count < nelements; i++, count++) { zigzag_value = ((w >> v) & mask); @@ -507,4 +589,4 @@ int32_t tsDecompressTimestampAvx512(const char *const input, const int32_t nelem #endif return 0; -} \ No newline at end of file +} From 04281bcd07388b21255e433002b9178f2e8a5005 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 19 Jun 2024 15:06:09 +0800 Subject: [PATCH 22/53] fix(util): uncomment the timestamp decode function with AVX2 instructions, and do some internal refactor. --- cmake/cmake.define | 14 +++--- include/os/osEnv.h | 7 +-- source/client/test/clientTests.cpp | 9 +--- source/common/src/tglobal.c | 7 +-- source/libs/function/src/detail/tminmax.c | 6 +-- source/os/src/osEnv.c | 7 +-- source/os/src/osSysinfo.c | 2 +- source/util/src/tcompression.c | 10 ++--- source/util/src/tdecompress.c | 21 ++++----- source/util/test/decompressTest.cpp | 54 ++++++++++++++++++++++- 10 files changed, 92 insertions(+), 45 deletions(-) diff --git a/cmake/cmake.define b/cmake/cmake.define index 735735f0cc..f1a5cef67e 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -180,18 +180,20 @@ ELSE () SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2") ENDIF() MESSAGE(STATUS "SIMD instructions (FMA/AVX/AVX2) is ACTIVATED") + ENDIF() + IF ("${SIMD_AVX512_SUPPORT}" MATCHES "true") IF (COMPILER_SUPPORT_AVX512F AND COMPILER_SUPPORT_AVX512BMI) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512f -mavx512vbmi") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f -mavx512vbmi") - MESSAGE(STATUS "avx512f/avx512bmi supported by compiler") + MESSAGE(STATUS "avx512f/avx512bmi enabled by compiler") ENDIF() -# IF (COMPILER_SUPPORT_AVX512VL) -# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512vl") -# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512vl") -# MESSAGE(STATUS "avx512vl supported by compiler") -# ENDIF() + IF (COMPILER_SUPPORT_AVX512VL) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512vl") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512vl") + MESSAGE(STATUS "avx512vl enabled by compiler") + ENDIF() ENDIF() # build mode diff --git a/include/os/osEnv.h b/include/os/osEnv.h index ac4ecd4212..e3e5da59f5 100644 --- a/include/os/osEnv.h +++ b/include/os/osEnv.h @@ -39,9 +39,10 @@ extern char *tsProcPath; extern char tsSIMDEnable; extern char tsSSE42Enable; extern char tsAVXEnable; -extern char tsAVX2Enable; -extern char tsFMAEnable; -extern char tsAVX512Enable; +extern char tsAVX2Supported; +extern char tsFMASupported; +extern char tsAVX512Supported; +extern char tsAVX512Enable; extern char tsTagFilterCache; extern char configDir[]; diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index b5bad92dc4..bbd759b3d1 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -828,12 +828,8 @@ TEST(clientCase, projection_query_tables) { // printf("error in create db, reason:%s\n", taos_errstr(pRes)); // } // taos_free_result(pRes); -/* - TAOS_RES* pRes = taos_query(pConn, "select last(ts), ts from cache_1.t1"); -// pRes = taos_query(pConn, "select last(ts), ts from cache_1.no_pk_t1"); - if (taos_errno(pRes) != 0) { - printf("failed to create table tu, reason:%s\n", taos_errstr(pRes)); - } + + pRes= taos_query(pConn, "use abc1"); taos_free_result(pRes); pRes = taos_query(pConn, "create table tu using st2 tags(2)"); @@ -868,7 +864,6 @@ TEST(clientCase, projection_query_tables) { createNewTable(pConn, i, 100000, 0, pstr); } } -*/ pRes = taos_query(pConn, "select * from abc1.st2"); if (taos_errno(pRes) != 0) { diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index c68dc85c29..5b0361f8ca 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -596,10 +596,11 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) { if (cfgAddBool(pCfg, "ssd42", tsSSE42Enable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "avx", tsAVXEnable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; - if (cfgAddBool(pCfg, "avx2", tsAVX2Enable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; - if (cfgAddBool(pCfg, "fma", tsFMAEnable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; - if (cfgAddBool(pCfg, "avx512", tsAVX512Enable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; + if (cfgAddBool(pCfg, "avx2", tsAVX2Supported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; + if (cfgAddBool(pCfg, "fma", tsFMASupported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; + if (cfgAddBool(pCfg, "avx512", tsAVX512Supported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "simdEnable", tsSIMDEnable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; + if (cfgAddBool(pCfg, "AVX512Enable", tsAVX512Enable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "tagFilterCache", tsTagFilterCache, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddInt64(pCfg, "openMax", tsOpenMax, 0, INT64_MAX, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; diff --git a/source/libs/function/src/detail/tminmax.c b/source/libs/function/src/detail/tminmax.c index a6c91a57ce..e36157b565 100644 --- a/source/libs/function/src/detail/tminmax.c +++ b/source/libs/function/src/detail/tminmax.c @@ -370,7 +370,7 @@ static int32_t findFirstValPosition(const SColumnInfoData* pCol, int32_t start, static void handleInt8Col(const void* data, int32_t start, int32_t numOfRows, SMinmaxResInfo* pBuf, bool isMinFunc, bool signVal) { // AVX2 version to speedup the loop - if (tsAVX2Enable && tsSIMDEnable) { + if (tsAVX2Supported && tsSIMDEnable) { pBuf->v = i8VectorCmpAVX2(data, numOfRows, isMinFunc, signVal); } else { if (!pBuf->assign) { @@ -404,7 +404,7 @@ static void handleInt8Col(const void* data, int32_t start, int32_t numOfRows, SM static void handleInt16Col(const void* data, int32_t start, int32_t numOfRows, SMinmaxResInfo* pBuf, bool isMinFunc, bool signVal) { // AVX2 version to speedup the loop - if (tsAVX2Enable && tsSIMDEnable) { + if (tsAVX2Supported && tsSIMDEnable) { pBuf->v = i16VectorCmpAVX2(data, numOfRows, isMinFunc, signVal); } else { if (!pBuf->assign) { @@ -438,7 +438,7 @@ static void handleInt16Col(const void* data, int32_t start, int32_t numOfRows, S static void handleInt32Col(const void* data, int32_t start, int32_t numOfRows, SMinmaxResInfo* pBuf, bool isMinFunc, bool signVal) { // AVX2 version to speedup the loop - if (tsAVX2Enable && tsSIMDEnable) { + if (tsAVX2Supported && tsSIMDEnable) { pBuf->v = i32VectorCmpAVX2(data, numOfRows, isMinFunc, signVal); } else { if (!pBuf->assign) { diff --git a/source/os/src/osEnv.c b/source/os/src/osEnv.c index 54107db325..ea88d5307b 100644 --- a/source/os/src/osEnv.c +++ b/source/os/src/osEnv.c @@ -38,11 +38,12 @@ int64_t tsTotalMemoryKB = 0; char *tsProcPath = NULL; char tsSIMDEnable = 0; +char tsAVX512Enable = 0; char tsSSE42Enable = 0; char tsAVXEnable = 0; -char tsAVX2Enable = 0; -char tsFMAEnable = 0; -char tsAVX512Enable = 0; +char tsAVX2Supported = 0; +char tsFMASupported = 0; +char tsAVX512Supported = 0; void osDefaultInit() { taosSeedRand(taosSafeRand()); diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index 187461826a..71cbf5541f 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -250,7 +250,7 @@ void taosGetSystemInfo() { taosGetCpuCores(&tsNumOfCores, false); taosGetTotalMemory(&tsTotalMemoryKB); taosGetCpuUsage(NULL, NULL); - taosGetCpuInstructions(&tsSSE42Enable, &tsAVXEnable, &tsAVX2Enable, &tsFMAEnable, &tsAVX512Enable); + taosGetCpuInstructions(&tsSSE42Enable, &tsAVXEnable, &tsAVX2Supported, &tsFMASupported, &tsAVX512Supported); #endif } diff --git a/source/util/src/tcompression.c b/source/util/src/tcompression.c index 4635ec340d..053a716721 100644 --- a/source/util/src/tcompression.c +++ b/source/util/src/tcompression.c @@ -822,9 +822,9 @@ int32_t tsDecompressTimestampImp(const char *const input, const int32_t nelement memcpy(output, input + 1, nelements * longBytes); return nelements * longBytes; } else if (input[0] == 1) { // Decompress - if (tsSIMDEnable && tsAVX512Enable) { + if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { tsDecompressTimestampAvx512(input, nelements, output, false); - } else if (tsSIMDEnable && tsAVX2Enable) { + } else if (tsSIMDEnable && tsAVX2Supported) { tsDecompressTimestampAvx2(input, nelements, output, false); } else { int64_t *ostream = (int64_t *)output; @@ -1198,9 +1198,9 @@ int32_t tsDecompressFloatImp(const char *const input, const int32_t nelements, c return nelements * FLOAT_BYTES; } - if (tsSIMDEnable && tsAVX2Enable) { + if (tsSIMDEnable && tsAVX2Supported) { tsDecompressFloatImplAvx2(input, nelements, output); - } else if (tsSIMDEnable && tsAVX512Enable) { + } else if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { tsDecompressFloatImplAvx512(input, nelements, output); } else { // alternative implementation without SIMD instructions. tsDecompressFloatHelper(input, nelements, (float *)output); @@ -2713,7 +2713,7 @@ int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int int8_t alvl = tsGetCompressL2Level(l2, lvl); \ return compressL2Dict[l2].comprFn(pIn, nIn, pOut, nOut, type, alvl); \ } else { \ - uTrace("dencode:%s, dcompress:%s, level:%d, type:%s", "disabled", compressL2Dict[l1].name, lvl, \ + uTrace("dencode:%s, decompress:%s, level:%d, type:%s", "disabled", compressL2Dict[l1].name, lvl, \ tDataTypes[type].name); \ return compressL2Dict[l2].decomprFn(pIn, nIn, pOut, nOut, type); \ } \ diff --git a/source/util/src/tdecompress.c b/source/util/src/tdecompress.c index d3cb3118d2..38f277fb48 100644 --- a/source/util/src/tdecompress.c +++ b/source/util/src/tdecompress.c @@ -74,12 +74,12 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, int32_t batch = 0; int32_t remain = 0; - if (tsSIMDEnable && tsAVX512Enable) { + if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { #if __AVX512F__ batch = num >> 3; remain = num & 0x07; #endif - } else if (tsSIMDEnable && tsAVX2Enable) { + } else if (tsSIMDEnable && tsAVX2Supported) { #if __AVX2__ batch = num >> 2; remain = num & 0x03; @@ -87,7 +87,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, } if (selector == 0 || selector == 1) { - if (tsSIMDEnable && tsAVX512Enable) { + if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { #if __AVX512F__ for (int32_t i = 0; i < batch; ++i) { __m512i prev = _mm512_set1_epi64(prevValue); @@ -98,7 +98,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, p[_pos++] = prevValue; } #endif - } else if (tsSIMDEnable && tsAVX2Enable) { + } else if (tsSIMDEnable && tsAVX2Supported) { for (int32_t i = 0; i < batch; ++i) { __m256i prev = _mm256_set1_epi64x(prevValue); _mm256_storeu_si256((__m256i *)&p[_pos], prev); @@ -116,7 +116,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, } } } else { - if (tsSIMDEnable && tsAVX512Enable) { + if (tsSIMDEnable && tsAVX512Supported && tsAVX512Enable) { #if __AVX512F__ __m512i sum_mask1 = _mm512_set_epi64(6, 6, 4, 4, 2, 2, 0, 0); __m512i sum_mask2 = _mm512_set_epi64(5, 5, 5, 5, 1, 1, 1, 1); @@ -182,7 +182,7 @@ int32_t tsDecompressIntImpl_Hw(const char *const input, const int32_t nelements, v += bit; } #endif - } else if (tsSIMDEnable && tsAVX2Enable) { + } else if (tsSIMDEnable && tsAVX2Supported) { __m256i base = _mm256_set1_epi64x(w); __m256i maskVal = _mm256_set1_epi64x(mask); @@ -331,16 +331,16 @@ int32_t tsDecompressFloatImplAvx2(const char *const input, const int32_t nelemen int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, bool bigEndian) { -#if 0 int64_t *ostream = (int64_t *)output; int32_t ipos = 1, opos = 0; + +#if __AVX2__ __m128i prevVal = _mm_setzero_si128(); __m128i prevDelta = _mm_setzero_si128(); -#if __AVX2__ int32_t batch = nelements >> 1; int32_t remainder = nelements & 0x01; - __mmask16 mask2[16] = {0, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff}; +// __mmask16 mask2[16] = {0, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff}; int32_t i = 0; if (batch > 1) { @@ -398,8 +398,6 @@ int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelemen int8_t nbytes1 = flags & INT8MASK(4); // range of nbytes starts from 0 to 7 int8_t nbytes2 = (flags >> 4) & INT8MASK(4); -// __m128i data1 = _mm_maskz_loadu_epi8(mask2[nbytes1], (const void*)(input + ipos)); -// __m128i data2 = _mm_maskz_loadu_epi8(mask2[nbytes2], (const void*)(input + ipos + nbytes1)); __m128i data1; if (nbytes1 == 0) { data1 = _mm_setzero_si128(); @@ -471,7 +469,6 @@ int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelemen ostream[opos++] = prevVal[1] + prevDeltaX; } } -#endif #endif return 0; } diff --git a/source/util/test/decompressTest.cpp b/source/util/test/decompressTest.cpp index 2ddef3f595..c982f450ea 100644 --- a/source/util/test/decompressTest.cpp +++ b/source/util/test/decompressTest.cpp @@ -4,9 +4,16 @@ #include #include "ttypes.h" -namespace {} // namespace +namespace { + +} // namespace + +TEST(utilTest, decompress_ts_test) { + { + tsSIMDEnable = 1; + tsAVX2Supported = 1; + } -TEST(utilTest, decompress_test) { int64_t tsList[10] = {1700000000, 1700000100, 1700000200, 1700000300, 1700000400, 1700000500, 1700000600, 1700000700, 1700000800, 1700000900}; @@ -57,6 +64,49 @@ TEST(utilTest, decompress_test) { } } +TEST(utilTest, decompress_bigint_avx2_test) { + { + tsSIMDEnable = 1; + tsAVX2Supported = 1; + } + + int64_t tsList[10] = {1700000000, 1700000100, 1700000200, 1700000300, 1700000400, + 1700000500, 1700000600, 1700000700, 1700000800, 1700000900}; + + char* pOutput[10 * sizeof(int64_t)] = {0}; + int32_t len = tsCompressBigint(tsList, sizeof(tsList), sizeof(tsList) / sizeof(tsList[0]), pOutput, 10, + ONE_STAGE_COMP, NULL, 0); + + char* decompOutput[10 * 8] = {0}; + + tsDecompressBigint(pOutput, len, 10, decompOutput, sizeof(int64_t) * 10, ONE_STAGE_COMP, NULL, 0); + + for (int32_t i = 0; i < 10; ++i) { + std::cout << ((int64_t*)decompOutput)[i] << std::endl; + } +} + +TEST(utilTest, decompress_int_avx2_test) { + { + tsSIMDEnable = 1; + tsAVX2Supported = 1; + } + + int32_t tsList[10] = {17000000, 17000001, 17000002, 17000003, 17000004, + 17000005, 17000006, 17000007, 17000008, 17000009}; + + char* pOutput[10 * sizeof(int32_t)] = {0}; + int32_t len = + tsCompressInt(tsList, sizeof(tsList), sizeof(tsList) / sizeof(tsList[0]), pOutput, 10, ONE_STAGE_COMP, NULL, 0); + + char* decompOutput[10 * 8] = {0}; + tsDecompressInt(pOutput, len, 10, decompOutput, sizeof(int32_t) * 10, ONE_STAGE_COMP, NULL, 0); + + for (int32_t i = 0; i < 10; ++i) { + std::cout << ((int32_t*)decompOutput)[i] << std::endl; + } +} + TEST(utilTest, decompress_perf_test) { int32_t num = 10000; From f3536361367499c7222f13b278904d8d9c74a2bd Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 19 Jun 2024 15:08:25 +0800 Subject: [PATCH 23/53] refactor: do some internal refactor. --- include/os/osEnv.h | 4 ++-- source/common/src/tglobal.c | 4 ++-- source/libs/function/src/detail/tavgfunction.c | 2 +- source/libs/function/src/detail/tminmax.c | 4 ++-- source/os/src/osEnv.c | 4 ++-- source/os/src/osSysinfo.c | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/os/osEnv.h b/include/os/osEnv.h index e3e5da59f5..4f4a58d4e8 100644 --- a/include/os/osEnv.h +++ b/include/os/osEnv.h @@ -37,8 +37,8 @@ extern float tsNumOfCores; extern int64_t tsTotalMemoryKB; extern char *tsProcPath; extern char tsSIMDEnable; -extern char tsSSE42Enable; -extern char tsAVXEnable; +extern char tsSSE42Supported; +extern char tsAVXSupported; extern char tsAVX2Supported; extern char tsFMASupported; extern char tsAVX512Supported; diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 5b0361f8ca..97cb4b4e1d 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -594,8 +594,8 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) { if (cfgAddBool(pCfg, "enableCoreFile", 1, CFG_SCOPE_BOTH, CFG_DYN_CLIENT) != 0) return -1; if (cfgAddFloat(pCfg, "numOfCores", tsNumOfCores, 1, 100000, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; - if (cfgAddBool(pCfg, "ssd42", tsSSE42Enable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; - if (cfgAddBool(pCfg, "avx", tsAVXEnable, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; + if (cfgAddBool(pCfg, "ssd42", tsSSE42Supported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; + if (cfgAddBool(pCfg, "avx", tsAVXSupported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "avx2", tsAVX2Supported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "fma", tsFMASupported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; if (cfgAddBool(pCfg, "avx512", tsAVX512Supported, CFG_SCOPE_BOTH, CFG_DYN_NONE) != 0) return -1; diff --git a/source/libs/function/src/detail/tavgfunction.c b/source/libs/function/src/detail/tavgfunction.c index 66ed092f76..3d51f0cd16 100644 --- a/source/libs/function/src/detail/tavgfunction.c +++ b/source/libs/function/src/detail/tavgfunction.c @@ -565,7 +565,7 @@ int32_t avgFunction(SqlFunctionCtx* pCtx) { numOfElem = pInput->numOfRows; pAvgRes->count += pInput->numOfRows; - bool simdAvailable = tsAVXEnable && tsSIMDEnable && (numOfRows > THRESHOLD_SIZE); + bool simdAvailable = tsAVXSupported && tsSIMDEnable && (numOfRows > THRESHOLD_SIZE); switch(type) { case TSDB_DATA_TYPE_UTINYINT: diff --git a/source/libs/function/src/detail/tminmax.c b/source/libs/function/src/detail/tminmax.c index e36157b565..331f222a71 100644 --- a/source/libs/function/src/detail/tminmax.c +++ b/source/libs/function/src/detail/tminmax.c @@ -502,7 +502,7 @@ static void handleFloatCol(SColumnInfoData* pCol, int32_t start, int32_t numOfRo float* val = (float*)&pBuf->v; // AVX version to speedup the loop - if (tsAVXEnable && tsSIMDEnable) { + if (tsAVXSupported && tsSIMDEnable) { *val = floatVectorCmpAVX(pData, numOfRows, isMinFunc); } else { if (!pBuf->assign) { @@ -533,7 +533,7 @@ static void handleDoubleCol(SColumnInfoData* pCol, int32_t start, int32_t numOfR double* val = (double*)&pBuf->v; // AVX version to speedup the loop - if (tsAVXEnable && tsSIMDEnable) { + if (tsAVXSupported && tsSIMDEnable) { *val = (double)doubleVectorCmpAVX(pData, numOfRows, isMinFunc); } else { if (!pBuf->assign) { diff --git a/source/os/src/osEnv.c b/source/os/src/osEnv.c index ea88d5307b..28f4178790 100644 --- a/source/os/src/osEnv.c +++ b/source/os/src/osEnv.c @@ -39,8 +39,8 @@ char *tsProcPath = NULL; char tsSIMDEnable = 0; char tsAVX512Enable = 0; -char tsSSE42Enable = 0; -char tsAVXEnable = 0; +char tsSSE42Supported = 0; +char tsAVXSupported = 0; char tsAVX2Supported = 0; char tsFMASupported = 0; char tsAVX512Supported = 0; diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index 71cbf5541f..50eb8413c0 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -250,7 +250,7 @@ void taosGetSystemInfo() { taosGetCpuCores(&tsNumOfCores, false); taosGetTotalMemory(&tsTotalMemoryKB); taosGetCpuUsage(NULL, NULL); - taosGetCpuInstructions(&tsSSE42Enable, &tsAVXEnable, &tsAVX2Supported, &tsFMASupported, &tsAVX512Supported); + taosGetCpuInstructions(&tsSSE42Supported, &tsAVXSupported, &tsAVX2Supported, &tsFMASupported, &tsAVX512Supported); #endif } From 805cc682d9e8d4a8139ba8c03a34bdd7f4f06897 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 19 Jun 2024 16:01:55 +0800 Subject: [PATCH 24/53] format code --- source/dnode/mnode/impl/src/mndCompact.c | 239 +++++++++++------------ 1 file changed, 117 insertions(+), 122 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndCompact.c b/source/dnode/mnode/impl/src/mndCompact.c index 341c2def0f..abbcb52db4 100644 --- a/source/dnode/mnode/impl/src/mndCompact.c +++ b/source/dnode/mnode/impl/src/mndCompact.c @@ -13,20 +13,19 @@ * along with this program. If not, see . */ #include "mndCompact.h" -#include "mndTrans.h" -#include "mndShow.h" -#include "mndDb.h" -#include "mndCompactDetail.h" -#include "mndVgroup.h" -#include "tmsgcb.h" -#include "mndDnode.h" -#include "tmisce.h" #include "audit.h" +#include "mndCompactDetail.h" +#include "mndDb.h" +#include "mndDnode.h" #include "mndPrivilege.h" +#include "mndShow.h" #include "mndTrans.h" +#include "mndVgroup.h" +#include "tmisce.h" +#include "tmsgcb.h" #define MND_COMPACT_VER_NUMBER 1 -#define MND_COMPACT_ID_LEN 11 +#define MND_COMPACT_ID_LEN 11 static int32_t mndProcessCompactTimer(SRpcMsg *pReq); @@ -50,12 +49,9 @@ int32_t mndInitCompact(SMnode *pMnode) { return sdbSetTable(pMnode->pSdb, table); } -void mndCleanupCompact(SMnode *pMnode) { - mDebug("mnd compact cleanup"); -} +void mndCleanupCompact(SMnode *pMnode) { mDebug("mnd compact cleanup"); } -void tFreeCompactObj(SCompactObj *pCompact) { -} +void tFreeCompactObj(SCompactObj *pCompact) {} int32_t tSerializeSCompactObj(void *buf, int32_t bufLen, const SCompactObj *pObj) { SEncoder encoder = {0}; @@ -75,7 +71,7 @@ int32_t tSerializeSCompactObj(void *buf, int32_t bufLen, const SCompactObj *pObj } int32_t tDeserializeSCompactObj(void *buf, int32_t bufLen, SCompactObj *pObj) { - int8_t ex = 0; + int8_t ex = 0; SDecoder decoder = {0}; tDecoderInit(&decoder, buf, bufLen); @@ -94,7 +90,7 @@ int32_t tDeserializeSCompactObj(void *buf, int32_t bufLen, SCompactObj *pObj) { SSdbRaw *mndCompactActionEncode(SCompactObj *pCompact) { terrno = TSDB_CODE_SUCCESS; - void *buf = NULL; + void *buf = NULL; SSdbRaw *pRaw = NULL; int32_t tlen = tSerializeSCompactObj(NULL, 0, pCompact); @@ -102,8 +98,8 @@ SSdbRaw *mndCompactActionEncode(SCompactObj *pCompact) { terrno = TSDB_CODE_OUT_OF_MEMORY; goto OVER; } - - int32_t size = sizeof(int32_t) + tlen; + + int32_t size = sizeof(int32_t) + tlen; pRaw = sdbAllocRaw(SDB_COMPACT, MND_COMPACT_VER_NUMBER, size); if (pRaw == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -127,7 +123,6 @@ SSdbRaw *mndCompactActionEncode(SCompactObj *pCompact) { SDB_SET_BINARY(pRaw, dataPos, buf, tlen, OVER); SDB_SET_DATALEN(pRaw, dataPos, OVER); - OVER: taosMemoryFreeClear(buf); if (terrno != TSDB_CODE_SUCCESS) { @@ -141,9 +136,9 @@ OVER: } SSdbRow *mndCompactActionDecode(SSdbRaw *pRaw) { - SSdbRow *pRow = NULL; - SCompactObj *pCompact = NULL; - void *buf = NULL; + SSdbRow *pRow = NULL; + SCompactObj *pCompact = NULL; + void *buf = NULL; terrno = TSDB_CODE_SUCCESS; int8_t sver = 0; @@ -184,7 +179,7 @@ SSdbRow *mndCompactActionDecode(SSdbRaw *pRaw) { goto OVER; } - //taosInitRWLatch(&pView->lock); + // taosInitRWLatch(&pView->lock); OVER: taosMemoryFreeClear(buf); @@ -210,15 +205,15 @@ int32_t mndCompactActionDelete(SSdb *pSdb, SCompactObj *pCompact) { } int32_t mndCompactActionUpdate(SSdb *pSdb, SCompactObj *pOldCompact, SCompactObj *pNewCompact) { - mTrace("compact:%" PRId32 ", perform update action, old row:%p new row:%p", - pOldCompact->compactId, pOldCompact, pNewCompact); + mTrace("compact:%" PRId32 ", perform update action, old row:%p new row:%p", pOldCompact->compactId, pOldCompact, + pNewCompact); return 0; } SCompactObj *mndAcquireCompact(SMnode *pMnode, int64_t compactId) { - SSdb *pSdb = pMnode->pSdb; - SCompactObj *pCompact = sdbAcquire(pSdb, SDB_COMPACT, &compactId); + SSdb *pSdb = pMnode->pSdb; + SCompactObj *pCompact = sdbAcquire(pSdb, SDB_COMPACT, &compactId); if (pCompact == NULL && terrno == TSDB_CODE_SDB_OBJ_NOT_THERE) { terrno = TSDB_CODE_SUCCESS; } @@ -230,8 +225,8 @@ void mndReleaseCompact(SMnode *pMnode, SCompactObj *pCompact) { sdbRelease(pSdb, pCompact); } -//compact db -int32_t mndAddCompactToTran(SMnode *pMnode, STrans *pTrans, SCompactObj* pCompact, SDbObj *pDb, SCompactDbRsp *rsp){ +// compact db +int32_t mndAddCompactToTran(SMnode *pMnode, STrans *pTrans, SCompactObj *pCompact, SDbObj *pDb, SCompactDbRsp *rsp) { pCompact->compactId = tGenIdPI32(); strcpy(pCompact->dbname, pDb->name); @@ -251,18 +246,19 @@ int32_t mndAddCompactToTran(SMnode *pMnode, STrans *pTrans, SCompactObj* pCompac return 0; } -//retrieve compact -int32_t mndRetrieveCompact(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows){ - SMnode *pMnode = pReq->info.node; - SSdb *pSdb = pMnode->pSdb; - int32_t numOfRows = 0; - SCompactObj *pCompact = NULL; - char *sep = NULL; - SDbObj *pDb = NULL; - +// retrieve compact +int32_t mndRetrieveCompact(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; + int32_t numOfRows = 0; + SCompactObj *pCompact = NULL; + char *sep = NULL; + SDbObj *pDb = NULL; + if (strlen(pShow->db) > 0) { sep = strchr(pShow->db, '.'); - if (sep && ((0 == strcmp(sep + 1, TSDB_INFORMATION_SCHEMA_DB) || (0 == strcmp(sep + 1, TSDB_PERFORMANCE_SCHEMA_DB))))) { + if (sep && + ((0 == strcmp(sep + 1, TSDB_INFORMATION_SCHEMA_DB) || (0 == strcmp(sep + 1, TSDB_PERFORMANCE_SCHEMA_DB))))) { sep++; } else { pDb = mndAcquireDb(pMnode, pShow->db); @@ -306,9 +302,9 @@ int32_t mndRetrieveCompact(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, return numOfRows; } -//kill compact -static void *mndBuildKillCompactReq(SMnode *pMnode, SVgObj *pVgroup, int32_t *pContLen, - int32_t compactId, int32_t dnodeid) { +// kill compact +static void *mndBuildKillCompactReq(SMnode *pMnode, SVgObj *pVgroup, int32_t *pContLen, int32_t compactId, + int32_t dnodeid) { SVKillCompactReq req = {0}; req.compactId = compactId; req.vgId = pVgroup->vgId; @@ -337,8 +333,8 @@ static void *mndBuildKillCompactReq(SMnode *pMnode, SVgObj *pVgroup, int32_t *pC return pReq; } -static int32_t mndAddKillCompactAction(SMnode *pMnode, STrans *pTrans, SVgObj *pVgroup, - int32_t compactId, int32_t dnodeid) { +static int32_t mndAddKillCompactAction(SMnode *pMnode, STrans *pTrans, SVgObj *pVgroup, int32_t compactId, + int32_t dnodeid) { STransAction action = {0}; SDnodeObj *pDnode = mndAcquireDnode(pMnode, dnodeid); @@ -365,7 +361,7 @@ static int32_t mndAddKillCompactAction(SMnode *pMnode, STrans *pTrans, SVgObj *p static int32_t mndKillCompact(SMnode *pMnode, SRpcMsg *pReq, SCompactObj *pCompact) { STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB, pReq, "kill-compact"); if (pTrans == NULL) { - mError("compact:%" PRId32 ", failed to drop since %s" , pCompact->compactId, terrstr()); + mError("compact:%" PRId32 ", failed to drop since %s", pCompact->compactId, terrstr()); return -1; } mInfo("trans:%d, used to kill compact:%" PRId32, pTrans->id, pCompact->compactId); @@ -388,13 +384,13 @@ static int32_t mndKillCompact(SMnode *pMnode, SRpcMsg *pReq, SCompactObj *pCompa if (pDetail->compactId == pCompact->compactId) { SVgObj *pVgroup = mndAcquireVgroup(pMnode, pDetail->vgId); - if(pVgroup == NULL){ + if (pVgroup == NULL) { mError("trans:%d, failed to append redo action since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); return -1; } - if(mndAddKillCompactAction(pMnode, pTrans, pVgroup, pCompact->compactId, pDetail->dnodeId) != 0){ + if (mndAddKillCompactAction(pMnode, pTrans, pVgroup, pCompact->compactId, pDetail->dnodeId) != 0) { mError("trans:%d, failed to append redo action since %s", pTrans->id, terrstr()); mndTransDrop(pTrans); return -1; @@ -426,7 +422,7 @@ static int32_t mndKillCompact(SMnode *pMnode, SRpcMsg *pReq, SCompactObj *pCompa return 0; } -int32_t mndProcessKillCompactReq(SRpcMsg *pReq){ +int32_t mndProcessKillCompactReq(SRpcMsg *pReq) { SKillCompactReq killCompactReq = {0}; if (tDeserializeSKillCompactReq(pReq->pCont, pReq->contLen, &killCompactReq) != 0) { terrno = TSDB_CODE_INVALID_MSG; @@ -435,10 +431,10 @@ int32_t mndProcessKillCompactReq(SRpcMsg *pReq){ mInfo("start to kill compact:%" PRId32, killCompactReq.compactId); - SMnode *pMnode = pReq->info.node; - int32_t code = -1; - SCompactObj *pCompact = mndAcquireCompact(pMnode, killCompactReq.compactId); - if(pCompact == NULL){ + SMnode *pMnode = pReq->info.node; + int32_t code = -1; + SCompactObj *pCompact = mndAcquireCompact(pMnode, killCompactReq.compactId); + if (pCompact == NULL) { terrno = TSDB_CODE_MND_INVALID_COMPACT_ID; tFreeSKillCompactReq(&killCompactReq); return -1; @@ -470,9 +466,10 @@ _OVER: return code; } -//update progress -static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t compactId, SQueryCompactProgressRsp* rsp) { - void* pIter = NULL; +// update progress +static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t compactId, + SQueryCompactProgressRsp *rsp) { + void *pIter = NULL; while (1) { SCompactDetailObj *pDetail = NULL; pIter = sdbFetch(pMnode->pSdb, SDB_COMPACT_DETAIL, pIter, (void **)&pDetail); @@ -493,36 +490,36 @@ static int32_t mndUpdateCompactProgress(SMnode *pMnode, SRpcMsg *pReq, int32_t c return TSDB_CODE_MND_COMPACT_DETAIL_NOT_EXIST; } -int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq){ +int32_t mndProcessQueryCompactRsp(SRpcMsg *pReq) { SQueryCompactProgressRsp req = {0}; - int32_t code = 0; + int32_t code = 0; code = tDeserializeSQueryCompactProgressRsp(pReq->pCont, pReq->contLen, &req); if (code != 0) { terrno = TSDB_CODE_INVALID_MSG; - mError("failed to deserialize vnode-query-compact-progress-rsp, ret:%d, pCont:%p, len:%d", - code, pReq->pCont, pReq->contLen); + mError("failed to deserialize vnode-query-compact-progress-rsp, ret:%d, pCont:%p, len:%d", code, pReq->pCont, + pReq->contLen); return -1; } - mDebug("compact:%d, receive query response, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", - req.compactId, req.vgId, req.dnodeId, req.numberFileset, req.finished); + mDebug("compact:%d, receive query response, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", req.compactId, + req.vgId, req.dnodeId, req.numberFileset, req.finished); - SMnode *pMnode = pReq->info.node; + SMnode *pMnode = pReq->info.node; code = mndUpdateCompactProgress(pMnode, pReq, req.compactId, &req); - if(code != 0){ + if (code != 0) { terrno = code; - mError("compact:%d, failed to update progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", - req.compactId, req.vgId, req.dnodeId, req.numberFileset, req.finished); + mError("compact:%d, failed to update progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", req.compactId, + req.vgId, req.dnodeId, req.numberFileset, req.finished); return -1; } return 0; } -//timer -void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact){ - void *pIter = NULL; +// timer +void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact) { + void *pIter = NULL; while (1) { SCompactDetailObj *pDetail = NULL; @@ -532,8 +529,8 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact){ if (pDetail->compactId == pCompact->compactId) { SEpSet epSet = {0}; - SDnodeObj *pDnode = mndAcquireDnode(pMnode, pDetail->dnodeId); - if(pDnode == NULL) break; + SDnodeObj *pDnode = mndAcquireDnode(pMnode, pDetail->dnodeId); + if (pDnode == NULL) break; addEpIntoEpSet(&epSet, pDnode->fqdn, pDnode->port); mndReleaseDnode(pMnode, pDnode); @@ -555,31 +552,29 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact){ sdbCancelFetch(pMnode->pSdb, pDetail); sdbRelease(pMnode->pSdb, pDetail); continue; - } + } pHead->contLen = htonl(contLen); pHead->vgId = htonl(pDetail->vgId); tSerializeSQueryCompactProgressReq((char *)pHead + sizeof(SMsgHead), contLen - sizeof(SMsgHead), &req); - SRpcMsg rpcMsg = {.msgType = TDMT_VND_QUERY_COMPACT_PROGRESS, - .contLen = contLen}; - - //rpcMsg.pCont = rpcMallocCont(contLen); - //if (rpcMsg.pCont == NULL) { - // return; - //} + SRpcMsg rpcMsg = {.msgType = TDMT_VND_QUERY_COMPACT_PROGRESS, .contLen = contLen}; - //memcpy(rpcMsg.pCont, pHead, contLen); + // rpcMsg.pCont = rpcMallocCont(contLen); + // if (rpcMsg.pCont == NULL) { + // return; + // } + + // memcpy(rpcMsg.pCont, pHead, contLen); rpcMsg.pCont = pHead; char detail[1024] = {0}; - int32_t len = snprintf(detail, sizeof(detail), "msgType:%s numOfEps:%d inUse:%d", TMSG_INFO(TDMT_VND_QUERY_COMPACT_PROGRESS), - epSet.numOfEps, epSet.inUse); + int32_t len = snprintf(detail, sizeof(detail), "msgType:%s numOfEps:%d inUse:%d", + TMSG_INFO(TDMT_VND_QUERY_COMPACT_PROGRESS), epSet.numOfEps, epSet.inUse); for (int32_t i = 0; i < epSet.numOfEps; ++i) { - len += snprintf(detail + len, sizeof(detail) - len, " ep:%d-%s:%u", i, epSet.eps[i].fqdn, - epSet.eps[i].port); + len += snprintf(detail + len, sizeof(detail) - len, " ep:%d-%s:%u", i, epSet.eps[i].fqdn, epSet.eps[i].port); } mDebug("compact:%d, send update progress msg to %s", pDetail->compactId, detail); @@ -592,52 +587,52 @@ void mndCompactSendProgressReq(SMnode *pMnode, SCompactObj *pCompact){ } static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { - bool needSave = false; - void* pIter = NULL; + bool needSave = false; + void *pIter = NULL; while (1) { SCompactDetailObj *pDetail = NULL; pIter = sdbFetch(pMnode->pSdb, SDB_COMPACT_DETAIL, pIter, (void **)&pDetail); if (pIter == NULL) break; if (pDetail->compactId == compactId) { - mDebug("compact:%d, check save progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d, " - "newNumberFileset:%d, newFinished:%d", - pDetail->compactId, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished, - pDetail->newNumberFileset, pDetail->newFinished); + mDebug( + "compact:%d, check save progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d, " + "newNumberFileset:%d, newFinished:%d", + pDetail->compactId, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished, + pDetail->newNumberFileset, 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) + // 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; } sdbRelease(pMnode->pSdb, pDetail); } - SCompactObj *pCompact = mndAcquireCompact(pMnode, compactId); - if(pCompact == NULL) return 0; + SCompactObj *pCompact = mndAcquireCompact(pMnode, compactId); + if (pCompact == NULL) return 0; SDbObj *pDb = mndAcquireDb(pMnode, pCompact->dbname); - if(pDb == NULL){ + if (pDb == NULL) { needSave = true; - mWarn("compact:%" PRId32 ", no db exist, set needSave:%s" , compactId, pCompact->dbname); - } - else{ + mWarn("compact:%" PRId32 ", no db exist, set needSave:%s", compactId, pCompact->dbname); + } else { mndReleaseDb(pMnode, pDb); pDb = NULL; } - if(!needSave) { - mDebug("compact:%" PRId32 ", no need to save" , compactId); + if (!needSave) { + mDebug("compact:%" PRId32 ", no need to save", compactId); return 0; } STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB, NULL, "update-compact-progress"); if (pTrans == NULL) { - mError("trans:%" PRId32 ", failed to create since %s" , pTrans->id, terrstr()); + mError("trans:%" PRId32 ", failed to create since %s", pTrans->id, terrstr()); return -1; } mInfo("compact:%d, trans:%d, used to update compact progress.", compactId, pTrans->id); - + mndTransSetDbName(pTrans, pCompact->dbname, NULL); pIter = NULL; @@ -647,14 +642,15 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { if (pIter == NULL) break; if (pDetail->compactId == compactId) { - mInfo("compact:%d, trans:%d, check compact progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d, " - "newNumberFileset:%d, newFinished:%d", - pDetail->compactId, pTrans->id, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished, - pDetail->newNumberFileset, pDetail->newFinished); + mInfo( + "compact:%d, trans:%d, check compact progress, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d, " + "newNumberFileset:%d, newFinished:%d", + pDetail->compactId, pTrans->id, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished, + pDetail->newNumberFileset, pDetail->newFinished); pDetail->numberFileset = pDetail->newNumberFileset; pDetail->finished = pDetail->newFinished; - + SSdbRaw *pCommitRaw = mndCompactDetailActionEncode(pDetail); if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { mError("compact:%d, trans:%d, failed to append commit log since %s", pDetail->compactId, pTrans->id, terrstr()); @@ -674,17 +670,16 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { pIter = sdbFetch(pMnode->pSdb, SDB_COMPACT_DETAIL, pIter, (void **)&pDetail); if (pIter == NULL) break; - if(pDetail->compactId == compactId){ - mInfo("compact:%d, trans:%d, check compact finished, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", - pDetail->compactId, pTrans->id, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished); + if (pDetail->compactId == compactId) { + mInfo("compact:%d, trans:%d, check compact finished, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d", + pDetail->compactId, pTrans->id, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished); - if(pDetail->numberFileset == -1 && pDetail->finished == -1){ + if (pDetail->numberFileset == -1 && pDetail->finished == -1) { allFinished = false; sdbRelease(pMnode->pSdb, pDetail); break; } - if (pDetail->numberFileset != -1 && pDetail->finished != -1 && - pDetail->numberFileset != pDetail->finished) { + if (pDetail->numberFileset != -1 && pDetail->finished != -1 && pDetail->numberFileset != pDetail->finished) { allFinished = false; sdbRelease(pMnode->pSdb, pDetail); break; @@ -695,16 +690,15 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { } pDb = mndAcquireDb(pMnode, pCompact->dbname); - if(pDb == NULL){ + if (pDb == NULL) { allFinished = true; - mWarn("compact:%" PRId32 ", no db exist, set all finished:%s" , compactId, pCompact->dbname); - } - else{ + mWarn("compact:%" PRId32 ", no db exist, set all finished:%s", compactId, pCompact->dbname); + } else { mndReleaseDb(pMnode, pDb); - pDb = NULL; + pDb = NULL; } - if(allFinished){ + if (allFinished) { mInfo("compact:%d, all finished", pCompact->compactId); pIter = NULL; while (1) { @@ -712,10 +706,11 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) { pIter = sdbFetch(pMnode->pSdb, SDB_COMPACT_DETAIL, pIter, (void **)&pDetail); if (pIter == NULL) break; - if (pDetail->compactId == pCompact->compactId) { + if (pDetail->compactId == pCompact->compactId) { SSdbRaw *pCommitRaw = mndCompactDetailActionEncode(pDetail); if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) { - mError("compact:%d, trans:%d, failed to append commit log since %s", pDetail->compactId, pTrans->id, terrstr()); + mError("compact:%d, trans:%d, failed to append commit log since %s", pDetail->compactId, pTrans->id, + terrstr()); mndTransDrop(pTrans); return -1; } @@ -764,8 +759,8 @@ void mndCompactPullup(SMnode *pMnode) { for (int32_t i = 0; i < taosArrayGetSize(pArray); ++i) { mInfo("begin to pull up"); - int32_t *pCompactId = taosArrayGet(pArray, i); - SCompactObj *pCompact = mndAcquireCompact(pMnode, *pCompactId); + int32_t *pCompactId = taosArrayGet(pArray, i); + SCompactObj *pCompact = mndAcquireCompact(pMnode, *pCompactId); if (pCompact != NULL) { mInfo("compact:%d, begin to pull up", pCompact->compactId); mndCompactSendProgressReq(pMnode, pCompact); From 61edc7904563d60612bb11d03a7cc00230d95078 Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 19 Jun 2024 08:01:58 +0000 Subject: [PATCH 25/53] fix/TD-30642 --- source/libs/parser/src/parAstCreater.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 64d1260719..baccd6e399 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -2902,7 +2902,8 @@ SNode* createSyncdbStmt(SAstCreateContext* pCxt, const SToken* pDbName) { SNode* createGrantStmt(SAstCreateContext* pCxt, int64_t privileges, STokenPair* pPrivLevel, SToken* pUserName, SNode* pTagCond) { CHECK_PARSER_STATUS(pCxt); - if (!checkDbName(pCxt, &pPrivLevel->first, false) || !checkUserName(pCxt, pUserName)) { + if (!checkDbName(pCxt, &pPrivLevel->first, false) || !checkUserName(pCxt, pUserName) || + !checkTableName(pCxt, &pPrivLevel->second)) { return NULL; } SGrantStmt* pStmt = (SGrantStmt*)nodesMakeNode(QUERY_NODE_GRANT_STMT); From a939174bb7d8fa5a25e977dbcfa537a178a9cc56 Mon Sep 17 00:00:00 2001 From: dmchen Date: Wed, 19 Jun 2024 09:54:14 +0000 Subject: [PATCH 26/53] resolve code review --- source/common/src/tmsg.c | 8 +- source/dnode/mnode/impl/src/mndInfoSchema.c | 7 +- source/dnode/mnode/impl/src/mndUser.c | 227 +++++++++++--------- 3 files changed, 134 insertions(+), 108 deletions(-) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 549c90d185..b2a1aac62d 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -817,7 +817,6 @@ int32_t tDeserializeSMAlterStbReq(void *buf, int32_t bufLen, SMAlterStbReq *pReq for (int32_t i = 0; i < pReq->numOfFields; ++i) { if (pReq->alterType == TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COMPRESS_OPTION) { - taosArrayDestroy(pReq->pFields); pReq->pFields = taosArrayInit(pReq->numOfFields, sizeof(SFieldWithOptions)); SFieldWithOptions field = {0}; @@ -1669,7 +1668,7 @@ int32_t tDeserializeSCreateUserReq(void *buf, int32_t bufLen, SCreateUserReq *pR DECODESQL(); if (!tDecodeIsEnd(&decoder)) { if (tDecodeI8(&decoder, &pReq->createDb) < 0) return -1; - if (tDecodeI8(&decoder, &pReq->isImport) < 0) return -1; + if (tDecodeI8(&decoder, &pReq->isImport) < 0) return -1; } tEndDecode(&decoder); @@ -4610,6 +4609,7 @@ int32_t tSerializeSRetrieveTableReq(void *buf, int32_t bufLen, SRetrieveTableReq if (tEncodeCStr(&encoder, pReq->filterTb) < 0) return -1; if (tEncodeCStr(&encoder, pReq->user) < 0) return -1; if (tEncodeI64(&encoder, pReq->compactId) < 0) return -1; + if (tEncodeI8(&encoder, pReq->withFull) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; @@ -4632,7 +4632,9 @@ int32_t tDeserializeSRetrieveTableReq(void *buf, int32_t bufLen, SRetrieveTableR } else { pReq->compactId = -1; } - + if (!tDecodeIsEnd(&decoder)) { + if (tDecodeI8(&decoder, (int8_t *)&pReq->withFull) < 0) return -1; + } tEndDecode(&decoder); tDecoderClear(&decoder); return 0; diff --git a/source/dnode/mnode/impl/src/mndInfoSchema.c b/source/dnode/mnode/impl/src/mndInfoSchema.c index 82cdbd8613..0a98a01b22 100644 --- a/source/dnode/mnode/impl/src/mndInfoSchema.c +++ b/source/dnode/mnode/impl/src/mndInfoSchema.c @@ -76,13 +76,12 @@ int32_t mndBuildInsTableSchema(SMnode *pMnode, const char *dbFName, const char * } STableMetaRsp *pMeta = NULL; - if(strcmp(tbName, TSDB_INS_TABLE_USERS_FULL) == 0) { + if (strcmp(tbName, TSDB_INS_TABLE_USERS_FULL) == 0) { pMeta = taosHashGet(pMnode->infosMeta, TSDB_INS_TABLE_USERS_FULL, strlen(tbName)); - } - else{ + } else { pMeta = taosHashGet(pMnode->infosMeta, tbName, strlen(tbName)); } - + if (NULL == pMeta) { mError("invalid information schema table name:%s", tbName); terrno = TSDB_CODE_PAR_TABLE_NOT_EXIST; diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 7a9645937b..70461ed752 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -45,35 +45,55 @@ #define ALTER_USER_DEL_PRIVS(_type) ((_type) == TSDB_ALTER_USER_DEL_PRIVILEGES) #define ALTER_USER_ALL_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) -#define ALTER_USER_READ_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_READ) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) -#define ALTER_USER_WRITE_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_WRITE) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) -#define ALTER_USER_ALTER_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALTER) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) +#define ALTER_USER_READ_PRIV(_priv) \ + (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_READ) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) +#define ALTER_USER_WRITE_PRIV(_priv) \ + (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_WRITE) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) +#define ALTER_USER_ALTER_PRIV(_priv) \ + (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALTER) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) #define ALTER_USER_SUBSCRIBE_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_SUBSCRIBE)) #define ALTER_USER_TARGET_DB(_tbname) (0 == (_tbname)[0]) #define ALTER_USER_TARGET_TB(_tbname) (0 != (_tbname)[0]) -#define ALTER_USER_ADD_READ_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_READ_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_WRITE_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_WRITE_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_ALTER_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_ALTER_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_ALL_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_ALL_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_READ_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_READ_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_WRITE_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_WRITE_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_ALTER_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_ALTER_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_ALL_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_ALL_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_READ_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_READ_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_ADD_WRITE_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_WRITE_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_ADD_ALTER_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_ALTER_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_ADD_ALL_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_ALL_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) - -#define ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(_type, _priv) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) -#define ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(_type, _priv) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) +#define ALTER_USER_ADD_READ_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_READ_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_WRITE_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_WRITE_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_ALTER_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_ALTER_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_ALL_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_ALL_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(_type, _priv) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) +#define ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(_type, _priv) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) static SIpWhiteList *createDefaultIpWhiteList(); SIpWhiteList *createIpWhiteList(void *buf, int32_t len); @@ -1443,10 +1463,10 @@ void mndReleaseUser(SMnode *pMnode, SUserObj *pUser) { static int32_t mndCreateUser(SMnode *pMnode, char *acct, SCreateUserReq *pCreate, SRpcMsg *pReq) { SUserObj userObj = {0}; - if(pCreate->isImport != 1){ + if (pCreate->isImport != 1) { taosEncryptPass_c((uint8_t *)pCreate->pass, strlen(pCreate->pass), userObj.pass); - }else{ - //mInfo("pCreate->pass:%s", pCreate->pass) + } else { + // mInfo("pCreate->pass:%s", pCreate->pass) strncpy(userObj.pass, pCreate->pass, TSDB_PASSWORD_LEN); } tstrncpy(userObj.user, pCreate->user, TSDB_USER_LEN); @@ -1542,21 +1562,19 @@ static int32_t mndProcessCreateUserReq(SRpcMsg *pReq) { goto _OVER; } - mInfo("user:%s, start to create, createdb:%d, is_import:%d", createReq.user, createReq.isImport, - createReq.createDb); + mInfo("user:%s, start to create, createdb:%d, is_import:%d", createReq.user, createReq.isImport, createReq.createDb); #ifndef TD_ENTERPRISE - if(createReq.isImport == 1){ + if (createReq.isImport == 1) { goto _OVER; } #endif - if(createReq.isImport != 1){ + if (createReq.isImport != 1) { if (mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_USER) != 0) { goto _OVER; } - } - else{ + } else { if (strcmp(pReq->info.conn.user, "root") != 0) { mError("The operation is not permitted, user:%s", pReq->info.conn.user); terrno = TSDB_CODE_MND_NO_RIGHTS; @@ -1574,7 +1592,7 @@ static int32_t mndProcessCreateUserReq(SRpcMsg *pReq) { goto _OVER; } - if(createReq.isImport != 1){ + if (createReq.isImport != 1) { if (strlen(createReq.pass) >= TSDB_PASSWORD_LEN) { terrno = TSDB_CODE_PAR_NAME_OR_PASSWD_TOO_LONG; goto _OVER; @@ -1602,8 +1620,8 @@ static int32_t mndProcessCreateUserReq(SRpcMsg *pReq) { if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; char detail[1000] = {0}; - sprintf(detail, "enable:%d, superUser:%d, sysInfo:%d, password:xxx", - createReq.enable, createReq.superUser, createReq.sysInfo); + sprintf(detail, "enable:%d, superUser:%d, sysInfo:%d, password:xxx", createReq.enable, createReq.superUser, + createReq.sysInfo); char operation[15] = {0}; if (createReq.isImport == 1) { strcpy(operation, "importUser"); @@ -1799,7 +1817,7 @@ static int32_t mndRemoveTablePriviledge(SMnode *pMnode, SHashObj *hash, SHashObj if (NULL == currRef) { return 0; } - + if (1 == *currRef) { if (taosHashRemove(useDbHash, alterReq->objname, dbKeyLen) != 0) { return -1; @@ -1833,12 +1851,12 @@ static char *mndUserAuditTypeStr(int32_t type) { return "error"; } -static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode *pMnode, SUserObj* pNewUser) { - SSdb *pSdb = pMnode->pSdb; - void *pIter = NULL; +static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode *pMnode, SUserObj *pNewUser) { + SSdb *pSdb = pMnode->pSdb; + void *pIter = NULL; - if (ALTER_USER_ADD_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || - ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1863,7 +1881,8 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - if (ALTER_USER_ADD_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1888,7 +1907,8 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - if (ALTER_USER_DEL_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_DEL_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1903,7 +1923,8 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - if (ALTER_USER_DEL_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_DEL_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1918,9 +1939,9 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - SHashObj* pReadTbs = pNewUser->readTbs; - SHashObj* pWriteTbs = pNewUser->writeTbs; - SHashObj* pAlterTbs = pNewUser->alterTbs; + SHashObj *pReadTbs = pNewUser->readTbs; + SHashObj *pWriteTbs = pNewUser->writeTbs; + SHashObj *pAlterTbs = pNewUser->alterTbs; #ifdef TD_ENTERPRISE if (pAlterReq->isView) { @@ -1930,15 +1951,18 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } #endif - if (ALTER_USER_ADD_READ_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_READ_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (mndTablePriviledge(pMnode, pReadTbs, pNewUser->useDbs, pAlterReq, pSdb) != 0) return -1; } - if (ALTER_USER_ADD_WRITE_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_WRITE_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (mndTablePriviledge(pMnode, pWriteTbs, pNewUser->useDbs, pAlterReq, pSdb) != 0) return -1; } - if (ALTER_USER_ADD_ALTER_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_ALTER_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (mndTablePriviledge(pMnode, pAlterTbs, pNewUser->useDbs, pAlterReq, pSdb) != 0) return -1; } @@ -2049,7 +2073,7 @@ static int32_t mndProcessAlterUserReq(SRpcMsg *pReq) { newUser.sysInfo = alterReq.sysInfo; } - if(alterReq.alterType == TSDB_ALTER_USER_CREATEDB) { + if (alterReq.alterType == TSDB_ALTER_USER_CREATEDB) { newUser.createdb = alterReq.createdb; } @@ -2152,52 +2176,43 @@ static int32_t mndProcessAlterUserReq(SRpcMsg *pReq) { code = mndAlterUser(pMnode, pUser, &newUser, pReq); if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; - if(alterReq.alterType == TSDB_ALTER_USER_PASSWD){ + if (alterReq.alterType == TSDB_ALTER_USER_PASSWD) { char detail[1000] = {0}; sprintf(detail, "alterType:%s, enable:%d, superUser:%d, sysInfo:%d, createdb:%d, tabName:%s, password:xxx", mndUserAuditTypeStr(alterReq.alterType), alterReq.enable, alterReq.superUser, alterReq.sysInfo, alterReq.createdb ? 1 : 0, alterReq.tabName); auditRecord(pReq, pMnode->clusterId, "alterUser", "", alterReq.user, detail, strlen(detail)); - } - else if(alterReq.alterType == TSDB_ALTER_USER_SUPERUSER || - alterReq.alterType == TSDB_ALTER_USER_ENABLE || - alterReq.alterType == TSDB_ALTER_USER_SYSINFO || - alterReq.alterType == TSDB_ALTER_USER_CREATEDB){ + } else if (alterReq.alterType == TSDB_ALTER_USER_SUPERUSER || alterReq.alterType == TSDB_ALTER_USER_ENABLE || + alterReq.alterType == TSDB_ALTER_USER_SYSINFO || alterReq.alterType == TSDB_ALTER_USER_CREATEDB) { auditRecord(pReq, pMnode->clusterId, "alterUser", "", alterReq.user, alterReq.sql, alterReq.sqlLen); - } - else if(ALTER_USER_ADD_READ_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_WRITE_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_ALL_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_READ_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_WRITE_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_ALL_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)){ - if (strcmp(alterReq.objname, "1.*") != 0){ + } else if (ALTER_USER_ADD_READ_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_WRITE_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_ALL_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_READ_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_WRITE_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)) { + if (strcmp(alterReq.objname, "1.*") != 0) { SName name = {0}; tNameFromString(&name, alterReq.objname, T_NAME_ACCT | T_NAME_DB); - auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", name.dbname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - }else{ - auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", "", alterReq.user, - alterReq.sql, alterReq.sqlLen); + auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", name.dbname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else { + auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", "", alterReq.user, alterReq.sql, alterReq.sqlLen); } - } - else if(ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)){ - auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", alterReq.objname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - } - else if(ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)){ - auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", alterReq.objname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - } - else{ - if (strcmp(alterReq.objname, "1.*") != 0){ + } else if (ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)) { + auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", alterReq.objname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else if (ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)) { + auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", alterReq.objname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else { + if (strcmp(alterReq.objname, "1.*") != 0) { SName name = {0}; tNameFromString(&name, alterReq.objname, T_NAME_ACCT | T_NAME_DB); - auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", name.dbname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - }else{ - auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", "", alterReq.user, - alterReq.sql, alterReq.sqlLen); + auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", name.dbname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else { + auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", "", alterReq.user, alterReq.sql, alterReq.sqlLen); } } @@ -2398,14 +2413,15 @@ static int32_t mndRetrieveUsers(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl } static int32_t mndRetrieveUsersFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { - int32_t numOfRows = 0; -#ifdef TD_ENTERPRISE + int32_t numOfRows = 0; +#ifdef TD_ENTERPRISE SMnode *pMnode = pReq->info.node; SSdb *pSdb = pMnode->pSdb; SUserObj *pUser = NULL; int32_t cols = 0; int8_t flag = 0; char *pWrite; + int32_t code = 0; while (numOfRows < rows) { pShow->pIter = sdbFetch(pSdb, SDB_USER, pShow->pIter, (void **)&pUser); @@ -2415,32 +2431,37 @@ static int32_t mndRetrieveUsersFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols); char name[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(name, pUser->user, pShow->pMeta->pSchemas[cols].bytes); - colDataSetVal(pColInfo, numOfRows, (const char *)name, false); + code = colDataSetVal(pColInfo, numOfRows, (const char *)name, false); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); cols++; pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->superUser, false); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->superUser, false); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); cols++; pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->enable, false); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->enable, false); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); cols++; pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->sysInfo, false); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&pUser->sysInfo, false); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); cols++; flag = pUser->createdb ? 1 : 0; pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - colDataSetVal(pColInfo, numOfRows, (const char *)&flag, false); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&flag, false); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); - - //mInfo("pUser->pass:%s", pUser->pass); + // mInfo("pUser->pass:%s", pUser->pass); cols++; pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - char pass[TSDB_PASSWORD_LEN + VARSTR_HEADER_SIZE] = {0}; + char pass[TSDB_PASSWORD_LEN + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(pass, pUser->pass, pShow->pMeta->pSchemas[cols].bytes); - colDataSetVal(pColInfo, numOfRows, (const char *)pass, false); + code = colDataSetVal(pColInfo, numOfRows, (const char *)pass, false); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); cols++; @@ -2453,13 +2474,15 @@ static int32_t mndRetrieveUsersFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock memcpy(varDataVal(varstr), buf, tlen); pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - colDataSetVal(pColInfo, numOfRows, (const char *)varstr, false); + code = colDataSetVal(pColInfo, numOfRows, (const char *)varstr, false); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); taosMemoryFree(varstr); taosMemoryFree(buf); } else { pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - colDataSetVal(pColInfo, numOfRows, (const char *)NULL, true); + code = colDataSetVal(pColInfo, numOfRows, (const char *)NULL, true); + if (code != 0) mError("User:%s, failed to retrieve at columns:%d, cause %s", pUser->acct, cols, tstrerror(code)); } numOfRows++; @@ -2587,11 +2610,14 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock int32_t numOfReadViews = taosHashGetSize(pUser->readViews); int32_t numOfWriteViews = taosHashGetSize(pUser->writeViews); int32_t numOfAlterViews = taosHashGetSize(pUser->alterViews); - if (numOfRows + numOfReadDbs + numOfWriteDbs + numOfTopics + numOfReadTbs + numOfWriteTbs + numOfAlterTbs + numOfReadViews + numOfWriteViews + numOfAlterViews >= rows) { + if (numOfRows + numOfReadDbs + numOfWriteDbs + numOfTopics + numOfReadTbs + numOfWriteTbs + numOfAlterTbs + + numOfReadViews + numOfWriteViews + numOfAlterViews >= + rows) { mInfo( "will restore. current num of rows: %d, read dbs %d, write dbs %d, topics %d, read tables %d, write tables " "%d, alter tables %d, read views %d, write views %d, alter views %d", - numOfRows, numOfReadDbs, numOfWriteDbs, numOfTopics, numOfReadTbs, numOfWriteTbs, numOfAlterTbs, numOfReadViews, numOfWriteViews, numOfAlterViews); + numOfRows, numOfReadDbs, numOfWriteDbs, numOfTopics, numOfReadTbs, numOfWriteTbs, numOfAlterTbs, + numOfReadViews, numOfWriteViews, numOfAlterViews); pShow->restore = true; sdbRelease(pSdb, pUser); break; @@ -2977,7 +3003,6 @@ int32_t mndUserRemoveView(SMnode *pMnode, STrans *pTrans, char *view) { return code; } - int32_t mndUserRemoveTopic(SMnode *pMnode, STrans *pTrans, char *topic) { int32_t code = 0; SSdb *pSdb = pMnode->pSdb; From 8d18e7cd9d0df9c135a51a304e5d5fc47d0015f3 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 19 Jun 2024 19:11:52 +0800 Subject: [PATCH 27/53] fix(util): fix decode timestamp error by using avx2. --- source/util/src/tdecompress.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/source/util/src/tdecompress.c b/source/util/src/tdecompress.c index 38f277fb48..046cba8686 100644 --- a/source/util/src/tdecompress.c +++ b/source/util/src/tdecompress.c @@ -329,6 +329,7 @@ int32_t tsDecompressFloatImplAvx2(const char *const input, const int32_t nelemen return 0; } +// decode two timestamps in one loop. int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelements, char *const output, bool bigEndian) { int64_t *ostream = (int64_t *)output; @@ -375,13 +376,13 @@ int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelemen __m128i deltaOfDelta = _mm_xor_si128(_mm_srli_epi64(zzVal, 1), signmask); __m128i deltaCurrent = _mm_add_epi64(deltaOfDelta, prevDelta); - deltaCurrent = _mm_add_epi64(_mm_slli_si128(deltaCurrent, 8), deltaCurrent); + deltaCurrent = _mm_add_epi64(_mm_slli_si128(deltaOfDelta, 8), deltaCurrent); - __m128i val = _mm_add_epi64(deltaCurrent, prevVal); - _mm_storeu_si128((__m128i *)&ostream[opos], val); + __m128i finalVal = _mm_add_epi64(deltaCurrent, prevVal); + _mm_storeu_si128((__m128i *)&ostream[opos], finalVal); // keep the previous value - prevVal = _mm_shuffle_epi32 (val, 0xEE); + prevVal = _mm_shuffle_epi32 (finalVal, 0xEE); // keep the previous delta of delta, for the first item prevDelta = _mm_shuffle_epi32(deltaOfDelta, 0xEE); @@ -428,17 +429,18 @@ int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelemen __m128i deltaOfDelta = _mm_xor_si128(_mm_srli_epi64(zzVal, 1), signmask); __m128i deltaCurrent = _mm_add_epi64(deltaOfDelta, prevDelta); - deltaCurrent = _mm_add_epi64(_mm_slli_si128(deltaCurrent, 8), deltaCurrent); + deltaCurrent = _mm_add_epi64(_mm_slli_si128(deltaOfDelta, 8), deltaCurrent); - __m128i val = _mm_add_epi64(deltaCurrent, prevVal); - _mm_storeu_si128((__m128i *)&ostream[opos], val); + __m128i finalVal = _mm_add_epi64(deltaCurrent, prevVal); + finalVal = _mm_add_epi64(_mm_slli_si128(deltaCurrent, 8), finalVal); + + _mm_storeu_si128((__m128i *)&ostream[opos], finalVal); // keep the previous value - prevVal = _mm_shuffle_epi32 (val, 0xEE); + prevVal = _mm_shuffle_epi32 (finalVal, 0xEE); // keep the previous delta of delta - __m128i delta = _mm_add_epi64(_mm_slli_si128(deltaOfDelta, 8), deltaOfDelta); - prevDelta = _mm_shuffle_epi32(_mm_add_epi64(delta, prevDelta), 0xEE); + prevDelta = _mm_shuffle_epi32 (deltaCurrent, 0xEE); opos += 2; ipos += nbytes1 + nbytes2; From e9b07459473f8f391b9ab9d5d39153e156befa86 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 19 Jun 2024 19:15:45 +0800 Subject: [PATCH 28/53] fix(util): update test cases. --- source/util/test/decompressTest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/util/test/decompressTest.cpp b/source/util/test/decompressTest.cpp index c982f450ea..b3cf46fea6 100644 --- a/source/util/test/decompressTest.cpp +++ b/source/util/test/decompressTest.cpp @@ -37,6 +37,20 @@ TEST(utilTest, decompress_ts_test) { std::cout << ((int64_t*)decompOutput)[i] << std::endl; } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + int64_t tsList[4] = {1286, 1124, 2681, 2823}; + + char* pOutput[4 * sizeof(int64_t)] = {0}; + int32_t len = tsCompressTimestamp(tsList, sizeof(tsList), sizeof(tsList) / sizeof(tsList[0]), pOutput, 4, + ONE_STAGE_COMP, NULL, 0); + + char* decompOutput[4 * 8] = {0}; + tsDecompressTimestamp(pOutput, len, 4, decompOutput, sizeof(int64_t) * 4, ONE_STAGE_COMP, NULL, 0); + + for (int32_t i = 0; i < 4; ++i) { + std::cout << ((int64_t*)decompOutput)[i] << std::endl; + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// int64_t tsList1[7] = {1700000000, 1700000000, 1700000000, 1700000000, 1700000000, 1700000000, 1700000900}; int32_t len1 = tsCompressTimestamp(tsList1, sizeof(tsList1), sizeof(tsList1) / sizeof(tsList1[0]), pOutput, 7, From aa83628383f45cc3620bd34d53e93856a6da3895 Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Tue, 18 Jun 2024 12:51:24 +0000 Subject: [PATCH 29/53] fix parital update --- source/util/src/tcompression.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/source/util/src/tcompression.c b/source/util/src/tcompression.c index 4635ec340d..1e7e09794f 100644 --- a/source/util/src/tcompression.c +++ b/source/util/src/tcompression.c @@ -2918,6 +2918,7 @@ int32_t tcompressDebug(uint32_t cmprAlg, uint8_t *l1Alg, uint8_t *l2Alg, uint8_t } int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, uint8_t lvlDiabled, uint8_t lvlDefault, uint32_t *dst) { + int8_t update = 0; uint8_t ol1 = COMPRESS_L1_TYPE_U32(oldCmpr); uint8_t ol2 = COMPRESS_L2_TYPE_U32(oldCmpr); uint8_t olvl = COMPRESS_L2_TYPE_LEVEL_U32(oldCmpr); @@ -2927,8 +2928,11 @@ int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, u uint8_t nlvl = COMPRESS_L2_TYPE_LEVEL_U32(newCmpr); if (nl1 != 0 && ol1 != nl1) { SET_COMPRESS(nl1, ol2, olvl, *dst); - return 1; - } else if (nl2 != 0 && ol2 != nl2) { + update = 1; + ol1 = nl1; + } + + if (nl2 != 0 && ol2 != nl2) { if (nl2 == l2Disabled) { SET_COMPRESS(ol1, nl2, lvlDiabled, *dst); } else { @@ -2938,10 +2942,13 @@ int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, u SET_COMPRESS(ol1, nl2, olvl, *dst); } } - return 1; - } else if (nlvl != 0 && olvl != nlvl) { - SET_COMPRESS(ol1, ol2, nlvl, *dst); - return 1; + update = 1; + ol2 = nl2; } - return 0; + + if (nlvl != 0 && olvl != nlvl) { + SET_COMPRESS(ol1, ol2, nlvl, *dst); + update = 1; + } + return update; } From e4916d13a5c245820e3918bf623107b0b15395c1 Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Wed, 19 Jun 2024 12:11:03 +0000 Subject: [PATCH 30/53] update case --- source/util/src/tcompression.c | 7 +++++++ tests/script/tsim/compress/compress2.sim | 25 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/source/util/src/tcompression.c b/source/util/src/tcompression.c index 1e7e09794f..0cc822da4c 100644 --- a/source/util/src/tcompression.c +++ b/source/util/src/tcompression.c @@ -2916,7 +2916,9 @@ int32_t tcompressDebug(uint32_t cmprAlg, uint8_t *l1Alg, uint8_t *l2Alg, uint8_t *level = lvl; return 0; } + int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, uint8_t lvlDiabled, uint8_t lvlDefault, + uint32_t *dst) { int8_t update = 0; uint8_t ol1 = COMPRESS_L1_TYPE_U32(oldCmpr); @@ -2926,6 +2928,10 @@ int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, u uint8_t nl1 = COMPRESS_L1_TYPE_U32(newCmpr); uint8_t nl2 = COMPRESS_L2_TYPE_U32(newCmpr); uint8_t nlvl = COMPRESS_L2_TYPE_LEVEL_U32(newCmpr); + + // nl1 == 0, not update encode + // nl2 == 0, not update compress + // nl3 == 0, not update level if (nl1 != 0 && ol1 != nl1) { SET_COMPRESS(nl1, ol2, olvl, *dst); update = 1; @@ -2950,5 +2956,6 @@ int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, u SET_COMPRESS(ol1, ol2, nlvl, *dst); update = 1; } + return update; } diff --git a/tests/script/tsim/compress/compress2.sim b/tests/script/tsim/compress/compress2.sim index a439d75a59..0af6f87de4 100644 --- a/tests/script/tsim/compress/compress2.sim +++ b/tests/script/tsim/compress/compress2.sim @@ -163,6 +163,31 @@ sql alter table $stb modify column f compress 'zlib' sql desc $stb sql alter table $stb modify column f compress 'zstd' + +sql alter table $stb modify column f compress 'zstd' level 'h' +sql_error alter table $stb modify column f compress 'zstd' level 'h' + +sql alter table $stb modify column f compress 'lz4' level 'h' +sql_error alter table $stb modify column f compress 'lz4' level 'h' + + +sql alter table $stb modify column f level 'low' +sql_error alter table $stb modify column f compress 'lz4' + +sql_error alter table $stb modify column f compress 'lz4' level 'low' + +sql alter table $stb modify column f compress 'zstd' level 'h' + +sql_error alter table $stb modify column f compress 'zstd' +sql_error alter table $stb modify column f level 'h' + + + +sql alter table $stb modify column f compress 'lz4' + + + + sql_error alter table $stb modify column d compress 'lz4' # same with init sql alter table $stb modify column d compress 'disabled' sql desc $stb From 01ee8b36a4424a98a0d3002ffc6969972df8e9ef Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Wed, 19 Jun 2024 12:35:38 +0000 Subject: [PATCH 31/53] update case --- source/dnode/mnode/impl/src/mndStb.c | 6 +++++- source/dnode/vnode/src/meta/metaTable.c | 7 ++++++- source/util/src/tcompression.c | 10 ++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index 0d3affe6e5..41ca6aadc2 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -1766,7 +1766,7 @@ static int32_t mndUpdateSuperTableColumnCompress(SMnode *pMnode, const SStbObj * uint32_t dst = 0; updated = tUpdateCompress(pCmpr->alg, p->bytes, TSDB_COLVAL_COMPRESS_DISABLED, TSDB_COLVAL_LEVEL_DISABLED, TSDB_COLVAL_LEVEL_MEDIUM, &dst); - if (updated) pCmpr->alg = dst; + if (updated > 0) pCmpr->alg = dst; break; } } @@ -1774,7 +1774,11 @@ static int32_t mndUpdateSuperTableColumnCompress(SMnode *pMnode, const SStbObj * if (updated == 0) { terrno = TSDB_CODE_MND_COLUMN_COMPRESS_ALREADY_EXIST; return -1; + } else if (update == -1) { + terrno = TSDB_CODE_TSC_COMPRESS_LEVEL_ERROR; + return -1; } + pNew->colVer++; return 0; diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 2a122081b8..4c0091fcb7 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -2240,7 +2240,7 @@ int32_t metaUpdateTableColCompress(SMeta *pMeta, int64_t version, SVAlterTbReq * uint32_t dst = 0; updated = tUpdateCompress(p->alg, pReq->compress, TSDB_COLVAL_COMPRESS_DISABLED, TSDB_COLVAL_LEVEL_DISABLED, TSDB_COLVAL_LEVEL_MEDIUM, &dst); - if (updated) { + if (updated > 0) { p->alg = dst; } } @@ -2250,6 +2250,11 @@ int32_t metaUpdateTableColCompress(SMeta *pMeta, int64_t version, SVAlterTbReq * tDecoderClear(&dc); terrno = TSDB_CODE_VND_COLUMN_COMPRESS_ALREADY_EXIST; goto _err; + } else if (update < 0) { + tdbFree(pVal); + tDecoderClear(&dc); + terrno = TSDB_CODE_TSC_COMPRESS_LEVEL_ERROR; + goto _err; } tbEntry.version = version; diff --git a/source/util/src/tcompression.c b/source/util/src/tcompression.c index 0cc822da4c..92d8ca3313 100644 --- a/source/util/src/tcompression.c +++ b/source/util/src/tcompression.c @@ -2953,8 +2953,14 @@ int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, u } if (nlvl != 0 && olvl != nlvl) { - SET_COMPRESS(ol1, ol2, nlvl, *dst); - update = 1; + if (update == 0) { + if (ol2 == L2_DISABLED) { + update = -1; + } + } else { + SET_COMPRESS(ol1, ol2, nlvl, *dst); + update = 1; + } } return update; From a5441b78bc599dad60e93cb25e6912272da2ca67 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 31 Dec 2024 11:13:23 +0800 Subject: [PATCH 32/53] docs: createdb permission for user --- docs/en/12-taos-sql/25-grant.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/en/12-taos-sql/25-grant.md b/docs/en/12-taos-sql/25-grant.md index 5ebed12b59..3c8ecff8d1 100644 --- a/docs/en/12-taos-sql/25-grant.md +++ b/docs/en/12-taos-sql/25-grant.md @@ -39,10 +39,10 @@ This is an example: ```sql taos> show users; - name | super | enable | sysinfo | create_time | -================================================================================ - test | 0 | 1 | 1 | 2022-08-29 15:10:27.315 | - root | 1 | 1 | 1 | 2022-08-29 15:03:34.710 | + name | super | enable | sysinfo | createdb | create_time | allowed_host | +========================================================================================================= + test | 0 | 1 | 1 | 0 |2022-08-29 15:10:27.315 | 127.0.0.1 | + root | 1 | 1 | 1 | 1 |2022-08-29 15:03:34.710 | 127.0.0.1 | Query OK, 2 rows in database (0.001657s) ``` @@ -50,10 +50,10 @@ Alternatively, you can get the user information by querying a built-in table, IN ```sql taos> select * from information_schema.ins_users; - name | super | enable | sysinfo | create_time | -================================================================================ - test | 0 | 1 | 1 | 2022-08-29 15:10:27.315 | - root | 1 | 1 | 1 | 2022-08-29 15:03:34.710 | + name | super | enable | sysinfo | createdb | create_time | allowed_host | +========================================================================================================= + test | 0 | 1 | 1 | 0 |2022-08-29 15:10:27.315 | 127.0.0.1 | + root | 1 | 1 | 1 | 1 |2022-08-29 15:03:34.710 | 127.0.0.1 | Query OK, 2 rows in database (0.001953s) ``` @@ -72,12 +72,14 @@ alter_user_clause: { PASS 'literal' | ENABLE value | SYSINFO value + | CREATEDB value } ``` - PASS: Modify the user password. - ENABLE: Specify whether the user is enabled or disabled. 1 indicates enabled and 0 indicates disabled. - SYSINFO: Specify whether the user can query system information. 1 indicates that the user can query system information and 0 indicates that the user cannot query system information. +- CREATEDB: Specify whether the user can create databases. 1 indicates that the user can create databases and 0 indicates that the user cannot create databases. For example, you can use below command to disable user `test`: From ad00c62df0df69d9459cca314953d4aaa127df0b Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 20 Jun 2024 06:33:55 +0800 Subject: [PATCH 33/53] docs: createdb permission for user --- docs/zh/12-taos-sql/25-grant.md | 91 +++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 docs/zh/12-taos-sql/25-grant.md diff --git a/docs/zh/12-taos-sql/25-grant.md b/docs/zh/12-taos-sql/25-grant.md new file mode 100644 index 0000000000..a77a5d6a67 --- /dev/null +++ b/docs/zh/12-taos-sql/25-grant.md @@ -0,0 +1,91 @@ +--- +title: 用户管理 +sidebar_label: 用户管理 +description: 本节讲述基本的用户管理功能 +--- + +用户和权限管理是 TDengine 企业版的功能,本节只讲述基本的用户管理部分。要想了解和获取全面的权限管理功能,请联系 TDengine 销售团队。 + +## 创建用户 + +```sql +CREATE USER user_name PASS 'password' [SYSINFO {1|0}]; +``` + +用户名最长不超过 23 个字节。 + +密码最长不超过 31 个字节。密码可以包含字母、数字以及除单引号、双引号、反引号、反斜杠和空格以外的特殊字符,密码不能为空字符串。 + +`SYSINFO` 表示该用户是否能够查看系统信息。`1` 表示可以查看,`0` 表示无权查看。系统信息包括服务配置、dnode、vnode、存储等信息。缺省值为 `1`。 + +在下面的示例中,我们创建一个密码为 `123456` 且可以查看系统信息的用户。 + +```sql +taos> create user test pass '123456' sysinfo 1; +Query OK, 0 of 0 rows affected (0.001254s) +``` + +## 查看用户 + +可以使用如下命令查看系统中的用户。 + +```sql +SHOW USERS; +``` + +以下是示例: + +```sql +taos> show users; + name | super | enable | sysinfo | createdb | create_time | allowed_host | +========================================================================================================= + test | 0 | 1 | 1 | 0 |2022-08-29 15:10:27.315 | 127.0.0.1 | + root | 1 | 1 | 1 | 1 |2022-08-29 15:03:34.710 | 127.0.0.1 | +Query OK, 2 rows in database (0.001657s) +``` + +或者,可以查询内置系统表 INFORMATION_SCHEMA.INS_USERS 来获取用户信息。 + +```sql +taos> select * from information_schema.ins_users; + name | super | enable | sysinfo | createdb | create_time | allowed_host | +========================================================================================================= + test | 0 | 1 | 1 | 0 |2022-08-29 15:10:27.315 | 127.0.0.1 | + root | 1 | 1 | 1 | 1 |2022-08-29 15:03:34.710 | 127.0.0.1 | +Query OK, 2 rows in database (0.001953s) +``` + +## 删除用户 + +```sql +DROP USER user_name; +``` + +## 修改用户配置 + +```sql +ALTER USER user_name alter_user_clause + +alter_user_clause: { + PASS 'literal' + | ENABLE value + | SYSINFO value + | CREATEDB value +} +``` + +- PASS: 修改密码,后跟新密码 +- ENABLE: 启用或禁用该用户,`1` 表示启用,`0` 表示禁用 +- SYSINFO: 允许或禁止查看系统信息,`1` 表示允许,`0` 表示禁止 +- CREATEDB: 允许或禁止创建数据库,`1` 表示允许,`0` 表示禁止 + +下面的示例禁用了名为 `test` 的用户: + +```sql +taos> alter user test enable 0; +Query OK, 0 of 0 rows affected (0.001160s) +``` + +## 授权管理 + +授权管理仅在 TDengine 企业版中可用,请联系 TDengine 销售团队。 \ No newline at end of file From 639df3dfad49950d177850908fbd318e18bc52dd Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Thu, 20 Jun 2024 00:13:32 +0000 Subject: [PATCH 34/53] update case --- source/dnode/mnode/impl/src/mndStb.c | 2 +- source/dnode/vnode/src/meta/metaTable.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index 41ca6aadc2..8abcd1e9c8 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -1774,7 +1774,7 @@ static int32_t mndUpdateSuperTableColumnCompress(SMnode *pMnode, const SStbObj * if (updated == 0) { terrno = TSDB_CODE_MND_COLUMN_COMPRESS_ALREADY_EXIST; return -1; - } else if (update == -1) { + } else if (updated == -1) { terrno = TSDB_CODE_TSC_COMPRESS_LEVEL_ERROR; return -1; } diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 4c0091fcb7..58eef3caa6 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -2250,7 +2250,7 @@ int32_t metaUpdateTableColCompress(SMeta *pMeta, int64_t version, SVAlterTbReq * tDecoderClear(&dc); terrno = TSDB_CODE_VND_COLUMN_COMPRESS_ALREADY_EXIST; goto _err; - } else if (update < 0) { + } else if (updated < 0) { tdbFree(pVal); tDecoderClear(&dc); terrno = TSDB_CODE_TSC_COMPRESS_LEVEL_ERROR; From ecfb5e5f4c1bbffbce40bfc94bcf58f713c92594 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Thu, 20 Jun 2024 09:28:04 +0800 Subject: [PATCH 35/53] adj par name catch --- include/libs/executor/storageapi.h | 2 +- include/libs/stream/streamState.h | 2 +- source/libs/executor/src/groupoperator.c | 4 ++-- source/libs/executor/src/scanoperator.c | 4 ++-- source/libs/executor/src/streamfilloperator.c | 2 +- source/libs/executor/src/streamtimewindowoperator.c | 8 ++++---- source/libs/stream/src/streamState.c | 5 ++++- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/include/libs/executor/storageapi.h b/include/libs/executor/storageapi.h index 1b2280115a..45f9f73fb1 100644 --- a/include/libs/executor/storageapi.h +++ b/include/libs/executor/storageapi.h @@ -329,7 +329,7 @@ typedef struct { typedef struct SStateStore { int32_t (*streamStatePutParName)(SStreamState* pState, int64_t groupId, const char* tbname); - int32_t (*streamStateGetParName)(SStreamState* pState, int64_t groupId, void** pVal); + int32_t (*streamStateGetParName)(SStreamState* pState, int64_t groupId, void** pVal, bool onlyCache); int32_t (*streamStateAddIfNotExist)(SStreamState* pState, const SWinKey* key, void** pVal, int32_t* pVLen); int32_t (*streamStateReleaseBuf)(SStreamState* pState, void* pVal, bool used); diff --git a/include/libs/stream/streamState.h b/include/libs/stream/streamState.h index 106efa8947..5768160fdb 100644 --- a/include/libs/stream/streamState.h +++ b/include/libs/stream/streamState.h @@ -101,7 +101,7 @@ int32_t streamStateCurNext(SStreamState* pState, SStreamStateCur* pCur); int32_t streamStateCurPrev(SStreamState* pState, SStreamStateCur* pCur); int32_t streamStatePutParName(SStreamState* pState, int64_t groupId, const char* tbname); -int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal); +int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal, bool onlyCache); void streamStateReloadInfo(SStreamState* pState, TSKEY ts); diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 8196a7ccde..3a124197e0 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -1157,7 +1157,7 @@ static SSDataBlock* buildStreamPartitionResult(SOperatorInfo* pOperator) { pDest->info.parTbName[0] = 0; if (pInfo->tbnameCalSup.numOfExprs > 0) { void* tbname = NULL; - if (pAPI->stateStore.streamStateGetParName(pOperator->pTaskInfo->streamInfo.pState, pParInfo->groupId, &tbname) == 0) { + if (pAPI->stateStore.streamStateGetParName(pOperator->pTaskInfo->streamInfo.pState, pParInfo->groupId, &tbname, false) == 0) { memcpy(pDest->info.parTbName, tbname, TSDB_TABLE_NAME_LEN); pAPI->stateStore.streamStateFreeVal(tbname); } @@ -1178,7 +1178,7 @@ static SSDataBlock* buildStreamPartitionResult(SOperatorInfo* pOperator) { void appendCreateTableRow(void* pState, SExprSupp* pTableSup, SExprSupp* pTagSup, uint64_t groupId, SSDataBlock* pSrcBlock, int32_t rowId, SSDataBlock* pDestBlock, SStateStore* pAPI) { void* pValue = NULL; - if (pAPI->streamStateGetParName(pState, groupId, &pValue) != 0) { + if (pAPI->streamStateGetParName(pState, groupId, &pValue, true) != 0) { SSDataBlock* pTmpBlock = blockCopyOneRow(pSrcBlock, rowId); memset(pTmpBlock->info.parTbName, 0, TSDB_TABLE_NAME_LEN); pTmpBlock->info.id.groupId = groupId; diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 1b90088605..baf98d8069 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1892,7 +1892,7 @@ static int32_t generatePartitionDelResBlock(SStreamScanInfo* pInfo, SSDataBlock* groupId = calGroupIdByData(&pInfo->partitionSup, pInfo->pPartScalarSup, pPreRes, preJ); if (pInfo->pPartTbnameSup) { void* parTbname = NULL; - int32_t code = pInfo->stateStore.streamStateGetParName(pInfo->pStreamScanOp->pTaskInfo->streamInfo.pState, groupId, &parTbname); + int32_t code = pInfo->stateStore.streamStateGetParName(pInfo->pStreamScanOp->pTaskInfo->streamInfo.pState, groupId, &parTbname, false); if (code != TSDB_CODE_SUCCESS) { calBlockTbName(pInfo, pPreRes, preJ); memcpy(varDataVal(tbname), pPreRes->info.parTbName, strlen(pPreRes->info.parTbName)); @@ -1938,7 +1938,7 @@ static int32_t generateDeleteResultBlockImpl(SStreamScanInfo* pInfo, SSDataBlock } if (pInfo->tbnameCalSup.pExprInfo) { void* parTbname = NULL; - int32_t code = pInfo->stateStore.streamStateGetParName(pInfo->pStreamScanOp->pTaskInfo->streamInfo.pState, groupId, &parTbname); + int32_t code = pInfo->stateStore.streamStateGetParName(pInfo->pStreamScanOp->pTaskInfo->streamInfo.pState, groupId, &parTbname, false); if (code != TSDB_CODE_SUCCESS) { SSDataBlock* pPreRes = readPreVersionData(pInfo->pTableScanOp, srcUid, srcStartTsCol[i], srcStartTsCol[i], ver); printDataBlock(pPreRes, "pre res", GET_TASKID(pInfo->pStreamScanOp->pTaskInfo)); diff --git a/source/libs/executor/src/streamfilloperator.c b/source/libs/executor/src/streamfilloperator.c index b54802e2c6..1cdd7d2d87 100644 --- a/source/libs/executor/src/streamfilloperator.c +++ b/source/libs/executor/src/streamfilloperator.c @@ -707,7 +707,7 @@ static void buildDeleteRange(SOperatorInfo* pOp, TSKEY start, TSKEY end, uint64_ SColumnInfoData* pTableCol = taosArrayGet(pBlock->pDataBlock, TABLE_NAME_COLUMN_INDEX); void* tbname = NULL; - pAPI->stateStore.streamStateGetParName(pOp->pTaskInfo->streamInfo.pState, groupId, &tbname); + pAPI->stateStore.streamStateGetParName(pOp->pTaskInfo->streamInfo.pState, groupId, &tbname, false); if (tbname == NULL) { colDataSetNULL(pTableCol, pBlock->info.rows); } else { diff --git a/source/libs/executor/src/streamtimewindowoperator.c b/source/libs/executor/src/streamtimewindowoperator.c index 2d73cf3cf6..4d567f729e 100644 --- a/source/libs/executor/src/streamtimewindowoperator.c +++ b/source/libs/executor/src/streamtimewindowoperator.c @@ -376,7 +376,7 @@ static void doBuildDeleteResult(SStreamIntervalOperatorInfo* pInfo, SArray* pWin for (int32_t i = *index; i < size; i++) { SWinKey* pWin = taosArrayGet(pWins, i); void* tbname = NULL; - pInfo->stateStore.streamStateGetParName(pInfo->pState, pWin->groupId, &tbname); + pInfo->stateStore.streamStateGetParName(pInfo->pState, pWin->groupId, &tbname, false); if (tbname == NULL) { appendDataToSpecialBlock(pBlock, &pWin->ts, &pWin->ts, &uid, &pWin->groupId, NULL); } else { @@ -750,7 +750,7 @@ int32_t buildDataBlockFromGroupRes(SOperatorInfo* pOperator, void* pState, SSDat if (pBlock->info.id.groupId == 0) { pBlock->info.id.groupId = groupId; void* tbname = NULL; - if (pAPI->stateStore.streamStateGetParName(pTaskInfo->streamInfo.pState, pBlock->info.id.groupId, &tbname) < 0) { + if (pAPI->stateStore.streamStateGetParName(pTaskInfo->streamInfo.pState, pBlock->info.id.groupId, &tbname, false) < 0) { pBlock->info.parTbName[0] = 0; } else { memcpy(pBlock->info.parTbName, tbname, TSDB_TABLE_NAME_LEN); @@ -2276,7 +2276,7 @@ void doBuildDeleteDataBlock(SOperatorInfo* pOp, SSHashObj* pStDeleted, SSDataBlo SColumnInfoData* pTableCol = taosArrayGet(pBlock->pDataBlock, TABLE_NAME_COLUMN_INDEX); void* tbname = NULL; - pAPI->stateStore.streamStateGetParName(pOp->pTaskInfo->streamInfo.pState, res->groupId, &tbname); + pAPI->stateStore.streamStateGetParName(pOp->pTaskInfo->streamInfo.pState, res->groupId, &tbname, false); if (tbname == NULL) { colDataSetNULL(pTableCol, pBlock->info.rows); } else { @@ -2446,7 +2446,7 @@ int32_t buildSessionResultDataBlock(SOperatorInfo* pOperator, void* pState, SSDa void* tbname = NULL; if (pAPI->stateStore.streamStateGetParName((void*)pTaskInfo->streamInfo.pState, pBlock->info.id.groupId, - &tbname) < 0) { + &tbname, false) < 0) { pBlock->info.parTbName[0] = 0; } else { memcpy(pBlock->info.parTbName, tbname, TSDB_TABLE_NAME_LEN); diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 550eac3ef3..23100362ac 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -1106,10 +1106,13 @@ int32_t streamStatePutParName(SStreamState* pState, int64_t groupId, const char #endif } -int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal) { +int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal, bool onlyCache) { #ifdef USE_ROCKSDB void* pStr = tSimpleHashGet(pState->parNameMap, &groupId, sizeof(int64_t)); if (!pStr) { + if (onlyCache) { + return TSDB_CODE_FAILED; + } int32_t code = streamStateGetParName_rocksdb(pState, groupId, pVal); if (code == TSDB_CODE_SUCCESS) { tSimpleHashPut(pState->parNameMap, &groupId, sizeof(int64_t), *pVal, TSDB_TABLE_NAME_LEN); From d0d155171c763a91792a0e59c54cc352ed22fab4 Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Thu, 20 Jun 2024 02:02:22 +0000 Subject: [PATCH 36/53] update case --- source/util/src/tcompression.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/util/src/tcompression.c b/source/util/src/tcompression.c index 92d8ca3313..73875d836a 100644 --- a/source/util/src/tcompression.c +++ b/source/util/src/tcompression.c @@ -2956,11 +2956,11 @@ int8_t tUpdateCompress(uint32_t oldCmpr, uint32_t newCmpr, uint8_t l2Disabled, u if (update == 0) { if (ol2 == L2_DISABLED) { update = -1; + return update; } - } else { - SET_COMPRESS(ol1, ol2, nlvl, *dst); - update = 1; } + SET_COMPRESS(ol1, ol2, nlvl, *dst); + update = 1; } return update; From 6a3bbccda95a32572b708c9fe1f4e7a18b64f3ad Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Thu, 20 Jun 2024 10:23:44 +0800 Subject: [PATCH 37/53] adj par tbname cache --- source/libs/stream/src/streamState.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 23100362ac..cac0e8b662 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -1096,7 +1096,9 @@ _end: int32_t streamStatePutParName(SStreamState* pState, int64_t groupId, const char tbname[TSDB_TABLE_NAME_LEN]) { #ifdef USE_ROCKSDB if (tSimpleHashGet(pState->parNameMap, &groupId, sizeof(int64_t)) == NULL) { - tSimpleHashPut(pState->parNameMap, &groupId, sizeof(int64_t), tbname, TSDB_TABLE_NAME_LEN); + if (tSimpleHashGetSize(pState->parNameMap) < MAX_TABLE_NAME_NUM) { + tSimpleHashPut(pState->parNameMap, &groupId, sizeof(int64_t), tbname, TSDB_TABLE_NAME_LEN); + } streamStatePutParName_rocksdb(pState, groupId, tbname); } return TSDB_CODE_SUCCESS; @@ -1114,7 +1116,7 @@ int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal return TSDB_CODE_FAILED; } int32_t code = streamStateGetParName_rocksdb(pState, groupId, pVal); - if (code == TSDB_CODE_SUCCESS) { + if (code == TSDB_CODE_SUCCESS && tSimpleHashGetSize(pState->parNameMap) < MAX_TABLE_NAME_NUM) { tSimpleHashPut(pState->parNameMap, &groupId, sizeof(int64_t), *pVal, TSDB_TABLE_NAME_LEN); } return code; From f443c89fc8f6740379bbfe7a99c912e9f281a891 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 20 Jun 2024 10:51:30 +0800 Subject: [PATCH 38/53] docs: createdb permission for user --- docs/en/12-taos-sql/25-grant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/12-taos-sql/25-grant.md b/docs/en/12-taos-sql/25-grant.md index 3c8ecff8d1..6575d2d7f4 100644 --- a/docs/en/12-taos-sql/25-grant.md +++ b/docs/en/12-taos-sql/25-grant.md @@ -67,7 +67,7 @@ DROP USER user_name; ```sql ALTER USER user_name alter_user_clause - + alter_user_clause: { PASS 'literal' | ENABLE value From 1b317ae5789c1d6bc1fcdfcae1988d6b2378c8c3 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Thu, 20 Jun 2024 11:06:09 +0800 Subject: [PATCH 39/53] adj sream tbname cache --- source/libs/stream/src/streamState.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index cac0e8b662..31bf1b67a4 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -1112,11 +1112,12 @@ int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal #ifdef USE_ROCKSDB void* pStr = tSimpleHashGet(pState->parNameMap, &groupId, sizeof(int64_t)); if (!pStr) { - if (onlyCache) { + bool isFull = (tSimpleHashGetSize(pState->parNameMap) >= MAX_TABLE_NAME_NUM); + if (onlyCache && isFull) { return TSDB_CODE_FAILED; } int32_t code = streamStateGetParName_rocksdb(pState, groupId, pVal); - if (code == TSDB_CODE_SUCCESS && tSimpleHashGetSize(pState->parNameMap) < MAX_TABLE_NAME_NUM) { + if (code == TSDB_CODE_SUCCESS && isFull) { tSimpleHashPut(pState->parNameMap, &groupId, sizeof(int64_t), *pVal, TSDB_TABLE_NAME_LEN); } return code; From 7000d597fc4fb4e802bb22a5408099772e0c3a19 Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Thu, 20 Jun 2024 03:23:27 +0000 Subject: [PATCH 40/53] Fix the issue of dynamically adjusting the IP whitelist. --- source/client/src/clientHb.c | 56 ++++--- source/dnode/mnode/impl/inc/mndUser.h | 1 + source/dnode/mnode/impl/src/mndPrivilege.c | 22 +-- source/dnode/mnode/impl/src/mndProfile.c | 2 +- source/dnode/mnode/impl/src/mndUser.c | 181 ++++++++++++--------- 5 files changed, 135 insertions(+), 127 deletions(-) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 1b6cb8fd22..a060dab24c 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -133,14 +133,15 @@ static int32_t hbUpdateUserAuthInfo(SAppHbMgr *pAppHbMgr, SUserAuthBatchRsp *bat if (pTscObj->whiteListInfo.fp) { SWhiteListInfo *whiteListInfo = &pTscObj->whiteListInfo; - int64_t oldVer = atomic_load_64(&whiteListInfo->ver); - if (oldVer < pRsp->whiteListVer) { + int64_t oldVer = atomic_load_64(&whiteListInfo->ver); + + if (oldVer < pRsp->whiteListVer || pRsp->whiteListVer == 0) { atomic_store_64(&whiteListInfo->ver, pRsp->whiteListVer); if (whiteListInfo->fp) { (*whiteListInfo->fp)(whiteListInfo->param, &pRsp->whiteListVer, TAOS_NOTIFY_WHITELIST_VER); } - tscDebug("update whitelist version of user %s from %"PRId64" to %"PRId64", tscRid:%" PRIi64, pRsp->user, oldVer, - atomic_load_64(&whiteListInfo->ver), pTscObj->id); + tscDebug("update whitelist version of user %s from %" PRId64 " to %" PRId64 ", tscRid:%" PRIi64, pRsp->user, + oldVer, atomic_load_64(&whiteListInfo->ver), pTscObj->id); } } releaseTscObj(pReq->connKey.tscRid); @@ -202,8 +203,8 @@ static int32_t hbProcessDBInfoRsp(void *value, int32_t valueLen, struct SCatalog for (int32_t i = 0; i < numOfBatchs; ++i) { SDbHbRsp *rsp = taosArrayGet(batchRsp.pArray, i); if (rsp->useDbRsp) { - tscDebug("hb use db rsp, db:%s, vgVersion:%d, stateTs:%" PRId64 ", uid:%" PRIx64, - rsp->useDbRsp->db, rsp->useDbRsp->vgVersion, rsp->useDbRsp->stateTs, rsp->useDbRsp->uid); + tscDebug("hb use db rsp, db:%s, vgVersion:%d, stateTs:%" PRId64 ", uid:%" PRIx64, rsp->useDbRsp->db, + rsp->useDbRsp->vgVersion, rsp->useDbRsp->stateTs, rsp->useDbRsp->uid); if (rsp->useDbRsp->vgVersion < 0) { tscDebug("hb to remove db, db:%s", rsp->useDbRsp->db); @@ -225,7 +226,9 @@ static int32_t hbProcessDBInfoRsp(void *value, int32_t valueLen, struct SCatalog goto _return; } - catalogUpdateDBVgInfo(pCatalog, (rsp->useDbRsp->db[0] == 'i') ? TSDB_PERFORMANCE_SCHEMA_DB : TSDB_INFORMATION_SCHEMA_DB, rsp->useDbRsp->uid, vgInfo); + catalogUpdateDBVgInfo(pCatalog, + (rsp->useDbRsp->db[0] == 'i') ? TSDB_PERFORMANCE_SCHEMA_DB : TSDB_INFORMATION_SCHEMA_DB, + rsp->useDbRsp->uid, vgInfo); } } } @@ -238,7 +241,7 @@ static int32_t hbProcessDBInfoRsp(void *value, int32_t valueLen, struct SCatalog if (rsp->pTsmaRsp) { if (rsp->pTsmaRsp->pTsmas) { for (int32_t i = 0; i < rsp->pTsmaRsp->pTsmas->size; ++i) { - STableTSMAInfo* pTsma = taosArrayGetP(rsp->pTsmaRsp->pTsmas, i); + STableTSMAInfo *pTsma = taosArrayGetP(rsp->pTsmaRsp->pTsmas, i); catalogAsyncUpdateTSMA(pCatalog, &pTsma, rsp->dbTsmaVersion); } taosArrayClear(rsp->pTsmaRsp->pTsmas); @@ -294,16 +297,15 @@ static int32_t hbProcessStbInfoRsp(void *value, int32_t valueLen, struct SCatalo return TSDB_CODE_SUCCESS; } - static int32_t hbProcessDynViewRsp(void *value, int32_t valueLen, struct SCatalog *pCatalog) { - return catalogUpdateDynViewVer(pCatalog, (SDynViewVersion*)value); + return catalogUpdateDynViewVer(pCatalog, (SDynViewVersion *)value); } -static void hbFreeSViewMetaInRsp(void* p) { - if (NULL == p || NULL == *(void**)p) { +static void hbFreeSViewMetaInRsp(void *p) { + if (NULL == p || NULL == *(void **)p) { return; } - SViewMetaRsp *pRsp = *(SViewMetaRsp**)p; + SViewMetaRsp *pRsp = *(SViewMetaRsp **)p; tFreeSViewMetaRsp(pRsp); taosMemoryFreeClear(pRsp); } @@ -337,7 +339,7 @@ static int32_t hbProcessViewInfoRsp(void *value, int32_t valueLen, struct SCatal return TSDB_CODE_SUCCESS; } -static int32_t hbprocessTSMARsp(void* value, int32_t valueLen, struct SCatalog* pCatalog) { +static int32_t hbprocessTSMARsp(void *value, int32_t valueLen, struct SCatalog *pCatalog) { int32_t code = 0; STSMAHbRsp hbRsp = {0}; @@ -348,7 +350,7 @@ static int32_t hbprocessTSMARsp(void* value, int32_t valueLen, struct SCatalog* int32_t numOfTsma = taosArrayGetSize(hbRsp.pTsmas); for (int32_t i = 0; i < numOfTsma; ++i) { - STableTSMAInfo* pTsmaInfo = taosArrayGetP(hbRsp.pTsmas, i); + STableTSMAInfo *pTsmaInfo = taosArrayGetP(hbRsp.pTsmas, i); if (!pTsmaInfo->pFuncs) { tscDebug("hb to remove tsma: %s.%s", pTsmaInfo->dbFName, pTsmaInfo->name); @@ -365,7 +367,7 @@ static int32_t hbprocessTSMARsp(void* value, int32_t valueLen, struct SCatalog* return TSDB_CODE_SUCCESS; } -static void hbProcessQueryRspKvs(int32_t kvNum, SArray* pKvs, struct SCatalog *pCatalog, SAppHbMgr *pAppHbMgr) { +static void hbProcessQueryRspKvs(int32_t kvNum, SArray *pKvs, struct SCatalog *pCatalog, SAppHbMgr *pAppHbMgr) { for (int32_t i = 0; i < kvNum; ++i) { SKv *kv = taosArrayGet(pKvs, i); switch (kv->key) { @@ -489,14 +491,14 @@ static int32_t hbQueryHbRspHandle(SAppHbMgr *pAppHbMgr, SClientHbRsp *pRsp) { if (kvNum > 0) { struct SCatalog *pCatalog = NULL; - int32_t code = catalogGetHandle(pReq->clusterId, &pCatalog); + int32_t code = catalogGetHandle(pReq->clusterId, &pCatalog); if (code != TSDB_CODE_SUCCESS) { tscWarn("catalogGetHandle failed, clusterId:%" PRIx64 ", error:%s", pReq->clusterId, tstrerror(code)); } else { hbProcessQueryRspKvs(kvNum, pRsp->info, pCatalog, pAppHbMgr); } } - + taosHashRelease(pAppHbMgr->activeInfo, pReq); return TSDB_CODE_SUCCESS; @@ -799,8 +801,9 @@ int32_t hbGetExpiredDBInfo(SClientHbKey *connKey, struct SCatalog *pCatalog, SCl for (int32_t i = 0; i < dbNum; ++i) { SDbCacheInfo *db = &dbs[i]; - tscDebug("the %dth expired dbFName:%s, dbId:%" PRId64 ", vgVersion:%d, cfgVersion:%d, numOfTable:%d, startTs:%" PRId64, - i, db->dbFName, db->dbId, db->vgVersion, db->cfgVersion, db->numOfTable, db->stateTs); + tscDebug("the %dth expired dbFName:%s, dbId:%" PRId64 + ", vgVersion:%d, cfgVersion:%d, numOfTable:%d, startTs:%" PRId64, + i, db->dbFName, db->dbId, db->vgVersion, db->cfgVersion, db->numOfTable, db->stateTs); db->dbId = htobe64(db->dbId); db->vgVersion = htonl(db->vgVersion); @@ -916,7 +919,7 @@ int32_t hbGetExpiredViewInfo(SClientHbKey *connKey, struct SCatalog *pCatalog, S return TSDB_CODE_SUCCESS; } -int32_t hbGetExpiredTSMAInfo(SClientHbKey* connKey, struct SCatalog* pCatalog, SClientHbReq* pReq) { +int32_t hbGetExpiredTSMAInfo(SClientHbKey *connKey, struct SCatalog *pCatalog, SClientHbReq *pReq) { int32_t code = 0; uint32_t tsmaNum = 0; STSMAVersion *tsmas = NULL; @@ -933,7 +936,7 @@ int32_t hbGetExpiredTSMAInfo(SClientHbKey* connKey, struct SCatalog* pCatalog, S } for (int32_t i = 0; i < tsmaNum; ++i) { - STSMAVersion* tsma = &tsmas[i]; + STSMAVersion *tsma = &tsmas[i]; tsma->dbId = htobe64(tsma->dbId); tsma->tsmaId = htobe64(tsma->tsmaId); tsma->version = htonl(tsma->version); @@ -1012,7 +1015,7 @@ int32_t hbQueryHbReqHandle(SClientHbKey *connKey, void *param, SClientHbReq *req if (TSDB_CODE_SUCCESS != code) { return code; } -#endif +#endif code = hbGetExpiredTSMAInfo(connKey, pCatalog, req); } else { req->app.appId = 0; @@ -1151,7 +1154,8 @@ static void *hbThreadFunc(void *param) { if (sz > 0) { hbGatherAppInfo(); if (sz > 1 && !clientHbMgr.appHbHash) { - clientHbMgr.appHbHash = taosHashInit(0, taosGetDefaultHashFunction(TSDB_DATA_TYPE_UBIGINT), false, HASH_NO_LOCK); + clientHbMgr.appHbHash = + taosHashInit(0, taosGetDefaultHashFunction(TSDB_DATA_TYPE_UBIGINT), false, HASH_NO_LOCK); } taosHashClear(clientHbMgr.appHbHash); } @@ -1433,6 +1437,4 @@ void hbDeregisterConn(STscObj *pTscObj, SClientHbKey connKey) { } // set heart beat thread quit mode , if quicByKill 1 then kill thread else quit from inner -void taos_set_hb_quit(int8_t quitByKill) { - clientHbMgr.quitByKill = quitByKill; -} +void taos_set_hb_quit(int8_t quitByKill) { clientHbMgr.quitByKill = quitByKill; } diff --git a/source/dnode/mnode/impl/inc/mndUser.h b/source/dnode/mnode/impl/inc/mndUser.h index 907ec86623..5782890f73 100644 --- a/source/dnode/mnode/impl/inc/mndUser.h +++ b/source/dnode/mnode/impl/inc/mndUser.h @@ -53,6 +53,7 @@ void mndUpdateIpWhiteForAllUser(SMnode *pMnode, char *user, char *fqdn, int8_t t int32_t mndRefreshUserIpWhiteList(SMnode *pMnode); +int64_t mndGetUserIpWhiteListVer(SMnode *pMnode, SUserObj *pUser); #ifdef __cplusplus } #endif diff --git a/source/dnode/mnode/impl/src/mndPrivilege.c b/source/dnode/mnode/impl/src/mndPrivilege.c index 13a80cb1a6..fd7f9e5fb3 100644 --- a/source/dnode/mnode/impl/src/mndPrivilege.c +++ b/source/dnode/mnode/impl/src/mndPrivilege.c @@ -31,7 +31,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 mndSetUserWhiteListRsp(SMnode *pMnode, SUserObj *pUser, SGetUserWhiteListRsp *pWhiteListRsp) { memcpy(pWhiteListRsp->user, pUser->user, TSDB_USER_LEN); pWhiteListRsp->numWhiteLists = 1; @@ -41,25 +40,6 @@ int32_t mndSetUserWhiteListRsp(SMnode *pMnode, SUserObj *pUser, SGetUserWhiteLis } memset(pWhiteListRsp->pWhiteLists, 0, pWhiteListRsp->numWhiteLists * sizeof(SIpV4Range)); -// if (tsEnableWhiteList) { -// memcpy(pWhiteListRsp->user, pUser->user, TSDB_USER_LEN); -// pWhiteListRsp->numWhiteLists = pUser->pIpWhiteList->num; -// pWhiteListRsp->pWhiteLists = taosMemoryMalloc(pWhiteListRsp->numWhiteLists * sizeof(SIpV4Range)); -// if (pWhiteListRsp->pWhiteLists == NULL) { -// return TSDB_CODE_OUT_OF_MEMORY; -// } -// memcpy(pWhiteListRsp->pWhiteLists, pUser->pIpWhiteList->pIpRange, -// pWhiteListRsp->numWhiteLists * sizeof(SIpV4Range)); -// } else { -// memcpy(pWhiteListRsp->user, pUser->user, TSDB_USER_LEN); -// pWhiteListRsp->numWhiteLists = 1; -// pWhiteListRsp->pWhiteLists = taosMemoryMalloc(pWhiteListRsp->numWhiteLists * sizeof(SIpV4Range)); -// if (pWhiteListRsp->pWhiteLists == NULL) { -// return TSDB_CODE_OUT_OF_MEMORY; -// } -// memset(pWhiteListRsp->pWhiteLists, 0, pWhiteListRsp->numWhiteLists * sizeof(SIpV4Range)); -// } - return 0; } @@ -70,7 +50,7 @@ int32_t mndSetUserAuthRsp(SMnode *pMnode, SUserObj *pUser, SGetUserAuthRsp *pRsp pRsp->sysInfo = pUser->sysInfo; pRsp->version = pUser->authVersion; pRsp->passVer = pUser->passVersion; - pRsp->whiteListVer = pUser->ipWhiteListVer; + pRsp->whiteListVer = mndGetUserIpWhiteListVer(pMnode, pUser); return 0; } diff --git a/source/dnode/mnode/impl/src/mndProfile.c b/source/dnode/mnode/impl/src/mndProfile.c index fafdb539fb..fcd4403aa4 100644 --- a/source/dnode/mnode/impl/src/mndProfile.c +++ b/source/dnode/mnode/impl/src/mndProfile.c @@ -300,7 +300,7 @@ _CONNECT: connectRsp.svrTimestamp = taosGetTimestampSec(); connectRsp.passVer = pUser->passVersion; connectRsp.authVer = pUser->authVersion; - connectRsp.whiteListVer = pUser->ipWhiteListVer; + connectRsp.whiteListVer = mndGetUserIpWhiteListVer(pMnode, pUser); strcpy(connectRsp.sVer, version); snprintf(connectRsp.sDetailVer, sizeof(connectRsp.sDetailVer), "ver:%s\nbuild:%s\ngitinfo:%s", version, buildinfo, diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 7cde8c5508..cbb72ee1f4 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -45,35 +45,55 @@ #define ALTER_USER_DEL_PRIVS(_type) ((_type) == TSDB_ALTER_USER_DEL_PRIVILEGES) #define ALTER_USER_ALL_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) -#define ALTER_USER_READ_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_READ) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) -#define ALTER_USER_WRITE_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_WRITE) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) -#define ALTER_USER_ALTER_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALTER) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) +#define ALTER_USER_READ_PRIV(_priv) \ + (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_READ) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) +#define ALTER_USER_WRITE_PRIV(_priv) \ + (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_WRITE) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) +#define ALTER_USER_ALTER_PRIV(_priv) \ + (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALTER) || BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_ALL)) #define ALTER_USER_SUBSCRIBE_PRIV(_priv) (BIT_FLAG_TEST_MASK((_priv), PRIVILEGE_TYPE_SUBSCRIBE)) #define ALTER_USER_TARGET_DB(_tbname) (0 == (_tbname)[0]) #define ALTER_USER_TARGET_TB(_tbname) (0 != (_tbname)[0]) -#define ALTER_USER_ADD_READ_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_READ_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_WRITE_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_WRITE_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_ALTER_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_ALTER_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_ALL_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_DEL_ALL_DB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_READ_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_READ_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_WRITE_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_WRITE_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_ALTER_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_ALTER_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_ADD_ALL_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) +#define ALTER_USER_DEL_ALL_DB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_DB(_tbname)) -#define ALTER_USER_ADD_READ_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_READ_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_ADD_WRITE_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_WRITE_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_ADD_ALTER_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_ALTER_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_ADD_ALL_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) -#define ALTER_USER_DEL_ALL_TB_PRIV(_type, _priv, _tbname) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) - -#define ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(_type, _priv) (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) -#define ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(_type, _priv) (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) +#define ALTER_USER_ADD_READ_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_READ_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_READ_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_WRITE_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_WRITE_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_WRITE_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_ALTER_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_ALTER_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALTER_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_ALL_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_DEL_ALL_TB_PRIV(_type, _priv, _tbname) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_ALL_PRIV(_priv) && ALTER_USER_TARGET_TB(_tbname)) +#define ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(_type, _priv) \ + (ALTER_USER_ADD_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) +#define ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(_type, _priv) \ + (ALTER_USER_DEL_PRIVS(_type) && ALTER_USER_SUBSCRIBE_PRIV(_priv)) static SIpWhiteList *createDefaultIpWhiteList(); SIpWhiteList *createIpWhiteList(void *buf, int32_t len); @@ -1575,8 +1595,8 @@ static int32_t mndProcessCreateUserReq(SRpcMsg *pReq) { if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; char detail[1000] = {0}; - sprintf(detail, "enable:%d, superUser:%d, sysInfo:%d, password:xxx", - createReq.enable, createReq.superUser, createReq.sysInfo); + sprintf(detail, "enable:%d, superUser:%d, sysInfo:%d, password:xxx", createReq.enable, createReq.superUser, + createReq.sysInfo); auditRecord(pReq, pMnode->clusterId, "createUser", "", createReq.user, detail, strlen(detail)); @@ -1766,7 +1786,7 @@ static int32_t mndRemoveTablePriviledge(SMnode *pMnode, SHashObj *hash, SHashObj if (NULL == currRef) { return 0; } - + if (1 == *currRef) { if (taosHashRemove(useDbHash, alterReq->objname, dbKeyLen) != 0) { return -1; @@ -1800,12 +1820,12 @@ static char *mndUserAuditTypeStr(int32_t type) { return "error"; } -static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode *pMnode, SUserObj* pNewUser) { - SSdb *pSdb = pMnode->pSdb; - void *pIter = NULL; +static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode *pMnode, SUserObj *pNewUser) { + SSdb *pSdb = pMnode->pSdb; + void *pIter = NULL; - if (ALTER_USER_ADD_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || - ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1830,7 +1850,8 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - if (ALTER_USER_ADD_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1855,7 +1876,8 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - if (ALTER_USER_DEL_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_DEL_READ_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1870,7 +1892,8 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - if (ALTER_USER_DEL_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_DEL_WRITE_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_DEL_ALL_DB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (strcmp(pAlterReq->objname, "1.*") != 0) { int32_t len = strlen(pAlterReq->objname) + 1; SDbObj *pDb = mndAcquireDb(pMnode, pAlterReq->objname); @@ -1885,9 +1908,9 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } } - SHashObj* pReadTbs = pNewUser->readTbs; - SHashObj* pWriteTbs = pNewUser->writeTbs; - SHashObj* pAlterTbs = pNewUser->alterTbs; + SHashObj *pReadTbs = pNewUser->readTbs; + SHashObj *pWriteTbs = pNewUser->writeTbs; + SHashObj *pAlterTbs = pNewUser->alterTbs; #ifdef TD_ENTERPRISE if (pAlterReq->isView) { @@ -1897,15 +1920,18 @@ static int32_t mndProcessAlterUserPrivilegesReq(SAlterUserReq *pAlterReq, SMnode } #endif - if (ALTER_USER_ADD_READ_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_READ_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (mndTablePriviledge(pMnode, pReadTbs, pNewUser->useDbs, pAlterReq, pSdb) != 0) return -1; } - if (ALTER_USER_ADD_WRITE_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_WRITE_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (mndTablePriviledge(pMnode, pWriteTbs, pNewUser->useDbs, pAlterReq, pSdb) != 0) return -1; } - if (ALTER_USER_ADD_ALTER_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { + if (ALTER_USER_ADD_ALTER_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(pAlterReq->alterType, pAlterReq->privileges, pAlterReq->tabName)) { if (mndTablePriviledge(pMnode, pAlterTbs, pNewUser->useDbs, pAlterReq, pSdb) != 0) return -1; } @@ -2016,7 +2042,7 @@ static int32_t mndProcessAlterUserReq(SRpcMsg *pReq) { newUser.sysInfo = alterReq.sysInfo; } - if(alterReq.alterType == TSDB_ALTER_USER_CREATEDB) { + if (alterReq.alterType == TSDB_ALTER_USER_CREATEDB) { newUser.createdb = alterReq.createdb; } @@ -2119,52 +2145,43 @@ static int32_t mndProcessAlterUserReq(SRpcMsg *pReq) { code = mndAlterUser(pMnode, pUser, &newUser, pReq); if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; - if(alterReq.alterType == TSDB_ALTER_USER_PASSWD){ + if (alterReq.alterType == TSDB_ALTER_USER_PASSWD) { char detail[1000] = {0}; sprintf(detail, "alterType:%s, enable:%d, superUser:%d, sysInfo:%d, createdb:%d, tabName:%s, password:xxx", mndUserAuditTypeStr(alterReq.alterType), alterReq.enable, alterReq.superUser, alterReq.sysInfo, alterReq.createdb ? 1 : 0, alterReq.tabName); auditRecord(pReq, pMnode->clusterId, "alterUser", "", alterReq.user, detail, strlen(detail)); - } - else if(alterReq.alterType == TSDB_ALTER_USER_SUPERUSER || - alterReq.alterType == TSDB_ALTER_USER_ENABLE || - alterReq.alterType == TSDB_ALTER_USER_SYSINFO || - alterReq.alterType == TSDB_ALTER_USER_CREATEDB){ + } else if (alterReq.alterType == TSDB_ALTER_USER_SUPERUSER || alterReq.alterType == TSDB_ALTER_USER_ENABLE || + alterReq.alterType == TSDB_ALTER_USER_SYSINFO || alterReq.alterType == TSDB_ALTER_USER_CREATEDB) { auditRecord(pReq, pMnode->clusterId, "alterUser", "", alterReq.user, alterReq.sql, alterReq.sqlLen); - } - else if(ALTER_USER_ADD_READ_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_WRITE_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_ALL_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_READ_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_WRITE_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)|| - ALTER_USER_ADD_ALL_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)){ - if (strcmp(alterReq.objname, "1.*") != 0){ + } else if (ALTER_USER_ADD_READ_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_WRITE_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_ALL_DB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_READ_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_WRITE_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName) || + ALTER_USER_ADD_ALL_TB_PRIV(alterReq.alterType, alterReq.privileges, alterReq.tabName)) { + if (strcmp(alterReq.objname, "1.*") != 0) { SName name = {0}; tNameFromString(&name, alterReq.objname, T_NAME_ACCT | T_NAME_DB); - auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", name.dbname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - }else{ - auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", "", alterReq.user, - alterReq.sql, alterReq.sqlLen); + auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", name.dbname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else { + auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", "", alterReq.user, alterReq.sql, alterReq.sqlLen); } - } - else if(ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)){ - auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", alterReq.objname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - } - else if(ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)){ - auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", alterReq.objname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - } - else{ - if (strcmp(alterReq.objname, "1.*") != 0){ + } else if (ALTER_USER_ADD_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)) { + auditRecord(pReq, pMnode->clusterId, "GrantPrivileges", alterReq.objname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else if (ALTER_USER_DEL_SUBSCRIBE_TOPIC_PRIV(alterReq.alterType, alterReq.privileges)) { + auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", alterReq.objname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else { + if (strcmp(alterReq.objname, "1.*") != 0) { SName name = {0}; tNameFromString(&name, alterReq.objname, T_NAME_ACCT | T_NAME_DB); - auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", name.dbname, alterReq.user, - alterReq.sql, alterReq.sqlLen); - }else{ - auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", "", alterReq.user, - alterReq.sql, alterReq.sqlLen); + auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", name.dbname, alterReq.user, alterReq.sql, + alterReq.sqlLen); + } else { + auditRecord(pReq, pMnode->clusterId, "RevokePrivileges", "", alterReq.user, alterReq.sql, alterReq.sqlLen); } } @@ -2480,11 +2497,14 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock int32_t numOfReadViews = taosHashGetSize(pUser->readViews); int32_t numOfWriteViews = taosHashGetSize(pUser->writeViews); int32_t numOfAlterViews = taosHashGetSize(pUser->alterViews); - if (numOfRows + numOfReadDbs + numOfWriteDbs + numOfTopics + numOfReadTbs + numOfWriteTbs + numOfAlterTbs + numOfReadViews + numOfWriteViews + numOfAlterViews >= rows) { + if (numOfRows + numOfReadDbs + numOfWriteDbs + numOfTopics + numOfReadTbs + numOfWriteTbs + numOfAlterTbs + + numOfReadViews + numOfWriteViews + numOfAlterViews >= + rows) { mInfo( "will restore. current num of rows: %d, read dbs %d, write dbs %d, topics %d, read tables %d, write tables " "%d, alter tables %d, read views %d, write views %d, alter views %d", - numOfRows, numOfReadDbs, numOfWriteDbs, numOfTopics, numOfReadTbs, numOfWriteTbs, numOfAlterTbs, numOfReadViews, numOfWriteViews, numOfAlterViews); + numOfRows, numOfReadDbs, numOfWriteDbs, numOfTopics, numOfReadTbs, numOfWriteTbs, numOfAlterTbs, + numOfReadViews, numOfWriteViews, numOfAlterViews); pShow->restore = true; sdbRelease(pSdb, pUser); break; @@ -2870,7 +2890,6 @@ int32_t mndUserRemoveView(SMnode *pMnode, STrans *pTrans, char *view) { return code; } - int32_t mndUserRemoveTopic(SMnode *pMnode, STrans *pTrans, char *topic) { int32_t code = 0; SSdb *pSdb = pMnode->pSdb; @@ -2910,3 +2929,9 @@ int32_t mndUserRemoveTopic(SMnode *pMnode, STrans *pTrans, char *topic) { mndUserFreeObj(&newUser); return code; } + +int64_t mndGetUserIpWhiteListVer(SMnode *pMnode, SUserObj *pUser) { + // ver = 0, disable ip white list + // ver > 0, enable ip white list + return tsEnableWhiteList ? pUser->ipWhiteListVer : 0; +} From 0471afb840f5a631c5a510c9a3631c491437d63f Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao> Date: Thu, 20 Jun 2024 13:25:36 +0800 Subject: [PATCH 41/53] adj sream tbname cache --- source/libs/stream/src/streamState.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 31bf1b67a4..a817070d5b 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -1112,12 +1112,11 @@ int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal #ifdef USE_ROCKSDB void* pStr = tSimpleHashGet(pState->parNameMap, &groupId, sizeof(int64_t)); if (!pStr) { - bool isFull = (tSimpleHashGetSize(pState->parNameMap) >= MAX_TABLE_NAME_NUM); - if (onlyCache && isFull) { + if (onlyCache && tSimpleHashGetSize(pState->parNameMap) < MAX_TABLE_NAME_NUM) { return TSDB_CODE_FAILED; } int32_t code = streamStateGetParName_rocksdb(pState, groupId, pVal); - if (code == TSDB_CODE_SUCCESS && isFull) { + if (code == TSDB_CODE_SUCCESS && tSimpleHashGetSize(pState->parNameMap) < MAX_TABLE_NAME_NUM) { tSimpleHashPut(pState->parNameMap, &groupId, sizeof(int64_t), *pVal, TSDB_TABLE_NAME_LEN); } return code; From 784fda81910a5d4bcde4280e49e55c4fabeed861 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 20 Jun 2024 13:51:40 +0800 Subject: [PATCH 42/53] fix: cast long binary crash issue --- source/libs/scalar/src/sclfunc.c | 10 ++++++---- tests/script/tsim/scalar/scalar.sim | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index da26d7e3b9..48bedde91a 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -737,9 +737,10 @@ int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutp int32_t code = TSDB_CODE_SUCCESS; char *convBuf = taosMemoryMalloc(inputLen); char *output = taosMemoryCalloc(1, outputLen + TSDB_NCHAR_SIZE); - char buf[400] = {0}; + int32_t bufSize = TSDB_MAX_FIELD_LEN + 1; + char *buf = taosMemoryMalloc(bufSize); - if (convBuf == NULL || output == NULL) { + if (convBuf == NULL || output == NULL || buf == NULL) { code = TSDB_CODE_OUT_OF_MEMORY; goto _end; } @@ -991,7 +992,7 @@ int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutp memcpy(varDataVal(output), convBuf, len); varDataSetLen(output, len); } else { - NUM_TO_STRING(inputType, input, sizeof(buf), buf); + NUM_TO_STRING(inputType, input, bufSize, buf); int32_t len = (int32_t)strlen(buf); len = (outputLen - VARSTR_HEADER_SIZE) > len ? len : (outputLen - VARSTR_HEADER_SIZE); memcpy(varDataVal(output), buf, len); @@ -1037,7 +1038,7 @@ int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutp memcpy(output, input, len + VARSTR_HEADER_SIZE); varDataSetLen(output, len); } else { - NUM_TO_STRING(inputType, input, sizeof(buf), buf); + NUM_TO_STRING(inputType, input, bufSize, buf); len = (int32_t)strlen(buf); len = outputCharLen > len ? len : outputCharLen; bool ret = taosMbsToUcs4(buf, len, (TdUcs4 *)varDataVal(output), outputLen - VARSTR_HEADER_SIZE, &len); @@ -1067,6 +1068,7 @@ int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutp pOutput->numOfRows = pInput->numOfRows; _end: + taosMemoryFree(buf); taosMemoryFree(output); taosMemoryFree(convBuf); return code; diff --git a/tests/script/tsim/scalar/scalar.sim b/tests/script/tsim/scalar/scalar.sim index 900f7c0904..e28c3d1a4d 100644 --- a/tests/script/tsim/scalar/scalar.sim +++ b/tests/script/tsim/scalar/scalar.sim @@ -48,6 +48,8 @@ if $data00 != @70-02-01 08:00:00.001@ then return -1 endi +sql select cast('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' as double); + sql select 1-1n; if $rows != 1 then return -1 From e1cb4e021fd09fe71a2dce965c3855e74861230d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 20 Jun 2024 16:24:02 +0800 Subject: [PATCH 43/53] fix(stream): clear the local backend default directory, when no checkpoint generated yet. --- source/libs/stream/src/streamBackendRocksdb.c | 66 +++++++++---------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index 597d6035d6..15c5272f3c 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -141,6 +141,7 @@ int32_t valueToString(void* k, char* buf); int32_t valueIsStale(void* k, int64_t ts); void destroyCompare(void* arg); +static void cleanDir(const char* pPath, const char* id); static bool streamStateIterSeekAndValid(rocksdb_iterator_t* iter, char* buf, size_t len); static rocksdb_iterator_t* streamStateIterCreate(SStreamState* pState, const char* cfName, @@ -212,12 +213,7 @@ int32_t rebuildDirFromCheckpoint(const char* path, int64_t chkpId, char** dst) { char* chkp = taosMemoryCalloc(1, strlen(path) + 64); sprintf(chkp, "%s%s%s%scheckpoint%" PRId64 "", path, TD_DIRSEP, "checkpoints", TD_DIRSEP, chkpId); if (taosIsDir(chkp) && isValidCheckpoint(chkp)) { - if (taosIsDir(state)) { - // remove dir if exists - // taosRenameFile(const char *oldName, const char *newName) - taosRemoveDir(state); - } - taosMkDir(state); + cleanDir(state, ""); code = backendCopyFiles(chkp, state); stInfo("copy snap file from %s to %s", chkp, state); if (code != 0) { @@ -322,6 +318,22 @@ int32_t remoteChkp_validAndCvtMeta(char* path, SArray* list, int64_t chkpId) { return complete == 1 ? 0 : -1; } +void cleanDir(const char* pPath, const char* id) { + ASSERT(pPath != NULL); + + if (taosIsDir(pPath)) { + taosRemoveDir(pPath); + taosMkDir(pPath); + stInfo("%s clear dir:%s, succ", id, pPath); + } +} + +void validateDir(const char* pPath) { + if (!taosIsDir(pPath)) { + taosMulMkDir(pPath); + } +} + int32_t rebuildFromRemoteChkp_rsync(const char* key, char* chkptPath, int64_t checkpointId, char* defaultPath) { int32_t code = 0; if (taosIsDir(chkptPath)) { @@ -329,11 +341,8 @@ int32_t rebuildFromRemoteChkp_rsync(const char* key, char* chkptPath, int64_t ch stDebug("remove local checkpoint data dir:%s succ", chkptPath); } - if (taosIsDir(defaultPath)) { - taosRemoveDir(defaultPath); - taosMulMkDir(defaultPath); - stDebug("clear local default dir before downloading checkpoint data:%s succ", defaultPath); - } + cleanDir(defaultPath, key); + stDebug("clear local default dir before downloading checkpoint data:%s succ", defaultPath); code = streamTaskDownloadCheckpointData(key, chkptPath); if (code != 0) { @@ -484,21 +493,14 @@ int32_t backendCopyFiles(const char* src, const char* dst) { static int32_t rebuildFromLocalCheckpoint(const char* pTaskIdStr, const char* checkpointPath, int64_t checkpointId, const char* defaultPath) { int32_t code = 0; - - if (taosIsDir(defaultPath)) { - taosRemoveDir(defaultPath); - taosMkDir(defaultPath); - stInfo("%s clear local backend dir:%s, succ", pTaskIdStr, defaultPath); - } + cleanDir(defaultPath, pTaskIdStr); if (taosIsDir(checkpointPath) && isValidCheckpoint(checkpointPath)) { stDebug("%s local checkpoint data existed, checkpointId:%" PRId64 " copy to backend dir", pTaskIdStr, checkpointId); code = backendCopyFiles(checkpointPath, defaultPath); if (code != TSDB_CODE_SUCCESS) { - taosRemoveDir(defaultPath); - taosMkDir(defaultPath); - + cleanDir(defaultPath, pTaskIdStr); stError("%s failed to start stream backend from local %s, reason:%s, try download checkpoint from remote", pTaskIdStr, checkpointPath, tstrerror(TAOS_SYSTEM_ERROR(errno))); code = TSDB_CODE_SUCCESS; @@ -520,26 +522,18 @@ int32_t restoreCheckpointData(const char* path, const char* key, int64_t chkptId char* prefixPath = taosMemoryCalloc(1, strlen(path) + 128); sprintf(prefixPath, "%s%s%s", path, TD_DIRSEP, key); - if (!taosIsDir(prefixPath)) { - code = taosMkDir(prefixPath); - ASSERT(code == 0); - } + validateDir(prefixPath); char* defaultPath = taosMemoryCalloc(1, strlen(path) + 256); sprintf(defaultPath, "%s%s%s", prefixPath, TD_DIRSEP, "state"); - if (!taosIsDir(defaultPath)) { - taosMulMkDir(defaultPath); - } - + validateDir(defaultPath); int32_t pathLen = strlen(path) + 256; char* checkpointRoot = taosMemoryCalloc(1, pathLen); sprintf(checkpointRoot, "%s%s%s", prefixPath, TD_DIRSEP, "checkpoints"); - if (!taosIsDir(checkpointRoot)) { - taosMulMkDir(checkpointRoot); - } + validateDir(checkpointRoot); taosMemoryFree(checkpointRoot); stDebug("%s check local backend dir:%s, checkpointId:%" PRId64 " succ", key, defaultPath, chkptId); @@ -559,7 +553,8 @@ int32_t restoreCheckpointData(const char* path, const char* key, int64_t chkptId code = 0; // reset the error code } } else { // no valid checkpoint id - stInfo("%s no valid checkpoint ever generated, no need to copy checkpoint data", key); + stInfo("%s no valid checkpoint ever generated, no need to copy checkpoint data, clean defaultPath:%s", key, defaultPath); + cleanDir(defaultPath, key); } taosMemoryFree(chkptPath); @@ -2055,7 +2050,7 @@ STaskDbWrapper* taskDbOpenImpl(const char* key, char* statePath, char* dbPath) { cfNames = rocksdb_list_column_families(pTaskDb->dbOpt, dbPath, &nCf, &err); if (nCf == 0) { - stInfo("%s newly create db, need to restart", key); + stInfo("%s newly create db in state-backend", key); // pre create db pTaskDb->db = rocksdb_open(pTaskDb->pCfOpts[0], dbPath, &err); if (pTaskDb->db == NULL) goto _EXIT; @@ -2215,13 +2210,12 @@ int32_t taskDbGenChkpUploadData__s3(STaskDbWrapper* pDb, void* bkdChkpMgt, int64 sprintf(temp, "%s%s%s%" PRId64 "", pDb->path, TD_DIRSEP, "tmp", chkpId); if (taosDirExist(temp)) { - taosRemoveDir(temp); - taosMkDir(temp); + cleanDir(temp, NULL); } else { taosMkDir(temp); } - code = bkdMgtGetDelta(p, pDb->idstr, chkpId, list, temp); + code = bkdMgtGetDelta(p, pDb->idstr, chkpId, list, temp); *path = temp; return code; From fa694d6fe3004fd25c5876392ed5b9b7a99180fc Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 31 Dec 2024 08:34:17 +0800 Subject: [PATCH 44/53] tfs: support disable create new file --- source/libs/tfs/src/tfs.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/libs/tfs/src/tfs.c b/source/libs/tfs/src/tfs.c index 97feee7d9a..1c64885bf5 100644 --- a/source/libs/tfs/src/tfs.c +++ b/source/libs/tfs/src/tfs.c @@ -607,6 +607,15 @@ static int32_t tfsCheck(STfs *pTfs) { terrno = TSDB_CODE_FS_NO_MOUNT_AT_TIER; return -1; } + + if (level == 0) { + tfsUpdateTierSize(TFS_TIER_AT(pTfs, level)); + if (TFS_TIER_AT(pTfs, level)->nAvailDisks == 0) { + fError("no disk to create new file at level %d", level); + terrno = TSDB_CODE_FS_NO_VALID_DISK; + return -1; + } + } } return 0; From 7dd242a04700be8bf0fd2e20ff7961cbb35d1839 Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 31 Dec 2024 09:33:16 +0800 Subject: [PATCH 45/53] tfs: support disable create new file --- tests/system-test/0-others/multilevel.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/system-test/0-others/multilevel.py b/tests/system-test/0-others/multilevel.py index 7e657fd3ba..d606d62d77 100644 --- a/tests/system-test/0-others/multilevel.py +++ b/tests/system-test/0-others/multilevel.py @@ -227,6 +227,22 @@ class TDTestCase: tdSql.taosdStatus(0) + def disable_create_new_file_0_not_exist(self): + tdLog.info("============== disable_create_new_file_0_not_exist test ===============") + cfg={ + '/mnt/data1 0 0 1' : 'dataDir', + '/mnt/data2 0 0 1' : 'dataDir' + } + tdSql.createDir('/mnt/data1') + tdSql.createDir('/mnt/data2') + + tdLog.info("================= step1") + tdDnodes.deploy(1,cfg) + tdDnodes.startWithoutSleep(1) + + tdLog.info("================= step2") + tdSql.taosdStatus(0) + def trim_database(self): tdLog.info("============== trim_database test ===============") tdDnodes.stop(1) @@ -280,6 +296,7 @@ class TDTestCase: self.more_than_128_disks() self.trim_database() self.missing_middle_level() + self.disable_create_new_file_0_not_exist() From 3ed71361bbed58366b4aeb068c14a52d5abb819f Mon Sep 17 00:00:00 2001 From: kailixu Date: Tue, 31 Dec 2024 09:36:21 +0800 Subject: [PATCH 46/53] tfs: support disable create new file --- tests/system-test/0-others/multilevel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system-test/0-others/multilevel.py b/tests/system-test/0-others/multilevel.py index d606d62d77..3ed4002fcd 100644 --- a/tests/system-test/0-others/multilevel.py +++ b/tests/system-test/0-others/multilevel.py @@ -227,10 +227,10 @@ class TDTestCase: tdSql.taosdStatus(0) - def disable_create_new_file_0_not_exist(self): + def disable_create_new_file(self): tdLog.info("============== disable_create_new_file_0_not_exist test ===============") cfg={ - '/mnt/data1 0 0 1' : 'dataDir', + '/mnt/data1 0 1 1' : 'dataDir', '/mnt/data2 0 0 1' : 'dataDir' } tdSql.createDir('/mnt/data1') @@ -296,7 +296,7 @@ class TDTestCase: self.more_than_128_disks() self.trim_database() self.missing_middle_level() - self.disable_create_new_file_0_not_exist() + self.disable_create_new_file() From 6ac995e3098f16946b71397d8b7253932143b707 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 20 Jun 2024 17:46:42 +0800 Subject: [PATCH 47/53] fix: fix window build getBuildinfo move to clieMain.c --- source/client/src/clientMain.c | 4 ++++ source/util/src/version.c.in | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 81ae465cd2..9cbdbfbd25 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -1846,3 +1846,7 @@ int taos_set_conn_mode(TAOS* taos, int mode, int value) { } return 0; } + +char* getBuildInfo(){ + return buildinfo; +} \ No newline at end of file diff --git a/source/util/src/version.c.in b/source/util/src/version.c.in index 07bb1d42f8..c91b46e18d 100644 --- a/source/util/src/version.c.in +++ b/source/util/src/version.c.in @@ -4,7 +4,4 @@ char gitinfo[48] = "${TD_VER_GIT}"; char gitinfoOfInternal[48] = "${TD_VER_GIT_INTERNAL}"; char buildinfo[64] = "${TD_VER_OSTYPE}-${TD_VER_CPUTYPE} ${TD_VER_DATE}"; -void libtaos_${TD_LIB_VER_NUMBER}_${TD_VER_OSTYPE}_${TD_VER_CPUTYPE}_${TD_VER_VERTYPE}() {}; -char* getBuildInfo(){ - return buildinfo; -} +void libtaos_${TD_LIB_VER_NUMBER}_${TD_VER_OSTYPE}_${TD_VER_CPUTYPE}_${TD_VER_VERTYPE}() {}; \ No newline at end of file From 852857eae99c1b5091806591c4c36029aed3bc32 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 20 Jun 2024 18:34:31 +0800 Subject: [PATCH 48/53] fix(util): change the load of __m128i value. --- source/util/src/tdecompress.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/util/src/tdecompress.c b/source/util/src/tdecompress.c index 046cba8686..63014d07b8 100644 --- a/source/util/src/tdecompress.c +++ b/source/util/src/tdecompress.c @@ -351,18 +351,18 @@ int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelemen int8_t nbytes1 = flags & INT8MASK(4); // range of nbytes starts from 0 to 7 int8_t nbytes2 = (flags >> 4) & INT8MASK(4); - __m128i data1; - if (nbytes1 == 0) { - data1 = _mm_setzero_si128(); - } else { - memcpy(&data1, (const void*) (input + ipos), nbytes1); + __m128i data1 = _mm_setzero_si128(); + if (nbytes1 > 0) { + int64_t tmp = 0; + memcpy(&tmp, (const void*) (input + ipos), nbytes1); + data1 = _mm_set1_epi64x(tmp); } - __m128i data2; - if (nbytes2 == 0) { - data2 = _mm_setzero_si128(); - } else { - memcpy(&data2, (const void*) (input + ipos + nbytes1), nbytes2); + __m128i data2 = _mm_setzero_si128(); + if (nbytes2 > 0) { + int64_t tmp = 0; + memcpy(&tmp, (const void*) (input + ipos + nbytes1), nbytes2); + data2 = _mm_set1_epi64x(tmp); } data2 = _mm_broadcastq_epi64(data2); From b730cfd5686739a9df1dc14f6f5243ae59abb4cf Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 20 Jun 2024 18:41:16 +0800 Subject: [PATCH 49/53] fix(util):do some internal refactor. --- source/util/src/tdecompress.c | 12 ++++-------- source/util/test/decompressTest.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/source/util/src/tdecompress.c b/source/util/src/tdecompress.c index 63014d07b8..470e43c957 100644 --- a/source/util/src/tdecompress.c +++ b/source/util/src/tdecompress.c @@ -399,19 +399,15 @@ int32_t tsDecompressTimestampAvx2(const char *const input, const int32_t nelemen int8_t nbytes1 = flags & INT8MASK(4); // range of nbytes starts from 0 to 7 int8_t nbytes2 = (flags >> 4) & INT8MASK(4); - __m128i data1; - if (nbytes1 == 0) { - data1 = _mm_setzero_si128(); - } else { + __m128i data1 = _mm_setzero_si128(); + if (nbytes1 > 0) { int64_t dd = 0; memcpy(&dd, (const void*) (input + ipos), nbytes1); data1 = _mm_loadu_si64(&dd); } - __m128i data2; - if (nbytes2 == 0) { - data2 = _mm_setzero_si128(); - } else { + __m128i data2 = _mm_setzero_si128(); + if (nbytes2 > 0) { int64_t dd = 0; memcpy(&dd, (const void*) (input + ipos + nbytes1), nbytes2); data2 = _mm_loadu_si64(&dd); diff --git a/source/util/test/decompressTest.cpp b/source/util/test/decompressTest.cpp index b3cf46fea6..dfcd682255 100644 --- a/source/util/test/decompressTest.cpp +++ b/source/util/test/decompressTest.cpp @@ -38,13 +38,13 @@ TEST(utilTest, decompress_ts_test) { } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - int64_t tsList[4] = {1286, 1124, 2681, 2823}; + tsList[0] = 1286; tsList[1] = 1124; tsList[2]=2681; tsList[3] = 2823; - char* pOutput[4 * sizeof(int64_t)] = {0}; - int32_t len = tsCompressTimestamp(tsList, sizeof(tsList), sizeof(tsList) / sizeof(tsList[0]), pOutput, 4, +// char* pOutput[4 * sizeof(int64_t)] = {0}; + len = tsCompressTimestamp(tsList, sizeof(tsList), sizeof(tsList) / sizeof(tsList[0]), pOutput, 4, ONE_STAGE_COMP, NULL, 0); - char* decompOutput[4 * 8] = {0}; + decompOutput[4 * 8] = {0}; tsDecompressTimestamp(pOutput, len, 4, decompOutput, sizeof(int64_t) * 4, ONE_STAGE_COMP, NULL, 0); for (int32_t i = 0; i < 4; ++i) { From 8e065ab47e267c59def9cb637d71b242423cdfda Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 20 Jun 2024 21:28:54 +0800 Subject: [PATCH 50/53] fix(stream): add some logs. --- source/common/src/rsync.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/source/common/src/rsync.c b/source/common/src/rsync.c index 2ed21616dc..5d056cdade 100644 --- a/source/common/src/rsync.c +++ b/source/common/src/rsync.c @@ -169,15 +169,22 @@ int32_t uploadByRsync(const char* id, const char* path) { #else if (path[strlen(path) - 1] != '/') { #endif - snprintf(command, PATH_MAX, "rsync -av --delete --timeout=10 --bwlimit=100000 %s/ rsync://%s/checkpoint/%s/", + snprintf(command, PATH_MAX, + "rsync -av --debug=all --log-file=%s/rsynclog --delete --timeout=10 --bwlimit=100000 %s/ " + "rsync://%s/checkpoint/%s/", + tsLogDir, #ifdef WINDOWS pathTransform #else path #endif - , tsSnodeAddress, id); + , + tsSnodeAddress, id); } else { - snprintf(command, PATH_MAX, "rsync -av --delete --timeout=10 --bwlimit=100000 %s rsync://%s/checkpoint/%s/", + snprintf(command, PATH_MAX, + "rsync -av --debug=all --log-file=%s/rsynclog --delete --timeout=10 --bwlimit=100000 %s " + "rsync://%s/checkpoint/%s/", + tsLogDir, #ifdef WINDOWS pathTransform #else @@ -213,14 +220,15 @@ int32_t downloadRsync(const char* id, const char* path) { #endif char command[PATH_MAX] = {0}; - snprintf(command, PATH_MAX, "rsync -av --debug=all --timeout=10 --bwlimit=100000 rsync://%s/checkpoint/%s/ %s", - tsSnodeAddress, id, + snprintf(command, PATH_MAX, + "rsync -av --debug=all --log-file=%s/rsynclog --timeout=10 --bwlimit=100000 rsync://%s/checkpoint/%s/ %s", + tsLogDir, tsSnodeAddress, id, #ifdef WINDOWS pathTransform #else path #endif - ); + ); uDebug("[rsync] %s start to sync data from remote to:%s, %s", id, path, command); @@ -249,7 +257,7 @@ int32_t deleteRsync(const char* id) { } char command[PATH_MAX] = {0}; - snprintf(command, PATH_MAX, "rsync -av --delete --timeout=10 %s rsync://%s/checkpoint/%s/", tmp, tsSnodeAddress, id); + snprintf(command, PATH_MAX, "rsync -av --debug=all --log-file=%s/rsynclog --delete --timeout=10 %s rsync://%s/checkpoint/%s/", tmp, tsSnodeAddress, id); code = execCommand(command); taosRemoveDir(tmp); From 2ecc725b1a646cdb38d216b00651b4e058f8fed5 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 20 Jun 2024 21:31:23 +0800 Subject: [PATCH 51/53] fix(stream): not clear check downstream info. --- source/libs/stream/src/streamCheckStatus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/libs/stream/src/streamCheckStatus.c b/source/libs/stream/src/streamCheckStatus.c index b577147171..b64e0bb6d2 100644 --- a/source/libs/stream/src/streamCheckStatus.c +++ b/source/libs/stream/src/streamCheckStatus.c @@ -299,12 +299,10 @@ int32_t streamTaskStartMonitorCheckRsp(SStreamTask* pTask) { int32_t streamTaskStopMonitorCheckRsp(STaskCheckInfo* pInfo, const char* id) { taosThreadMutexLock(&pInfo->checkInfoLock); - streamTaskCompleteCheckRsp(pInfo, false, id); - pInfo->stopCheckProcess = 1; taosThreadMutexUnlock(&pInfo->checkInfoLock); - stDebug("s-task:%s set stop check-rsp monit", id); + stDebug("s-task:%s set stop check-rsp monitor flag", id); return TSDB_CODE_SUCCESS; } @@ -438,6 +436,7 @@ int32_t streamTaskStartCheckDownstream(STaskCheckInfo* pInfo, const char* id) { ASSERT(pInfo->startTs > 0); stError("s-task:%s already in check procedure, checkTs:%" PRId64 ", start monitor check rsp failed", id, pInfo->startTs); + pInfo->stopCheckProcess = 0; // disable auto stop of check process return TSDB_CODE_FAILED; } From 28b0148df97f85a1b8766adf43e4ecd073f6d5e1 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 20 Jun 2024 22:41:33 +0800 Subject: [PATCH 52/53] fix(stream): fix syntax error. --- source/common/src/rsync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/common/src/rsync.c b/source/common/src/rsync.c index 5d056cdade..84e9615ddd 100644 --- a/source/common/src/rsync.c +++ b/source/common/src/rsync.c @@ -257,7 +257,9 @@ int32_t deleteRsync(const char* id) { } char command[PATH_MAX] = {0}; - snprintf(command, PATH_MAX, "rsync -av --debug=all --log-file=%s/rsynclog --delete --timeout=10 %s rsync://%s/checkpoint/%s/", tmp, tsSnodeAddress, id); + snprintf(command, PATH_MAX, + "rsync -av --debug=all --log-file=%s/rsynclog --delete --timeout=10 %s rsync://%s/checkpoint/%s/", tsLogDir, + tmp, tsSnodeAddress, id); code = execCommand(command); taosRemoveDir(tmp); From ebf2df965c8dc15450695c7a399556a06d07e745 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 21 Jun 2024 09:28:42 +0800 Subject: [PATCH 53/53] Update streamBackendRocksdb.c --- source/libs/stream/src/streamBackendRocksdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index 15c5272f3c..f614ecfd48 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -2210,7 +2210,7 @@ int32_t taskDbGenChkpUploadData__s3(STaskDbWrapper* pDb, void* bkdChkpMgt, int64 sprintf(temp, "%s%s%s%" PRId64 "", pDb->path, TD_DIRSEP, "tmp", chkpId); if (taosDirExist(temp)) { - cleanDir(temp, NULL); + cleanDir(temp, ""); } else { taosMkDir(temp); } @@ -4323,4 +4323,4 @@ int32_t bkdMgtDumpTo(SBkdMgt* bm, char* taskId, char* dname) { taosThreadRwlockUnlock(&bm->rwLock); return code; } -#endif \ No newline at end of file +#endif