From d2a1203eeb59f142b0de02625c2c73e3fc0062b9 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 20 Apr 2022 20:39:19 +0800 Subject: [PATCH 01/15] refactor: fix bugs in to_json --- source/libs/function/src/builtins.c | 2 +- source/libs/scalar/src/sclfunc.c | 8 +++----- source/util/src/tjson.c | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 7e9fc7d80e..c04f8888c8 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -409,7 +409,7 @@ static int32_t translateToJson(SFunctionNode* pFunc, char* pErrBuf, int32_t len) return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - pFunc->node.resType = (SDataType) { .bytes = tDataTypes[TSDB_DATA_TYPE_JSON].bytes, .type = TSDB_DATA_TYPE_JSON}; + pFunc->node.resType = (SDataType) { .bytes = tDataTypes[TSDB_DATA_TYPE_BINARY].bytes, .type = TSDB_DATA_TYPE_BINARY}; return TSDB_CODE_SUCCESS; } diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 8681c1dd47..16a4d768ba 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -887,13 +887,13 @@ int32_t toJsonFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu return TSDB_CODE_FAILED; } - char *input = pInput[0].columnData->pData + pInput[0].columnData->varmeta.offset[0]; - char *tmp = taosMemoryCalloc(pInput[0].columnData->info.bytes + 1, 1); + char tmp[TSDB_MAX_JSON_TAG_LEN] = {0}; for (int32_t i = 0; i < pInput[0].numOfRows; ++i) { if (colDataIsNull_s(pInput[0].columnData, i)) { colDataAppendNULL(pOutput->columnData, i); continue; } + char *input = pInput[0].columnData->pData + pInput[0].columnData->varmeta.offset[i]; if(type == TSDB_DATA_TYPE_NCHAR){ if (varDataTLen(input) > TSDB_MAX_JSON_TAG_LEN){ @@ -912,7 +912,7 @@ int32_t toJsonFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu continue; } memcpy(tmp, varDataVal(input), varDataLen(input)); - tmp[varDataTLen(input)] = 0; + tmp[varDataLen(input)] = 0; } if(!tjsonValidateJson(tmp)){ @@ -921,9 +921,7 @@ int32_t toJsonFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu } colDataAppend(pOutput->columnData, i, input, false); - input += varDataTLen(input); } - taosMemoryFree(tmp); pOutput->numOfRows = pInput->numOfRows; diff --git a/source/util/src/tjson.c b/source/util/src/tjson.c index 59dab76989..0b9727e0bf 100644 --- a/source/util/src/tjson.c +++ b/source/util/src/tjson.c @@ -300,8 +300,8 @@ bool tjsonValidateJson(const char *jIn) { char* jsonKey = item->string; if (!jsonKey) return false; - for (size_t j = 0; j < strlen(jsonKey); ++i) { - if (isprint(jsonKey[i]) == 0) return false; + for (size_t j = 0; j < strlen(jsonKey); ++j) { + if (isprint(jsonKey[j]) == 0) return false; } if (item->type == cJSON_Object || item->type == cJSON_Array) { From 1fe2abc8cdca620da390d453012e49e69d73b4e4 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 22 Apr 2022 14:35:00 +0800 Subject: [PATCH 02/15] refactor:fix error in unit test for scalar test --- source/libs/scalar/test/scalar/scalarTests.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/libs/scalar/test/scalar/scalarTests.cpp b/source/libs/scalar/test/scalar/scalarTests.cpp index de76e7e274..94ccdcdd0d 100644 --- a/source/libs/scalar/test/scalar/scalarTests.cpp +++ b/source/libs/scalar/test/scalar/scalarTests.cpp @@ -156,10 +156,9 @@ void scltMakeColumnNode(SNode **pNode, SSDataBlock **block, int32_t dataType, in idata.info.colId = 3; int32_t size = idata.info.bytes * rowNum; idata.pData = (char *)taosMemoryCalloc(1, size); + colInfoDataEnsureCapacity(&idata, 0, rowNum); taosArrayPush(res->pDataBlock, &idata); - blockDataEnsureCapacity(res, rowNum); - SColumnInfoData *pColumn = (SColumnInfoData *)taosArrayGetLast(res->pDataBlock); for (int32_t i = 0; i < rowNum; ++i) { colDataAppend(pColumn, i, (const char *)value, false); From a395b2157867ea677f419ca7a4d66f0baa51a4e8 Mon Sep 17 00:00:00 2001 From: slzhou Date: Fri, 22 Apr 2022 15:21:26 +0800 Subject: [PATCH 03/15] fix start/stop/restart udfd --- source/dnode/mgmt/implement/src/dmHandle.c | 41 ++++++++++++---------- source/dnode/mgmt/interface/inc/dmDef.h | 2 +- source/libs/function/src/udfd.c | 2 +- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/source/dnode/mgmt/implement/src/dmHandle.c b/source/dnode/mgmt/implement/src/dmHandle.c index 122c121ed8..c4eba53a34 100644 --- a/source/dnode/mgmt/implement/src/dmHandle.c +++ b/source/dnode/mgmt/implement/src/dmHandle.c @@ -220,13 +220,11 @@ static int32_t dmSpawnUdfd(SDnode *pDnode); void dmUdfdExit(uv_process_t *process, int64_t exitStatus, int termSignal) { dInfo("udfd process exited with status %" PRId64 ", signal %d", exitStatus, termSignal); - uv_close((uv_handle_t*)process, NULL); SDnode *pDnode = process->data; - SUdfdData *pData = &pDnode->udfdData; - if (atomic_load_8(&pData->stopping) != 0) { - dDebug("udfd process exit due to stopping"); + if (exitStatus == 0 && termSignal == 0) { + dInfo("udfd process exit due to SIGINT"); } else { - uv_close((uv_handle_t*)&pData->ctrlPipe, NULL); + dInfo("udfd process restart"); dmSpawnUdfd(pDnode); } } @@ -248,6 +246,7 @@ static int32_t dmSpawnUdfd(SDnode *pDnode) { options.file = path; options.exit_cb = dmUdfdExit; + SUdfdData *pData = &pDnode->udfdData; uv_pipe_init(&pData->loop, &pData->ctrlPipe, 1); @@ -260,6 +259,8 @@ static int32_t dmSpawnUdfd(SDnode *pDnode) { options.stdio_count = 3; options.stdio = child_stdio; + options.flags = UV_PROCESS_DETACHED; + char dnodeIdEnvItem[32] = {0}; char thrdPoolSizeEnvItem[32] = {0}; snprintf(dnodeIdEnvItem, 32, "%s=%d", "DNODE_ID", pDnode->data.dnodeId); @@ -284,24 +285,31 @@ static void dmUdfdCloseWalkCb(uv_handle_t* handle, void* arg) { } } -void dmWatchUdfd(void *args) { +static void dmUdfdStopAsyncCb(uv_async_t *async) { + SDnode *pDnode = async->data; + SUdfdData *pData = &pDnode->udfdData; + uv_stop(&pData->loop); +} + +static void dmWatchUdfd(void *args) { SDnode *pDnode = args; SUdfdData *pData = &pDnode->udfdData; uv_loop_init(&pData->loop); + uv_async_init(&pData->loop, &pData->stopAsync, dmUdfdStopAsyncCb); + pData->stopAsync.data = pDnode; int32_t err = dmSpawnUdfd(pDnode); atomic_store_32(&pData->spawnErr, err); uv_barrier_wait(&pData->barrier); uv_run(&pData->loop, UV_RUN_DEFAULT); - err = uv_loop_close(&pData->loop); - while (err == UV_EBUSY) { - uv_walk(&pData->loop, dmUdfdCloseWalkCb, NULL); - uv_run(&pData->loop, UV_RUN_DEFAULT); - err = uv_loop_close(&pData->loop); - } + uv_loop_close(&pData->loop); + + uv_walk(&pData->loop, dmUdfdCloseWalkCb, NULL); + uv_run(&pData->loop, UV_RUN_DEFAULT); + uv_loop_close(&pData->loop); return; } -int32_t dmStartUdfd(SDnode *pDnode) { +static int32_t dmStartUdfd(SDnode *pDnode) { SUdfdData *pData = &pDnode->udfdData; if (pData->startCalled) { dInfo("dnode-mgmt start udfd already called"); @@ -309,30 +317,27 @@ int32_t dmStartUdfd(SDnode *pDnode) { } pData->startCalled = true; uv_barrier_init(&pData->barrier, 2); - pData->stopping = 0; uv_thread_create(&pData->thread, dmWatchUdfd, pDnode); uv_barrier_wait(&pData->barrier); pData->needCleanUp = true; return pData->spawnErr; } -int32_t dmStopUdfd(SDnode *pDnode) { +static int32_t dmStopUdfd(SDnode *pDnode) { dInfo("dnode-mgmt to stop udfd. need cleanup: %d, spawn err: %d", pDnode->udfdData.needCleanUp, pDnode->udfdData.spawnErr); SUdfdData *pData = &pDnode->udfdData; if (!pData->needCleanUp) { return 0; } - atomic_store_8(&pData->stopping, 1); uv_barrier_destroy(&pData->barrier); if (pData->spawnErr == 0) { uv_process_kill(&pData->process, SIGINT); } - uv_stop(&pData->loop); + uv_async_send(&pData->stopAsync); uv_thread_join(&pData->thread); - atomic_store_8(&pData->stopping, 0); return 0; } diff --git a/source/dnode/mgmt/interface/inc/dmDef.h b/source/dnode/mgmt/interface/inc/dmDef.h index 4f4a2ed349..dd31faf1b7 100644 --- a/source/dnode/mgmt/interface/inc/dmDef.h +++ b/source/dnode/mgmt/interface/inc/dmDef.h @@ -151,8 +151,8 @@ typedef struct SUdfdData { uv_barrier_t barrier; uv_process_t process; int spawnErr; - int8_t stopping; uv_pipe_t ctrlPipe; + uv_async_t stopAsync; } SUdfdData; typedef struct SDnode { diff --git a/source/libs/function/src/udfd.c b/source/libs/function/src/udfd.c index 5f7532da87..6540851758 100644 --- a/source/libs/function/src/udfd.c +++ b/source/libs/function/src/udfd.c @@ -586,7 +586,7 @@ static int32_t udfdRun() { udfdCloseClientRpc(); uv_mutex_destroy(&global.udfsMutex); taosHashCleanup(global.udfsHash); - return code; + return 0; } int main(int argc, char *argv[]) { From a601081e6d930e338b07ec98986847406bae6ddc Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 22 Apr 2022 15:56:52 +0800 Subject: [PATCH 04/15] refactor(query): limit cast var type length to 1000 --- source/libs/function/src/builtins.c | 2 +- source/libs/scalar/src/sclfunc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index ce7384cbbe..909cf9d7ef 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -332,7 +332,7 @@ static int32_t translateCast(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } int32_t para2Bytes = pFunc->node.resType.bytes; - if (para2Bytes <= 0) { //non-positive value or overflow + if (para2Bytes <= 0 || para2Bytes > 1000) { //cast dst var type length limits to 1000 return invaildFuncParaValueErrMsg(pErrBuf, len, pFunc->functionName); } return TSDB_CODE_SUCCESS; diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 938f9d1f2d..c8e8780552 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -644,9 +644,9 @@ int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu } int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - int16_t inputType = pInput[0].columnData->info.type; - int16_t outputType = pOutput[0].columnData->info.type; - int64_t outputLen = pOutput[0].columnData->info.bytes; + int16_t inputType = GET_PARAM_TYPE(&pInput[0]); + int16_t outputType = GET_PARAM_TYPE(&pOutput[0]); + int64_t outputLen = GET_PARAM_BYTES(&pOutput[0]); if (IS_VAR_DATA_TYPE(outputType)) { int32_t factor = (TSDB_DATA_TYPE_NCHAR == outputType) ? TSDB_NCHAR_SIZE : 1; From 8ce6f55a9d4df6dcdd900e357b125f8e218fd670 Mon Sep 17 00:00:00 2001 From: slzhou Date: Fri, 22 Apr 2022 16:52:50 +0800 Subject: [PATCH 05/15] refine stop processing --- source/dnode/mgmt/implement/src/dmHandle.c | 12 +++++------- source/dnode/mgmt/interface/inc/dmDef.h | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/dnode/mgmt/implement/src/dmHandle.c b/source/dnode/mgmt/implement/src/dmHandle.c index c4eba53a34..8ba12513db 100644 --- a/source/dnode/mgmt/implement/src/dmHandle.c +++ b/source/dnode/mgmt/implement/src/dmHandle.c @@ -221,8 +221,8 @@ static int32_t dmSpawnUdfd(SDnode *pDnode); void dmUdfdExit(uv_process_t *process, int64_t exitStatus, int termSignal) { dInfo("udfd process exited with status %" PRId64 ", signal %d", exitStatus, termSignal); SDnode *pDnode = process->data; - if (exitStatus == 0 && termSignal == 0) { - dInfo("udfd process exit due to SIGINT"); + if (exitStatus == 0 && termSignal == 0 || atomic_load_32(&pDnode->udfdData.stopCalled)) { + dInfo("udfd process exit due to SIGINT or dnode-mgmt called stop"); } else { dInfo("udfd process restart"); dmSpawnUdfd(pDnode); @@ -327,14 +327,12 @@ static int32_t dmStopUdfd(SDnode *pDnode) { dInfo("dnode-mgmt to stop udfd. need cleanup: %d, spawn err: %d", pDnode->udfdData.needCleanUp, pDnode->udfdData.spawnErr); SUdfdData *pData = &pDnode->udfdData; - if (!pData->needCleanUp) { + if (!pData->needCleanUp || atomic_load_32(&pData->stopCalled)) { return 0; } - + atomic_store_32(&pData->stopCalled, 1); + pData->needCleanUp = false; uv_barrier_destroy(&pData->barrier); - if (pData->spawnErr == 0) { - uv_process_kill(&pData->process, SIGINT); - } uv_async_send(&pData->stopAsync); uv_thread_join(&pData->thread); diff --git a/source/dnode/mgmt/interface/inc/dmDef.h b/source/dnode/mgmt/interface/inc/dmDef.h index dd31faf1b7..087892e741 100644 --- a/source/dnode/mgmt/interface/inc/dmDef.h +++ b/source/dnode/mgmt/interface/inc/dmDef.h @@ -153,6 +153,7 @@ typedef struct SUdfdData { int spawnErr; uv_pipe_t ctrlPipe; uv_async_t stopAsync; + int32_t stopCalled; } SUdfdData; typedef struct SDnode { From 4cc3b019b362c42c168eb3b72815ce031b9d4382 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 17:06:08 +0800 Subject: [PATCH 06/15] [test: add test cases for tmq] --- tests/script/tsim/tmq/basic1.sim | 72 +++-- tests/script/tsim/tmq/basic2.sim | 219 ++++++++++++++ tests/script/tsim/tmq/basic3.sim | 278 ++++++++++++++++++ tests/script/tsim/tmq/basic4.sim | 216 ++++++++++++++ .../script/tsim/tmq/prepareBasicEnv-1vgrp.sim | 88 ++++++ .../script/tsim/tmq/prepareBasicEnv-4vgrp.sim | 88 ++++++ tests/script/tsim/tmq/prepareBasicEnv.sim | 2 +- tests/test/c/tmqSim.c | 13 +- 8 files changed, 947 insertions(+), 29 deletions(-) create mode 100644 tests/script/tsim/tmq/basic2.sim create mode 100644 tests/script/tsim/tmq/basic3.sim create mode 100644 tests/script/tsim/tmq/basic4.sim create mode 100644 tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim create mode 100644 tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim diff --git a/tests/script/tsim/tmq/basic1.sim b/tests/script/tsim/tmq/basic1.sim index df6a553d1a..f4e8f08c37 100644 --- a/tests/script/tsim/tmq/basic1.sim +++ b/tests/script/tsim/tmq/basic1.sim @@ -1,15 +1,16 @@ #### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# vgroups=1, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# vgroups=1, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# vgroups=4, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# vgroups=4, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb +#basic1.sim: vgroups=1, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic2.sim: vgroups=1, multi topics for one consumer, firstly insert data, then start consume. Include six topics +#basic3.sim: vgroups=4, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic4.sim: vgroups=4, multi topics for one consumer, firstly insert data, then start consume. Include six topics + # notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN # The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; # # notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). # -run tsim/tmq/prepareBasicEnv.sim +run tsim/tmq/prepareBasicEnv-1vgrp.sim #---- global parameters start ----# $dbName = db @@ -20,11 +21,11 @@ $ntbPrefix = ntb $stbNum = 1 $ctbNum = 10 $ntbNum = 10 -$rowsPerCtb = 100 +$rowsPerCtb = 10 $tstart = 1640966400000 # 2022-01-01 00:00:00.000 #---- global parameters end ----# -$pullDelay = 3 +$pullDelay = 5 $ifcheckdata = 1 $showMsg = 1 $showRow = 0 @@ -55,9 +56,33 @@ sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb0 $keyList = ' . group.id:cgrp1 $keyList = $keyList . ' +$cdb_index = 0 +#=============================== start consume =============================# + print ================ test consume from stb $loop_cnt = 0 loop_consume_diff_topic_from_stb: + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdb_index = $cdb_index + 1 +$cdbName = cdb . $cdb_index +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + if $loop_cnt == 0 then print == scenario 1: topic_stb_column $topicList = ' . topic_stb_column @@ -76,13 +101,12 @@ endi $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb -#$expectmsgcnt = $totalMsgOfStb + 1 -$expectmsgcnt = 110 +$expectmsgcnt = $totalMsgOfStb sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) print == start consumer to pull msgs from stb -print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start -system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start print == check consume result wait_consumer_end_from_stb: @@ -106,11 +130,16 @@ $loop_cnt = $loop_cnt + 1 goto loop_consume_diff_topic_from_stb loop_consume_diff_topic_from_stb_end: +print ================ test consume from ctb +$loop_cnt = 0 +loop_consume_diff_topic_from_ctb: + ####################################################################################### # clear consume info and consume result #run tsim/tmq/clearConsume.sim # because drop table function no stable, so by create new db for consume info and result. Modify it later -$cdbName = cdb1 +$cdb_index = $cdb_index + 1 +$cdbName = cdb . $cdb_index sql create database $cdbName vgroups 1 sleep 500 sql use $cdbName @@ -125,10 +154,6 @@ if $rows != 2 then endi ####################################################################################### - -print ================ test consume from ctb -$loop_cnt = 0 -loop_consume_diff_topic_from_ctb: if $loop_cnt == 0 then print == scenario 1: topic_ctb_column $topicList = ' . topic_ctb_column @@ -147,7 +172,7 @@ endi $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfCtb + 1 +$expectmsgcnt = $totalMsgOfCtb sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) print == start consumer to pull msgs from stb @@ -176,11 +201,16 @@ $loop_cnt = $loop_cnt + 1 goto loop_consume_diff_topic_from_ctb loop_consume_diff_topic_from_ctb_end: +print ================ test consume from ntb +$loop_cnt = 0 +loop_consume_diff_topic_from_ntb: + ####################################################################################### # clear consume info and consume result #run tsim/tmq/clearConsume.sim # because drop table function no stable, so by create new db for consume info and result. Modify it later -$cdbName = cdb2 +$cdb_index = $cdb_index + 1 +$cdbName = cdb . $cdb_index sql create database $cdbName vgroups 1 sleep 500 sql use $cdbName @@ -195,10 +225,6 @@ if $rows != 2 then endi ####################################################################################### - -print ================ test consume from ntb -$loop_cnt = 0 -loop_consume_diff_topic_from_ntb: if $loop_cnt == 0 then print == scenario 1: topic_ntb_column $topicList = ' . topic_ntb_column @@ -217,7 +243,7 @@ endi $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfNtb + 1 +$expectmsgcnt = $totalMsgOfNtb sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) print == start consumer to pull msgs from stb diff --git a/tests/script/tsim/tmq/basic2.sim b/tests/script/tsim/tmq/basic2.sim new file mode 100644 index 0000000000..b3e9a67c62 --- /dev/null +++ b/tests/script/tsim/tmq/basic2.sim @@ -0,0 +1,219 @@ +#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 +#basic1.sim: vgroups=1, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic2.sim: vgroups=1, multi topics for one consumer, firstly insert data, then start consume. Include six topics +#basic3.sim: vgroups=4, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic4.sim: vgroups=4, multi topics for one consumer, firstly insert data, then start consume. Include six topics + +# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN +# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; +# +# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). +# + +run tsim/tmq/prepareBasicEnv-1vgrp.sim + +#---- global parameters start ----# +$dbName = db +$vgroups = 1 +$stbPrefix = stb +$ctbPrefix = ctb +$ntbPrefix = ntb +$stbNum = 1 +$ctbNum = 10 +$ntbNum = 10 +$rowsPerCtb = 10 +$tstart = 1640966400000 # 2022-01-01 00:00:00.000 +#---- global parameters end ----# + +$pullDelay = 5 +$ifcheckdata = 1 +$showMsg = 1 +$showRow = 0 + +sql connect +sql use $dbName + +print == create topics from super table +sql create topic topic_stb_column as select ts, c3 from stb +sql create topic topic_stb_all as select ts, c1, c2, c3 from stb +sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb + +print == create topics from child table +sql create topic topic_ctb_column as select ts, c3 from ctb0 +sql create topic topic_ctb_all as select * from ctb0 +sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ctb0 + +print == create topics from normal table +sql create topic topic_ntb_column as select ts, c3 from ntb0 +sql create topic topic_ntb_all as select * from ntb0 +sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb0 + +#sql show topics +#if $rows != 9 then +# return -1 +#endi + +$keyList = ' . group.id:cgrp1 +$keyList = $keyList . ' + +$topicNum = 3 + +#=============================== start consume =============================# + + +print ================ test consume from stb +print == multi toipcs: topic_stb_column + topic_stb_all + topic_stb_function +$topicList = ' . topic_stb_column +$topicList = $topicList . , +$topicList = $topicList . topic_stb_all +$topicList = $topicList . , +$topicList = $topicList . topic_stb_function +$topicList = $topicList . ' + +$consumerId = 0 +$totalMsgOfStb = $ctbNum * $rowsPerCtb +$totalMsgOfStb = $totalMsgOfStb * $topicNum +$expectmsgcnt = $totalMsgOfStb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start + +print == check consume result +wait_consumer_end_from_stb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_stb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $expectmsgcnt then + return -1 +endi +if $data[0][3] != $expectmsgcnt then + return -1 +endi + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdbName = cdb1 +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + + +print ================ test consume from ctb +print == multi toipcs: topic_ctb_column + topic_ctb_all + topic_ctb_function +$topicList = ' . topic_ctb_column +$topicList = $topicList . , +$topicList = $topicList . topic_ctb_all +$topicList = $topicList . , +$topicList = $topicList . topic_ctb_function +$topicList = $topicList . ' + +$consumerId = 0 +$totalMsgOfCtb = $rowsPerCtb * $topicNum +$expectmsgcnt = $totalMsgOfCtb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start + +print == check consume result +wait_consumer_end_from_ctb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_ctb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $totalMsgOfCtb then + return -1 +endi +if $data[0][3] != $totalMsgOfCtb then + return -1 +endi + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdbName = cdb2 +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + + +print ================ test consume from ntb +print == multi toipcs: topic_ntb_column + topic_ntb_all + topic_ntb_function +$topicList = ' . topic_ntb_column +$topicList = $topicList . , +$topicList = $topicList . topic_ntb_all +$topicList = $topicList . , +$topicList = $topicList . topic_ntb_function +$topicList = $topicList . ' + +$consumerId = 0 +$totalMsgOfNtb = $rowsPerCtb * $topicNum +$expectmsgcnt = $totalMsgOfNtb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start + +print == check consume result from ntb +wait_consumer_end_from_ntb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_ntb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $totalMsgOfNtb then + return -1 +endi +if $data[0][3] != $totalMsgOfNtb then + return -1 +endi + +#------ not need stop consumer, because it exit after pull msg overthan expect msg +#system tsim/tmq/consume.sh -s stop -x SIGINT + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/basic3.sim b/tests/script/tsim/tmq/basic3.sim new file mode 100644 index 0000000000..7a0ee6f917 --- /dev/null +++ b/tests/script/tsim/tmq/basic3.sim @@ -0,0 +1,278 @@ +#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 +#basic1.sim: vgroups=1, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic2.sim: vgroups=1, multi topics for one consumer, firstly insert data, then start consume. Include six topics +#basic3.sim: vgroups=4, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic4.sim: vgroups=4, multi topics for one consumer, firstly insert data, then start consume. Include six topics + +# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN +# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; +# +# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). +# + +run tsim/tmq/prepareBasicEnv-4vgrp.sim + +#---- global parameters start ----# +$dbName = db +$vgroups = 4 +$stbPrefix = stb +$ctbPrefix = ctb +$ntbPrefix = ntb +$stbNum = 1 +$ctbNum = 10 +$ntbNum = 10 +$rowsPerCtb = 10 +$tstart = 1640966400000 # 2022-01-01 00:00:00.000 +#---- global parameters end ----# + +$pullDelay = 5 +$ifcheckdata = 1 +$showMsg = 1 +$showRow = 0 + +sql connect +sql use $dbName + +print == create topics from super table +sql create topic topic_stb_column as select ts, c3 from stb +sql create topic topic_stb_all as select ts, c1, c2, c3 from stb +sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb + +print == create topics from child table +sql create topic topic_ctb_column as select ts, c3 from ctb0 +sql create topic topic_ctb_all as select * from ctb0 +sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ctb0 + +print == create topics from normal table +sql create topic topic_ntb_column as select ts, c3 from ntb0 +sql create topic topic_ntb_all as select * from ntb0 +sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb0 + +#sql show topics +#if $rows != 9 then +# return -1 +#endi + +$keyList = ' . group.id:cgrp1 +$keyList = $keyList . ' + +$cdb_index = 0 +#=============================== start consume =============================# + +print ================ test consume from stb +$loop_cnt = 0 +loop_consume_diff_topic_from_stb: + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdb_index = $cdb_index + 1 +$cdbName = cdb . $cdb_index +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + +if $loop_cnt == 0 then + print == scenario 1: topic_stb_column + $topicList = ' . topic_stb_column + $topicList = $topicList . ' +elif $loop_cnt == 1 then + print == scenario 2: topic_stb_all + $topicList = ' . topic_stb_all + $topicList = $topicList . ' +elif $loop_cnt == 2 then + print == scenario 3: topic_stb_function + $topicList = ' . topic_stb_function + $topicList = $topicList . ' +else + goto loop_consume_diff_topic_from_stb_end +endi + +$consumerId = 0 +$totalMsgOfStb = $ctbNum * $rowsPerCtb +$expectmsgcnt = $totalMsgOfStb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start + +print == check consume result +wait_consumer_end_from_stb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_stb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $expectmsgcnt then + return -1 +endi +if $data[0][3] != $expectmsgcnt then + return -1 +endi +$loop_cnt = $loop_cnt + 1 +goto loop_consume_diff_topic_from_stb +loop_consume_diff_topic_from_stb_end: + +print ================ test consume from ctb +$loop_cnt = 0 +loop_consume_diff_topic_from_ctb: + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdb_index = $cdb_index + 1 +$cdbName = cdb . $cdb_index +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + +if $loop_cnt == 0 then + print == scenario 1: topic_ctb_column + $topicList = ' . topic_ctb_column + $topicList = $topicList . ' +elif $loop_cnt == 1 then + print == scenario 2: topic_ctb_all + $topicList = ' . topic_ctb_all + $topicList = $topicList . ' +elif $loop_cnt == 2 then + print == scenario 3: topic_ctb_function + $topicList = ' . topic_ctb_function + $topicList = $topicList . ' +else + goto loop_consume_diff_topic_from_ctb_end +endi + +$consumerId = 0 +$totalMsgOfCtb = $rowsPerCtb +$expectmsgcnt = $totalMsgOfCtb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start + +print == check consume result +wait_consumer_end_from_ctb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_ctb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $totalMsgOfCtb then + return -1 +endi +if $data[0][3] != $totalMsgOfCtb then + return -1 +endi +$loop_cnt = $loop_cnt + 1 +goto loop_consume_diff_topic_from_ctb +loop_consume_diff_topic_from_ctb_end: + +print ================ test consume from ntb +$loop_cnt = 0 +loop_consume_diff_topic_from_ntb: + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdb_index = $cdb_index + 1 +$cdbName = cdb . $cdb_index +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + +if $loop_cnt == 0 then + print == scenario 1: topic_ntb_column + $topicList = ' . topic_ntb_column + $topicList = $topicList . ' +elif $loop_cnt == 1 then + print == scenario 2: topic_ntb_all + $topicList = ' . topic_ntb_all + $topicList = $topicList . ' +elif $loop_cnt == 2 then + print == scenario 3: topic_ntb_function + $topicList = ' . topic_ntb_function + $topicList = $topicList . ' +else + goto loop_consume_diff_topic_from_ntb_end +endi + +$consumerId = 0 +$totalMsgOfNtb = $rowsPerCtb +$expectmsgcnt = $totalMsgOfNtb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start + +print == check consume result from ntb +wait_consumer_end_from_ntb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_ntb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $totalMsgOfNtb then + return -1 +endi +if $data[0][3] != $totalMsgOfNtb then + return -1 +endi +$loop_cnt = $loop_cnt + 1 +goto loop_consume_diff_topic_from_ntb +loop_consume_diff_topic_from_ntb_end: + +#------ not need stop consumer, because it exit after pull msg overthan expect msg +#system tsim/tmq/consume.sh -s stop -x SIGINT + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/basic4.sim b/tests/script/tsim/tmq/basic4.sim new file mode 100644 index 0000000000..1af02751b1 --- /dev/null +++ b/tests/script/tsim/tmq/basic4.sim @@ -0,0 +1,216 @@ +#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 +#basic1.sim: vgroups=1, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic2.sim: vgroups=1, multi topics for one consumer, firstly insert data, then start consume. Include six topics +#basic3.sim: vgroups=4, one topic for one consumer, firstly insert data, then start consume. Include six topics +#basic4.sim: vgroups=4, multi topics for one consumer, firstly insert data, then start consume. Include six topics + +# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN +# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; +# +# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). +# + +run tsim/tmq/prepareBasicEnv-4vgrp.sim + +#---- global parameters start ----# +$dbName = db +$vgroups = 4 +$stbPrefix = stb +$ctbPrefix = ctb +$ntbPrefix = ntb +$stbNum = 1 +$ctbNum = 10 +$ntbNum = 10 +$rowsPerCtb = 10 +$tstart = 1640966400000 # 2022-01-01 00:00:00.000 +#---- global parameters end ----# + +$pullDelay = 5 +$ifcheckdata = 1 +$showMsg = 1 +$showRow = 0 + +sql connect +sql use $dbName + +print == create topics from super table +sql create topic topic_stb_column as select ts, c3 from stb +sql create topic topic_stb_all as select ts, c1, c2, c3 from stb +sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb + +print == create topics from child table +sql create topic topic_ctb_column as select ts, c3 from ctb0 +sql create topic topic_ctb_all as select * from ctb0 +sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ctb0 + +print == create topics from normal table +sql create topic topic_ntb_column as select ts, c3 from ntb0 +sql create topic topic_ntb_all as select * from ntb0 +sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb0 + +#sql show topics +#if $rows != 9 then +# return -1 +#endi + +$keyList = ' . group.id:cgrp1 +$keyList = $keyList . ' + +$topicNum = 3 + +print ================ test consume from stb +print == multi toipcs: topic_stb_column + topic_stb_all + topic_stb_function +$topicList = ' . topic_stb_column +$topicList = $topicList . , +$topicList = $topicList . topic_stb_all +$topicList = $topicList . , +$topicList = $topicList . topic_stb_function +$topicList = $topicList . ' + +$consumerId = 0 +$totalMsgOfStb = $ctbNum * $rowsPerCtb +$totalMsgOfStb = $totalMsgOfStb * $topicNum +$expectmsgcnt = $totalMsgOfStb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start + +print == check consume result +wait_consumer_end_from_stb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_stb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $expectmsgcnt then + return -1 +endi +if $data[0][3] != $expectmsgcnt then + return -1 +endi + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdbName = cdb1 +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + + +print ================ test consume from ctb +print == multi toipcs: topic_ctb_column + topic_ctb_all + topic_ctb_function +$topicList = ' . topic_ctb_column +$topicList = $topicList . , +$topicList = $topicList . topic_ctb_all +$topicList = $topicList . , +$topicList = $topicList . topic_ctb_function +$topicList = $topicList . ' + +$consumerId = 0 +$totalMsgOfCtb = $rowsPerCtb * $topicNum +$expectmsgcnt = $totalMsgOfCtb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start + +print == check consume result +wait_consumer_end_from_ctb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_ctb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $totalMsgOfCtb then + return -1 +endi +if $data[0][3] != $totalMsgOfCtb then + return -1 +endi + +####################################################################################### +# clear consume info and consume result +#run tsim/tmq/clearConsume.sim +# because drop table function no stable, so by create new db for consume info and result. Modify it later +$cdbName = cdb2 +sql create database $cdbName vgroups 1 +sleep 500 +sql use $cdbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi +####################################################################################### + + +print ================ test consume from ntb +print == multi toipcs: topic_ntb_column + topic_ntb_all + topic_ntb_function +$topicList = ' . topic_ntb_column +$topicList = $topicList . , +$topicList = $topicList . topic_ntb_all +$topicList = $topicList . , +$topicList = $topicList . topic_ntb_function +$topicList = $topicList . ' + +$consumerId = 0 +$totalMsgOfNtb = $rowsPerCtb * $topicNum +$expectmsgcnt = $totalMsgOfNtb +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata ) + +print == start consumer to pull msgs from stb +print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start +system tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start + +print == check consume result from ntb +wait_consumer_end_from_ntb: +sql select * from consumeresult +print ==> rows: $rows +print ==> rows[0]: $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] +if $rows != 1 then + sleep 1000 + goto wait_consumer_end_from_ntb +endi +if $data[0][1] != $consumerId then + return -1 +endi +if $data[0][2] != $totalMsgOfNtb then + return -1 +endi +if $data[0][3] != $totalMsgOfNtb then + return -1 +endi + +#------ not need stop consumer, because it exit after pull msg overthan expect msg +#system tsim/tmq/consume.sh -s stop -x SIGINT + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim b/tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim new file mode 100644 index 0000000000..db56bcf743 --- /dev/null +++ b/tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim @@ -0,0 +1,88 @@ +# stop all dnodes before start this case +system sh/stop_dnodes.sh + +# deploy dnode 1 +system sh/deploy.sh -n dnode1 -i 1 + +# add some config items for this case +#system sh/cfg.sh -n dnode1 -c supportVnodes -v 0 + +# start dnode 1 +system sh/exec.sh -n dnode1 -s start + +sql connect + +#---- global parameters start ----# +$dbName = db +$vgroups = 1 +$stbPrefix = stb +$ctbPrefix = ctb +$ntbPrefix = ntb +$stbNum = 1 +$ctbNum = 10 +$ntbNum = 10 +$rowsPerCtb = 10 +$tstart = 1640966400000 # 2022-01-01 00:00:00.000 +#---- global parameters end ----# + +print == create database $dbName vgroups $vgroups +sql create database $dbName vgroups $vgroups + +#wait database ready +$loop_cnt = 0 +check_db_ready: +if $loop_cnt == 10 then + print ====> database not ready! + return -1 +endi +sql show databases +print ==> rows: $rows +print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] +print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] +if $data(db)[20] != nostrict then + sleep 100 + $loop_cnt = $loop_cnt + 1 + goto check_db_ready +endi + +sql use $dbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi + +print == create super table +sql create table $stbPrefix (ts timestamp, c1 int, c2 float, c3 binary(16)) tags (t1 int) +sql show stables +if $rows != 1 then + return -1 +endi + +print == create child table, normal table and insert data +$i = 0 +while $i < $ctbNum + $ctb = $ctbPrefix . $i + $ntb = $ntbPrefix . $i + sql create table $ctb using $stbPrefix tags( $i ) + sql create table $ntb (ts timestamp, c1 int, c2 float, c3 binary(16)) + + $x = 0 + while $x < $rowsPerCtb + $binary = ' . binary- + $binary = $binary . $i + $binary = $binary . ' + + sql insert into $ctb values ($tstart , $i , $x , $binary ) + sql insert into $ntb values ($tstart , $i , $x , $binary ) + $tstart = $tstart + 1 + $x = $x + 1 + endw + + $i = $i + 1 + $tstart = 1640966400000 +endw diff --git a/tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim b/tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim new file mode 100644 index 0000000000..d7fa58558f --- /dev/null +++ b/tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim @@ -0,0 +1,88 @@ +# stop all dnodes before start this case +system sh/stop_dnodes.sh + +# deploy dnode 1 +system sh/deploy.sh -n dnode1 -i 1 + +# add some config items for this case +#system sh/cfg.sh -n dnode1 -c supportVnodes -v 0 + +# start dnode 1 +system sh/exec.sh -n dnode1 -s start + +sql connect + +#---- global parameters start ----# +$dbName = db +$vgroups = 4 +$stbPrefix = stb +$ctbPrefix = ctb +$ntbPrefix = ntb +$stbNum = 1 +$ctbNum = 10 +$ntbNum = 10 +$rowsPerCtb = 10 +$tstart = 1640966400000 # 2022-01-01 00:00:00.000 +#---- global parameters end ----# + +print == create database $dbName vgroups $vgroups +sql create database $dbName vgroups $vgroups + +#wait database ready +$loop_cnt = 0 +check_db_ready: +if $loop_cnt == 10 then + print ====> database not ready! + return -1 +endi +sql show databases +print ==> rows: $rows +print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] +print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] +if $data(db)[20] != nostrict then + sleep 100 + $loop_cnt = $loop_cnt + 1 + goto check_db_ready +endi + +sql use $dbName + +print == create consume info table and consume result table +sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) +sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) + +sql show tables +if $rows != 2 then + return -1 +endi + +print == create super table +sql create table $stbPrefix (ts timestamp, c1 int, c2 float, c3 binary(16)) tags (t1 int) +sql show stables +if $rows != 1 then + return -1 +endi + +print == create child table, normal table and insert data +$i = 0 +while $i < $ctbNum + $ctb = $ctbPrefix . $i + $ntb = $ntbPrefix . $i + sql create table $ctb using $stbPrefix tags( $i ) + sql create table $ntb (ts timestamp, c1 int, c2 float, c3 binary(16)) + + $x = 0 + while $x < $rowsPerCtb + $binary = ' . binary- + $binary = $binary . $i + $binary = $binary . ' + + sql insert into $ctb values ($tstart , $i , $x , $binary ) + sql insert into $ntb values ($tstart , $i , $x , $binary ) + $tstart = $tstart + 1 + $x = $x + 1 + endw + + $i = $i + 1 + $tstart = 1640966400000 +endw diff --git a/tests/script/tsim/tmq/prepareBasicEnv.sim b/tests/script/tsim/tmq/prepareBasicEnv.sim index 066d7d4ab0..c4f706e262 100644 --- a/tests/script/tsim/tmq/prepareBasicEnv.sim +++ b/tests/script/tsim/tmq/prepareBasicEnv.sim @@ -14,7 +14,7 @@ sql connect #---- global parameters start ----# $dbName = db -$vgroups = 1 +$vgroups = 4 $stbPrefix = stb $ctbPrefix = ctb $ntbPrefix = ntb diff --git a/tests/test/c/tmqSim.c b/tests/test/c/tmqSim.c index f9ba0e418c..9f6c1a59eb 100644 --- a/tests/test/c/tmqSim.c +++ b/tests/test/c/tmqSim.c @@ -14,13 +14,14 @@ */ #include +#include #include #include #include #include #include #include -// #include +#include #include "taos.h" #include "taoserror.h" @@ -99,11 +100,11 @@ void initLogFile() { // FILE *fp = fopen(g_stConfInfo.resultFileName, "a"); char file[256]; sprintf(file, "%s/../log/tmqlog.txt", configDir); - TdFilePtr pFile = taosOpenFile(file, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_APPEND | TD_FILE_STREAM); + TdFilePtr pFile = taosOpenFile(file, TD_FILE_TEXT | TD_FILE_WRITE | TD_FILE_TRUNC | TD_FILE_STREAM); if (NULL == pFile) { fprintf(stderr, "Failed to open %s for save result\n", "./tmqlog.txt"); - exit(-1); - } + exit -1; + }; g_fp = pFile; } @@ -119,6 +120,7 @@ void saveConfigToLogFile() { taosFprintfFile(g_fp, "# showMsgFlag: %d\n", g_stConfInfo.showMsgFlag); taosFprintfFile(g_fp, "# showRowFlag: %d\n", g_stConfInfo.showRowFlag); taosFprintfFile(g_fp, "# consumeDelay: %d\n", g_stConfInfo.consumeDelay); + taosFprintfFile(g_fp, "# numOfThread: %d\n", g_stConfInfo.numOfThread); for (int32_t i = 0; i < g_stConfInfo.numOfThread; i++) { taosFprintfFile(g_fp, "# consumer %d info:\n", g_stConfInfo.stThreads[i].consumerId); @@ -483,6 +485,7 @@ int main(int32_t argc, char* argv[]) { taosThreadAttrSetDetachState(&thattr, PTHREAD_CREATE_JOINABLE); // pthread_create one thread to consume + taosFprintfFile(g_fp, "==== create %d consume thread ====\n", g_stConfInfo.numOfThread); for (int32_t i = 0; i < g_stConfInfo.numOfThread; ++i) { taosThreadCreate(&(g_stConfInfo.stThreads[i].thread), &thattr, consumeThreadFunc, (void *)(&(g_stConfInfo.stThreads[i]))); } @@ -493,7 +496,7 @@ int main(int32_t argc, char* argv[]) { //printf("consumer: %d, cosumer1: %d\n", totalMsgs, pInfo->consumeMsgCnt); - taosFprintfFile(g_fp, "\n"); + taosFprintfFile(g_fp, "==== close tmqlog ====\n"); taosCloseFile(&g_fp); return 0; From 98cccc17a759ead063d3c117840bfc2e4ed2a94a Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 17:09:26 +0800 Subject: [PATCH 07/15] [test: modify tmq test cases] --- tests/script/jenkins/basic.txt | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 506abf3fc5..3159569f32 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -54,19 +54,10 @@ ./test.sh -f tsim/table/basic1.sim # ---- tmq -./test.sh -f tsim/tmq/basic.sim -#./test.sh -f tsim/tmq/basic1.sim -#./test.sh -f tsim/tmq/oneTopic.sim -#./test.sh -f tsim/tmq/multiTopic.sim - -#./test.sh -f tsim/tmq/mainConsumerInMultiTopic.sim -#./test.sh -f tsim/tmq/mainConsumerInOneTopic.sim - -#fail ./test.sh -f tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim -#fail ./test.sh -f tsim/tmq/main2Con1Cgrp1TopicFrStb.sim -#./test.sh -f tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim -#./test.sh -f tsim/tmq/main2Con1Cgrp2TopicFrStb.sim - +./test.sh -f tsim/tmq/basic1.sim +./test.sh -f tsim/tmq/basic2.sim +./test.sh -f tsim/tmq/basic3.sim +./test.sh -f tsim/tmq/basic4.sim # --- stable ./test.sh -f tsim/stable/disk.sim From 3aa40bd504cb6fbfd8c18e72ee3634a27dbc67ee Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 17:13:15 +0800 Subject: [PATCH 08/15] [test: rm some discard file] --- tests/script/tsim/tmq/basic.sim | 86 ------ tests/script/tsim/tmq/insertDataV1.sim | 44 --- tests/script/tsim/tmq/insertDataV4.sim | 44 --- tests/script/tsim/tmq/insertFixedDataV2.sim | 51 ---- tests/script/tsim/tmq/insertFixedDataV4.sim | 51 ---- .../tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim | 269 ------------------ .../tsim/tmq/main2Con1Cgrp1TopicFrStb.sim | 244 ---------------- .../tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim | 239 ---------------- .../tsim/tmq/main2Con1Cgrp2TopicFrStb.sim | 244 ---------------- .../tsim/tmq/mainConsumerInMultiTopic.sim | 217 -------------- .../tsim/tmq/mainConsumerInOneTopic.sim | 246 ---------------- tests/script/tsim/tmq/multiTopic.sim | 228 --------------- tests/script/tsim/tmq/oneTopic.sim | 268 ----------------- .../script/tsim/tmq/overlapTopic2Con1Cgrp.sim | 255 ----------------- tests/script/tsim/tmq/prepareBasicEnv.sim | 88 ------ 15 files changed, 2574 deletions(-) delete mode 100644 tests/script/tsim/tmq/basic.sim delete mode 100644 tests/script/tsim/tmq/insertDataV1.sim delete mode 100644 tests/script/tsim/tmq/insertDataV4.sim delete mode 100644 tests/script/tsim/tmq/insertFixedDataV2.sim delete mode 100644 tests/script/tsim/tmq/insertFixedDataV4.sim delete mode 100644 tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim delete mode 100644 tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim delete mode 100644 tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim delete mode 100644 tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim delete mode 100644 tests/script/tsim/tmq/mainConsumerInMultiTopic.sim delete mode 100644 tests/script/tsim/tmq/mainConsumerInOneTopic.sim delete mode 100644 tests/script/tsim/tmq/multiTopic.sim delete mode 100644 tests/script/tsim/tmq/oneTopic.sim delete mode 100644 tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim delete mode 100644 tests/script/tsim/tmq/prepareBasicEnv.sim diff --git a/tests/script/tsim/tmq/basic.sim b/tests/script/tsim/tmq/basic.sim deleted file mode 100644 index 2f16b7c737..0000000000 --- a/tests/script/tsim/tmq/basic.sim +++ /dev/null @@ -1,86 +0,0 @@ -system sh/stop_dnodes.sh - -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c wal -v 1 -system sh/exec.sh -n dnode1 -s start -sleep 500 -sql connect - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 100 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -#root@trd02 /data2/dnode $ tmq_demo --help -#Used to tmq_demo -# -c Configuration directory, default is -# -d The name of the database to be created, default is tmqdb -# -s The name of the super table to be created, default is stb -# -f The file of result, default is ./tmqResult.txt -# -w The path of vnode of wal, default is /data2/dnode/data/vnodes/vnode2/wal -# -t numOfThreads, default is 1 -# -n numOfTables, default is 1 -# -v numOfVgroups, default is 1 -# -a runMode, default is 0 -# -l numOfColumn, default is 1 -# -q ratio, default is 1.000000 -# -b batchNumOfRow, default is 1 -# -r totalRowsOfPerTbl, default is 10000 -# -m startTimestamp, default is 1640966400000 [2022-01-01 00:00:00] -# -g showMsgFlag, default is 0 -# - -system_content echo -n \$BUILD_DIR -$tmq_demo = $system_content . /build/bin/tmq_demo -system_content echo -n \$SIM_DIR -$tsim_cfg = $system_content . /tsim/cfg -$sim_wal = $system_content . /dnode1/data/vnode/vnode4/wal - -print cmd===> system_content $tmq_demo -sim 1 -b 100 -c $tsim_cfg -w $sim_wal -system_content $tmq_demo -sim 1 -b 100 -c $tsim_cfg -w $sim_wal -print cmd result----> $system_content -if $system_content != @{consume success: 100}@ then - return -1 -endi - -sql show databases -print ===> $rows $data00 $data01 $data02 $data03 -if $rows != 3 then - return -1 -endi -if $data20 != tmqdb then - return -1 -endi - -sql use tmqdb -sql show tables -print ===> $rows $data00 $data01 $data02 $data03 -if $rows != 1 then - return -1 -endi -if $data00 != stb0 then - return -1 -endi - -sql select count(*) from stb0 -print ===> $rows $data00 $data01 $data02 $data03 -if $rows != 1 then - return -1 -endi -if $data00 != 10000 then - return -1 -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/insertDataV1.sim b/tests/script/tsim/tmq/insertDataV1.sim deleted file mode 100644 index 0df74d53f8..0000000000 --- a/tests/script/tsim/tmq/insertDataV1.sim +++ /dev/null @@ -1,44 +0,0 @@ - -sql connect - -print ================ insert data -$dbNamme = d0 -$tbPrefix = ct -$tbNum = 10 -$rowNum = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 - -sql use $dbNamme - -$loop_cnt = 0 - -loop_insert: -print ====> loop $loop_cnt insert -$loop_cnt = $loop_cnt + 1 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - - $x = 0 - while $x < $rowNum - $binary = ' . binary - $binary = $binary . $i - $binary = $binary . ' - - #print ====> insert into $tb values ($tstart , $i , $x , $binary ) - #print ====> insert into ntb values ($tstart , $i , $x , $binary ) - sql insert into $tb values ($tstart , $i , $x , $binary ) - sql insert into ntb values ($tstart , 999 , 999 , 'binary-ntb' ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - print ====> insert rows: $rowNum into $tb and ntb - - $i = $i + 1 -# $tstart = 1640966400000 -endw -goto loop_insert - - diff --git a/tests/script/tsim/tmq/insertDataV4.sim b/tests/script/tsim/tmq/insertDataV4.sim deleted file mode 100644 index dbd52f56b8..0000000000 --- a/tests/script/tsim/tmq/insertDataV4.sim +++ /dev/null @@ -1,44 +0,0 @@ - -sql connect - -print ================ insert data -$dbNamme = d1 -$tbPrefix = ct -$tbNum = 10 -$rowNum = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 - -sql use $dbNamme - -$loop_cnt = 0 - -loop_insert: -print ====> loop $loop_cnt insert -$loop_cnt = $loop_cnt + 1 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - - $x = 0 - while $x < $rowNum - $binary = ' . binary - $binary = $binary . $i - $binary = $binary . ' - - #print ====> insert into $tb values ($tstart , $i , $x , $binary ) - #print ====> insert into ntb values ($tstart , $i , $x , $binary ) - sql insert into $tb values ($tstart , $i , $x , $binary ) - sql insert into ntb values ($tstart , 999 , 999 , 'binary-ntb' ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - #print ====> insert rows: $rowNum into $tb and ntb - - $i = $i + 1 -# $tstart = 1640966400000 -endw -goto loop_insert - - diff --git a/tests/script/tsim/tmq/insertFixedDataV2.sim b/tests/script/tsim/tmq/insertFixedDataV2.sim deleted file mode 100644 index a93be3e5a6..0000000000 --- a/tests/script/tsim/tmq/insertFixedDataV2.sim +++ /dev/null @@ -1,51 +0,0 @@ - -sql connect - -print ================ insert data -$dbNamme = d0 -$tbPrefix = ct -$tbNum = 10 -$rowNum = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 - -$loopInsertNum = 10 - -sql use $dbNamme - -$loopIndex = 0 - -loop_insert: -print ====> loop $loopIndex insert -$loopIndex = $loopIndex + 1 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - - $x = 0 - while $x < $rowNum - $binary = ' . binary - $binary = $binary . $i - $binary = $binary . ' - - #print ====> insert into $tb values ($tstart , $i , $x , $binary ) - #print ====> insert into ntb values ($tstart , $i , $x , $binary ) - sql insert into $tb values ($tstart , $i , $x , $binary ) - sql insert into ntb values ($tstart , 999 , 999 , 'binary-ntb' ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - #print ====> insert rows: $rowNum into $tb and ntb - - $i = $i + 1 -# $tstart = 1640966400000 -endw - - -if $loopIndex < $loopInsertNum then - goto loop_insert -endi - -print ====> insert data end =========== - diff --git a/tests/script/tsim/tmq/insertFixedDataV4.sim b/tests/script/tsim/tmq/insertFixedDataV4.sim deleted file mode 100644 index 9f7f86747f..0000000000 --- a/tests/script/tsim/tmq/insertFixedDataV4.sim +++ /dev/null @@ -1,51 +0,0 @@ - -sql connect - -print ================ insert data -$dbNamme = d1 -$tbPrefix = ct -$tbNum = 10 -$rowNum = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 - -$loopInsertNum = 10 - -sql use $dbNamme - -$loopIndex = 0 - -loop_insert: -print ====> loop $loopIndex insert -$loopIndex = $loopIndex + 1 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - - $x = 0 - while $x < $rowNum - $binary = ' . binary - $binary = $binary . $i - $binary = $binary . ' - - #print ====> insert into $tb values ($tstart , $i , $x , $binary ) - #print ====> insert into ntb values ($tstart , $i , $x , $binary ) - sql insert into $tb values ($tstart , $i , $x , $binary ) - sql insert into ntb values ($tstart , 999 , 999 , 'binary-ntb' ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - #print ====> insert rows: $rowNum into $tb and ntb - - $i = $i + 1 -# $tstart = 1640966400000 -endw - - -if $loopIndex < $loopInsertNum then - goto loop_insert -endi - -print ====> insert data end =========== - diff --git a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim b/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim deleted file mode 100644 index cf53cc7bcd..0000000000 --- a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim +++ /dev/null @@ -1,269 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=2, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=2, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene1 and scene3 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 2 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql show databases -print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 -print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 -print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 - -if $loop_cnt == 0 then - if $rows != 2 then - return -1 - endi - if $data02 != 2 then # vgroups - print vgroups: $data02 - return -1 - endi -else - if $rows != 3 then - return -1 - endi - if $data00 == d1 then - if $data02 != 4 then # vgroups - print vgroups: $data02 - return -1 - endi - else - if $data12 != 4 then # vgroups - print vgroups: $data12 - return -1 - endi - endi -endi - -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create topics from child table - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -#sql create topic topic_ntb_column as select ts, c1, c3 from ntb -#sql create topic topic_ntb_all as select * from ntb -#sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== run_back insert data - -if $loop_cnt == 0 then - run_back tsim/tmq/insertFixedDataV2.sim -else - run_back tsim/tmq/insertFixedDataV4.sim -endi - -#sleep 1000 - -#$rowNum = 1000 -#$tstart = 1640966400000 # 2022-01-01 00:00:00.000 -# -#$i = 0 -#while $i < $tbNum -# $tb = $tbPrefix . $i -# -# $x = 0 -# while $x < $rowNum -# $c = $x / 10 -# $c = $c * 10 -# $c = $x - $c -# -# $binary = ' . binary -# $binary = $binary . $c -# $binary = $binary . ' -# -# sql insert into $tb values ($tstart , $c , $x , $binary ) -# sql insert into ntb values ($tstart , $c , $x , $binary ) -# $tstart = $tstart + 1 -# $x = $x + 1 -# endw -# -# $i = $i + 1 -# $tstart = 1640966400000 -#endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$tbNum = 10 -$consumeDelay = 10 -$expectMsgCntFromCtb = 300 -$expectMsgCntFromStb = $expectMsgCntFromCtb * $tbNum -print consumeDelay: $consumeDelay -print insert data child num: $tbNum -print expectMsgCntFromCtb: $expectMsgCntFromCtb -print expectMsgCntFromStb: $expectMsgCntFromStb - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $rowNum -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $totalMsgCnt -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $expectConsumeMsgCnt -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -##print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -##system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -##print cmd result----> $system_content -###if $system_content != @{consume success: 10000, 0}@ then -##if $system_content != success then -## return -1 -##endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#print cmd result----> $system_content -##if $system_content != @{consume success: 10000, 0}@ then -#if $system_content != success then -# return -1 -#endi - -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim b/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim deleted file mode 100644 index fe37ffffcb..0000000000 --- a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim +++ /dev/null @@ -1,244 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=2, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=2, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene1 and scene3 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 2 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create multi topics. notes: now only support: -print =============== 1. columns from stb/ctb/ntb; 2. * from ctb/ntb; 3. function from stb/ctb/ntb -print =============== will support: * from stb - -sql create topic topic_stb_column as select ts, c1, c3 from stb -#sql create topic topic_stb_all as select * from stb -sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -sql create topic topic_ntb_column as select ts, c1, c3 from ntb -sql create topic topic_ntb_all as select * from ntb -sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== run_back insert data - -if $loop_cnt == 0 then - run_back tsim/tmq/insertFixedDataV2.sim -else - run_back tsim/tmq/insertFixedDataV4.sim -endi - -#sleep 1000 - -#$rowNum = 1000 -#$tstart = 1640966400000 # 2022-01-01 00:00:00.000 -# -#$i = 0 -#while $i < $tbNum -# $tb = $tbPrefix . $i -# -# $x = 0 -# while $x < $rowNum -# $c = $x / 10 -# $c = $c * 10 -# $c = $x - $c -# -# $binary = ' . binary -# $binary = $binary . $c -# $binary = $binary . ' -# -# sql insert into $tb values ($tstart , $c , $x , $binary ) -# sql insert into ntb values ($tstart , $c , $x , $binary ) -# $tstart = $tstart + 1 -# $x = $x + 1 -# endw -# -# $i = $i + 1 -# $tstart = 1640966400000 -#endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$tbNum = 10 -$consumeDelay = 10 -$expectMsgCntFromCtb = 300 -$expectMsgCntFromStb = $expectMsgCntFromCtb * $tbNum -print consumeDelay: $consumeDelay -print insert data child num: $tbNum -print expectMsgCntFromCtb: $expectMsgCntFromCtb -print expectMsgCntFromStb: $expectMsgCntFromStb - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $rowNum -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $totalMsgCnt -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromStb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -#print cmd result----> $system_content -##if $system_content != @{consume success: 10000, 0}@ then -#if $system_content != success then -# return -1 -#endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != success then - return -1 -endi -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim b/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim deleted file mode 100644 index 76f3c93e27..0000000000 --- a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim +++ /dev/null @@ -1,239 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=2, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=2, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene1 and scene3 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 2 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create topics from child table - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -#sql create topic topic_ntb_column as select ts, c1, c3 from ntb -#sql create topic topic_ntb_all as select * from ntb -#sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== run_back insert data - -if $loop_cnt == 0 then - run_back tsim/tmq/insertFixedDataV2.sim -else - run_back tsim/tmq/insertFixedDataV4.sim -endi - -#sleep 1000 - -#$rowNum = 1000 -#$tstart = 1640966400000 # 2022-01-01 00:00:00.000 -# -#$i = 0 -#while $i < $tbNum -# $tb = $tbPrefix . $i -# -# $x = 0 -# while $x < $rowNum -# $c = $x / 10 -# $c = $c * 10 -# $c = $x - $c -# -# $binary = ' . binary -# $binary = $binary . $c -# $binary = $binary . ' -# -# sql insert into $tb values ($tstart , $c , $x , $binary ) -# sql insert into ntb values ($tstart , $c , $x , $binary ) -# $tstart = $tstart + 1 -# $x = $x + 1 -# endw -# -# $i = $i + 1 -# $tstart = 1640966400000 -#endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$tbNum = 10 -$consumeDelay = 10 -$expectMsgCntFromCtb = 300 -$expectMsgCntFromStb = $expectMsgCntFromCtb * $tbNum -print consumeDelay: $consumeDelay -print insert data child num: $tbNum -print expectMsgCntFromCtb: $expectMsgCntFromCtb -print expectMsgCntFromStb: $expectMsgCntFromStb - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $rowNum -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $totalMsgCnt -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $expectConsumeMsgCnt -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -##print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -##system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -##print cmd result----> $system_content -###if $system_content != @{consume success: 10000, 0}@ then -##if $system_content != success then -## return -1 -##endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#print cmd result----> $system_content -##if $system_content != @{consume success: 10000, 0}@ then -#if $system_content != success then -# return -1 -#endi - -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim b/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim deleted file mode 100644 index 86e0b32980..0000000000 --- a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim +++ /dev/null @@ -1,244 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=2, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=2, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for two consumers, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene1 and scene3 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 2 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create multi topics. notes: now only support: -print =============== 1. columns from stb/ctb/ntb; 2. * from ctb/ntb; 3. function from stb/ctb/ntb -print =============== will support: * from stb - -sql create topic topic_stb_column as select ts, c1, c3 from stb -#sql create topic topic_stb_all as select * from stb -sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -sql create topic topic_ntb_column as select ts, c1, c3 from ntb -sql create topic topic_ntb_all as select * from ntb -sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== run_back insert data - -if $loop_cnt == 0 then - run_back tsim/tmq/insertFixedDataV2.sim -else - run_back tsim/tmq/insertFixedDataV4.sim -endi - -#sleep 1000 - -#$rowNum = 1000 -#$tstart = 1640966400000 # 2022-01-01 00:00:00.000 -# -#$i = 0 -#while $i < $tbNum -# $tb = $tbPrefix . $i -# -# $x = 0 -# while $x < $rowNum -# $c = $x / 10 -# $c = $c * 10 -# $c = $x - $c -# -# $binary = ' . binary -# $binary = $binary . $c -# $binary = $binary . ' -# -# sql insert into $tb values ($tstart , $c , $x , $binary ) -# sql insert into ntb values ($tstart , $c , $x , $binary ) -# $tstart = $tstart + 1 -# $x = $x + 1 -# endw -# -# $i = $i + 1 -# $tstart = 1640966400000 -#endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$tbNum = 10 -$consumeDelay = 10 -$expectMsgCntFromCtb = 300 -$expectMsgCntFromStb = $expectMsgCntFromCtb * $tbNum -print consumeDelay: $consumeDelay -print insert data child num: $tbNum -print expectMsgCntFromCtb: $expectMsgCntFromCtb -print expectMsgCntFromStb: $expectMsgCntFromStb - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $rowNum -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $totalMsgCnt -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi -# -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#print cmd result----> $system_content -#if $system_content != success then -# return -1 -#endi - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromStb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -#print cmd result----> $system_content -##if $system_content != @{consume success: 10000, 0}@ then -#if $system_content != success then -# return -1 -#endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != success then - return -1 -endi -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/mainConsumerInMultiTopic.sim b/tests/script/tsim/tmq/mainConsumerInMultiTopic.sim deleted file mode 100644 index d846632da4..0000000000 --- a/tests/script/tsim/tmq/mainConsumerInMultiTopic.sim +++ /dev/null @@ -1,217 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=1, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=1, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene2 and scene4 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 1 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create multi topics. notes: now only support: -print =============== 1. columns from stb/ctb/ntb; 2. * from ctb/ntb; 3. function from stb/ctb/ntb -print =============== will support: * from stb - -sql create topic topic_stb_column as select ts, c1, c3 from stb -#sql create topic topic_stb_all as select * from stb -sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -sql create topic topic_ntb_column as select ts, c1, c3 from ntb -sql create topic topic_ntb_all as select * from ntb -sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== run_back insert data - -if $loop_cnt == 0 then - run_back tsim/tmq/insertFixedDataV2.sim -else - run_back tsim/tmq/insertFixedDataV4.sim -endi - -#sleep 1000 - -#$rowNum = 1000 -#$tstart = 1640966400000 # 2022-01-01 00:00:00.000 -# -#$i = 0 -#while $i < $tbNum -# $tb = $tbPrefix . $i -# -# $x = 0 -# while $x < $rowNum -# $c = $x / 10 -# $c = $c * 10 -# $c = $x - $c -# -# $binary = ' . binary -# $binary = $binary . $c -# $binary = $binary . ' -# -# sql insert into $tb values ($tstart , $c , $x , $binary ) -# sql insert into ntb values ($tstart , $c , $x , $binary ) -# $tstart = $tstart + 1 -# $x = $x + 1 -# endw -# -# $i = $i + 1 -# $tstart = 1640966400000 -#endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$tbNum = 10 -$consumeDelay = 5 -$expectMsgCntFromCtb = 1000 -$expectMsgCntFromNtb = 1000 -$expectMsgCntFromStb = $expectMsgCntFromCtb * $tbNum -print consumeDelay: $consumeDelay -print insert data child num: $tbNum -print expectMsgCntFromCtb: $expectMsgCntFromCtb -print expectMsgCntFromStb: $expectMsgCntFromStb - - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -$numOfTopics = 2 -$expectMsgCntFromStb = $expectMsgCntFromStb * $numOfTopics -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromStb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -print cmd result----> $system_content -#if $system_content != @{consume success: 20000, 0}@ then -if $system_content != $expect_result then - print expect @{consume success: 20000, 0}@ , actual @system_content - return -1 -endi - -$numOfTopics = 3 -$expectMsgCntFromCtb = $expectMsgCntFromCtb * $numOfTopics -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromCtb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -print cmd result----> $system_content -#if $system_content != @{consume success: 300, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -$numOfTopics = 3 -$expectMsgCntFromNtb = $expectMsgCntFromNtb * $tbNum -$expectMsgCntFromNtb = $expectMsgCntFromNtb * $numOfTopics -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromNtb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -print cmd result----> $system_content -#if $system_content != @{consume success: 30000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/mainConsumerInOneTopic.sim b/tests/script/tsim/tmq/mainConsumerInOneTopic.sim deleted file mode 100644 index f6fccee5e5..0000000000 --- a/tests/script/tsim/tmq/mainConsumerInOneTopic.sim +++ /dev/null @@ -1,246 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=1, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=1, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene1 and scene3 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 1 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create multi topics. notes: now only support: -print =============== 1. columns from stb/ctb/ntb; 2. * from ctb/ntb; 3. function from stb/ctb/ntb -print =============== will support: * from stb - -sql create topic topic_stb_column as select ts, c1, c3 from stb -#sql create topic topic_stb_all as select * from stb -sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -sql create topic topic_ntb_column as select ts, c1, c3 from ntb -sql create topic topic_ntb_all as select * from ntb -sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== run_back insert data - -if $loop_cnt == 0 then - run_back tsim/tmq/insertFixedDataV2.sim -else - run_back tsim/tmq/insertFixedDataV4.sim -endi - -#sleep 1000 - -#$rowNum = 1000 -#$tstart = 1640966400000 # 2022-01-01 00:00:00.000 -# -#$i = 0 -#while $i < $tbNum -# $tb = $tbPrefix . $i -# -# $x = 0 -# while $x < $rowNum -# $c = $x / 10 -# $c = $c * 10 -# $c = $x - $c -# -# $binary = ' . binary -# $binary = $binary . $c -# $binary = $binary . ' -# -# sql insert into $tb values ($tstart , $c , $x , $binary ) -# sql insert into ntb values ($tstart , $c , $x , $binary ) -# $tstart = $tstart + 1 -# $x = $x + 1 -# endw -# -# $i = $i + 1 -# $tstart = 1640966400000 -#endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$tbNum = 10 -$consumeDelay = 5 -$expectMsgCntFromCtb = 1000 -$expectMsgCntFromStb = $expectMsgCntFromCtb * $tbNum -print consumeDelay: $consumeDelay -print insert data child num: $tbNum -print expectMsgCntFromCtb: $expectMsgCntFromCtb -print expectMsgCntFromStb: $expectMsgCntFromStb - - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromStb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -print cmd result----> $system_content -if $system_content != $expect_result then - return -1 -endi - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#print cmd result----> $system_content -##if $system_content != @{consume success: 10000, 0}@ then -#if $system_content != $expect_result then -# return -1 -#endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromCtb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -print cmd result----> $system_content -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -print cmd result----> $system_content -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -print cmd result----> $system_content -if $system_content != $expect_result then - return -1 -endi - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $expectMsgCntFromStb -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -print cmd result----> $system_content -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -print cmd result----> $system_content -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -print cmd result----> $system_content -if $system_content != $expect_result then - return -1 -endi - -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/multiTopic.sim b/tests/script/tsim/tmq/multiTopic.sim deleted file mode 100644 index 3795e82e86..0000000000 --- a/tests/script/tsim/tmq/multiTopic.sim +++ /dev/null @@ -1,228 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=1, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=1, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene2 and scene4 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 1 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql show databases -print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 -print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 -print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 - -if $loop_cnt == 0 then - if $rows != 3 then - return -1 - endi - if $data22 != 1 then # vgroups - print vgroups: $data02 - return -1 - endi -else - if $rows != 4 then - return -1 - endi - if $data20 == d1 then - if $data22 != 4 then # vgroups - print vgroups: $data02 - return -1 - endi - else - if $data32 != 4 then # vgroups - print vgroups: $data12 - return -1 - endi - endi -endi - -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create multi topics. notes: now only support: -print =============== 1. columns from stb/ctb/ntb; 2. * from ctb/ntb; 3. function from stb/ctb/ntb -print =============== will support: * from stb - -sql create topic topic_stb_column as select ts, c1, c3 from stb -#sql create topic topic_stb_all as select * from stb -sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -sql create topic topic_ntb_column as select ts, c1, c3 from ntb -sql create topic topic_ntb_all as select * from ntb -sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== insert data -$rowNum = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - - $x = 0 - while $x < $rowNum - $c = $x / 10 - $c = $c * 10 - $c = $x - $c - - $binary = ' . binary - $binary = $binary . $c - $binary = $binary . ' - - sql insert into $tb values ($tstart , $c , $x , $binary ) - sql insert into ntb values ($tstart , $c , $x , $binary ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - $i = $i + 1 - $tstart = 1640966400000 -endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$totalMsgCnt = $rowNum * $tbNum -print inserted totalMsgCnt: $totalMsgCnt - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -$numOfTopics = 2 -$totalMsgCntOfmultiTopics = $totalMsgCnt * $numOfTopics -$expect_result = @{consume success: @ -$expect_result = $expect_result . $totalMsgCntOfmultiTopics -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 20000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -$numOfTopics = 3 -$totalMsgCntOfmultiTopics = $rowNum * $numOfTopics -$expect_result = @{consume success: @ -$expect_result = $expect_result . $totalMsgCntOfmultiTopics -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 300, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -$numOfTopics = 3 -$totalMsgCntOfmultiTopics = $totalMsgCnt * $numOfTopics -$expect_result = @{consume success: @ -$expect_result = $expect_result . $totalMsgCntOfmultiTopics -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 30000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/oneTopic.sim b/tests/script/tsim/tmq/oneTopic.sim deleted file mode 100644 index d4353f60c9..0000000000 --- a/tests/script/tsim/tmq/oneTopic.sim +++ /dev/null @@ -1,268 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=1, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=1, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene1 and scene3 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 1 -$dbNamme = d0 -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql show databases -print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 -print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 -print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 - -if $loop_cnt == 0 then - if $rows != 3 then - return -1 - endi - if $data22 != 1 then # vgroups - print vgroups: $data02 - return -1 - endi -else - if $rows != 4 then - return -1 - endi - if $data20 == d1 then - if $data22 != 4 then # vgroups - print vgroups: $data02 - return -1 - endi - else - if $data32 != 4 then # vgroups - print vgroups: $data12 - return -1 - endi - endi -endi - -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 100 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create multi topics. notes: now only support: -print =============== 1. columns from stb/ctb/ntb; 2. * from ctb/ntb; 3. function from stb/ctb/ntb -print =============== will support: * from stb - -sql create topic topic_stb_column as select ts, c1, c3 from stb -#sql create topic topic_stb_all as select * from stb -sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -sql create topic topic_ntb_column as select ts, c1, c3 from ntb -sql create topic topic_ntb_all as select * from ntb -sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 101 then - return -1 -endi - -print =============== insert data -$rowNum = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - - $x = 0 - while $x < $rowNum - $c = $x / 10 - $c = $c * 10 - $c = $x - $c - - $binary = ' . binary - $binary = $binary . $c - $binary = $binary . ' - - sql insert into $tb values ($tstart , $c , $x , $binary ) - sql insert into ntb values ($tstart , $c , $x , $binary ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - $i = $i + 1 - $tstart = 1640966400000 -endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$totalMsgCnt = $rowNum * $tbNum -print inserted totalMsgCnt: $totalMsgCnt - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $totalMsgCnt -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -#print cmd result----> $system_content -##if $system_content != @{consume success: 10000, 0}@ then -#if $system_content != $expect_result then -# return -1 -#endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $rowNum -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 100, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 100, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 100, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -$expect_result = @{consume success: @ -$expect_result = $expect_result . $totalMsgCnt -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -print cmd result----> $system_content -#if $system_content != @{consume success: 10000, 0}@ then -if $system_content != $expect_result then - return -1 -endi - -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim b/tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim deleted file mode 100644 index 01bf91fd9f..0000000000 --- a/tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim +++ /dev/null @@ -1,255 +0,0 @@ -#### test scenario, please refer to https://jira.taosdata.com:18090/pages/viewpage.action?pageId=135120406 -# scene1: vgroups=1, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene2: vgroups=1, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene3: vgroups=4, one topic for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# scene4: vgroups=4, multi topics for one consumer, include: columns from stb/ctb/ntb, * from stb/ctb/ntb, Scalar function from stb/ctb/ntb -# notes1: Scalar function: ABS/ACOS/ASIN/ATAN/CEIL/COS/FLOOR/LOG/POW/ROUND/SIN/SQRT/TAN -# The above use cases are combined with where filter conditions, such as: where ts > "2017-08-12 18:25:58.128Z" and sin(a) > 0.5; -# -# notes2: not support aggregate functions(such as sum/count/min/max) and time-windows(interval). -# -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## -######## This test case include scene2 and scene4 -######## ######## ######## ######## ######## ######## ######## ######## ######## ######## - -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start - -$loop_cnt = 0 -check_dnode_ready: - $loop_cnt = $loop_cnt + 1 - sleep 200 - if $loop_cnt == 10 then - print ====> dnode not ready! - return -1 - endi -sql show dnodes -print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 -if $data00 != 1 then - return -1 -endi -if $data04 != ready then - goto check_dnode_ready -endi - -sql connect - -$loop_cnt = 0 -$vgroups = 1 -$dbNamme = d0 - -loop_vgroups: -print =============== create database $dbNamme vgroups $vgroups -sql create database $dbNamme vgroups $vgroups -sql show databases -print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 -print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 -print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 - -if $loop_cnt == 0 then - if $rows != 3 then - return -1 - endi - if $data22 != 1 then # vgroups - print vgroups: $data02 - return -1 - endi -else - if $rows != 4 then - return -1 - endi - if $data00 == d1 then - if $data02 != 4 then # vgroups - print vgroups: $data02 - return -1 - endi - else - if $data12 != 4 then # vgroups - print vgroups: $data12 - return -1 - endi - endi -endi - -sql use $dbNamme - -print =============== create super table -sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int) - -sql show stables -if $rows != 1 then - return -1 -endi - -print =============== create child table -$tbPrefix = ct -$tbNum = 10 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - sql create table $tb using stb tags( $i ) - $i = $i + 1 -endw - -print =============== create normal table -sql create table ntb (ts timestamp, c1 int, c2 float, c3 binary(10)) - -print =============== create multi topics. notes: now only support: -print =============== 1. columns from stb/ctb/ntb; 2. * from ctb/ntb; 3. function from stb/ctb/ntb -print =============== will support: * from stb - -sql create topic topic_stb_column as select ts, c1, c3 from stb -sql create topic topic_stb_all as select sqrt(c1) from stb -sql create topic topic_stb_function as select ts, abs(c1), sin(c2) from stb - -sql create topic topic_ctb_column as select ts, c1, c3 from ct0 -sql create topic topic_ctb_all as select * from ct0 -sql create topic topic_ctb_function as select ts, abs(c1), sin(c2) from ct0 - -sql create topic topic_ntb_column as select ts, c1, c3 from ntb -sql create topic topic_ntb_all as select * from ntb -sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb - -sql show tables -if $rows != 11 then - return -1 -endi - -print =============== insert data -$rowNum = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 - -$i = 0 -while $i < $tbNum - $tb = $tbPrefix . $i - - $x = 0 - while $x < $rowNum - $c = $x / 10 - $c = $c * 10 - $c = $x - $c - - $binary = ' . binary - $binary = $binary . $c - $binary = $binary . ' - - sql insert into $tb values ($tstart , $c , $x , $binary ) - sql insert into ntb values ($tstart , $c , $x , $binary ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - $i = $i + 1 -# $tstart = 1640966400000 -endw - -#root@trd02 /home $ tmq_sim --help -# -c Configuration directory, default is -# -d The name of the database for cosumer, no default -# -t The topic string for cosumer, no default -# -k The key-value string for cosumer, no default -# -g showMsgFlag, default is 0 -# - -$consumeDelay = 3 - -$expectMsgCntFromCtb = $rowNum -$expectMsgCntFromStb = $rowNum * $tbNum -$expectMsgCntFromNtb = $rowNum * $tbNum -print expectMsgCntFromCtb: $expectMsgCntFromCtb -print expectMsgCntFromStb: $expectMsgCntFromStb -print expectMsgCntFromNtb: $expectMsgCntFromNtb - -# supported key: -# group.id: -# enable.auto.commit: -# auto.offset.reset: -# td.connect.ip: -# td.connect.user:root -# td.connect.pass:taosdata -# td.connect.port:6030 -# td.connect.db:db - -$numOfTopics = 3 -$totalMsgCntOfmultiTopics = $expectMsgCntFromStb * $numOfTopics -$expect_result = @{consume success: @ -$expect_result = $expect_result . $totalMsgCntOfmultiTopics -$expect_result = $expect_result . @, @ -$expect_result = $expect_result . 0} -print expect_result----> $expect_result - -$check_mode = 0 -if $loop_cnt == 0 then - $check_mode = 0 -else - $check_mode = 2 -endi - -$expectMsgCntFromStb0 = 2001 -$expectMsgCntFromStb1 = 2001 - -system_content echo -n \$BUILD_DIR -$tmq_sim = $system_content . /build/bin/tmq_sim -$tsim_cfg = $system_content . /tsim/cfg - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb0 -m1 $expectMsgCntFromStb1 -j 2 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb0 -m1 $expectMsgCntFromStb1 -j 2 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg1" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 3 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg1" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 3 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -#$numOfTopics = 3 -#$totalMsgCntOfmultiTopics = $rowNum * $numOfTopics -#$expect_result = @{consume success: @ -#$expect_result = $expect_result . $totalMsgCntOfmultiTopics -#$expect_result = $expect_result . @, @ -#$expect_result = $expect_result . 0} -#print expect_result----> $expect_result -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 4 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 4 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function" -k "group.id:tg1" -t "topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 3 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function" -k "group.id:tg1" -t "topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 3 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 4 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 4 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - -print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function" -k "group.id:tg1" -t "topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 3 -system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function" -k "group.id:tg1" -t "topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 3 -print cmd result----> $system_content -if $system_content != success then - return -1 -endi - - -if $loop_cnt == 0 then - $loop_cnt = 1 - $vgroups = 4 - $dbNamme = d1 - goto loop_vgroups -endi - - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/tmq/prepareBasicEnv.sim b/tests/script/tsim/tmq/prepareBasicEnv.sim deleted file mode 100644 index c4f706e262..0000000000 --- a/tests/script/tsim/tmq/prepareBasicEnv.sim +++ /dev/null @@ -1,88 +0,0 @@ -# stop all dnodes before start this case -system sh/stop_dnodes.sh - -# deploy dnode 1 -system sh/deploy.sh -n dnode1 -i 1 - -# add some config items for this case -#system sh/cfg.sh -n dnode1 -c supportVnodes -v 0 - -# start dnode 1 -system sh/exec.sh -n dnode1 -s start - -sql connect - -#---- global parameters start ----# -$dbName = db -$vgroups = 4 -$stbPrefix = stb -$ctbPrefix = ctb -$ntbPrefix = ntb -$stbNum = 1 -$ctbNum = 10 -$ntbNum = 10 -$rowsPerCtb = 100 -$tstart = 1640966400000 # 2022-01-01 00:00:00.000 -#---- global parameters end ----# - -print == create database $dbName vgroups $vgroups -sql create database $dbName vgroups $vgroups - -#wait database ready -$loop_cnt = 0 -check_db_ready: -if $loop_cnt == 10 then - print ====> database not ready! - return -1 -endi -sql show databases -print ==> rows: $rows -print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] -print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] -if $data(db)[20] != nostrict then - sleep 100 - $loop_cnt = $loop_cnt + 1 - goto check_db_ready -endi - -sql use $dbName - -print == create consume info table and consume result table -sql create table consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int) -sql create table consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int) - -sql show tables -if $rows != 2 then - return -1 -endi - -print == create super table -sql create table $stbPrefix (ts timestamp, c1 int, c2 float, c3 binary(16)) tags (t1 int) -sql show stables -if $rows != 1 then - return -1 -endi - -print == create child table, normal table and insert data -$i = 0 -while $i < $ctbNum - $ctb = $ctbPrefix . $i - $ntb = $ntbPrefix . $i - sql create table $ctb using $stbPrefix tags( $i ) - sql create table $ntb (ts timestamp, c1 int, c2 float, c3 binary(16)) - - $x = 0 - while $x < $rowsPerCtb - $binary = ' . binary- - $binary = $binary . $i - $binary = $binary . ' - - sql insert into $ctb values ($tstart , $i , $x , $binary ) - sql insert into $ntb values ($tstart , $i , $x , $binary ) - $tstart = $tstart + 1 - $x = $x + 1 - endw - - $i = $i + 1 - $tstart = 1640966400000 -endw From aa433a13d810814a48440c1bbc2e1ffa9ce00cde Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 17:33:40 +0800 Subject: [PATCH 09/15] [test: modify test case] --- tests/script/jenkins/basic.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 3159569f32..a226e90094 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -76,7 +76,7 @@ ./test.sh -f tsim/insert/backquote.sim -m ./test.sh -f tsim/parser/fourArithmetic-basic.sim -m ./test.sh -f tsim/query/interval-offset.sim -m -./test.sh -f tsim/tmq/basic.sim -m +#./test.sh -f tsim/tmq/basic.sim -m ./test.sh -f tsim/stable/vnode3.sim -m ./test.sh -f tsim/qnode/basic1.sim -m ./test.sh -f tsim/mnode/basic1.sim -m From 20879d0ef75a7d07367e322084793ca85f2cf12a Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Fri, 22 Apr 2022 18:23:37 +0800 Subject: [PATCH 10/15] fix: some syntax parsing problems --- include/common/tglobal.h | 3 + include/common/tmsg.h | 4 +- include/common/ttokendef.h | 178 +- include/libs/nodes/cmdnodes.h | 8 + include/libs/nodes/nodes.h | 1 + include/libs/nodes/querynodes.h | 4 +- include/libs/planner/planner.h | 2 + include/util/taoserror.h | 4 + include/util/tdef.h | 1 - source/client/src/clientImpl.c | 27 +- source/common/src/tglobal.c | 5 + source/common/src/tmsg.c | 5 +- source/common/src/ttime.c | 2 +- source/dnode/mnode/impl/src/mndInfoSchema.c | 10 - source/dnode/mnode/impl/src/mndShow.c | 2 - source/libs/nodes/src/nodesCodeFuncs.c | 4 +- source/libs/nodes/src/nodesUtilFuncs.c | 2 + source/libs/parser/inc/parAst.h | 5 +- source/libs/parser/inc/sql.y | 16 +- source/libs/parser/src/parAstCreater.c | 32 +- source/libs/parser/src/parCalcConst.c | 93 +- source/libs/parser/src/parInsert.c | 2 +- source/libs/parser/src/parTokenizer.c | 2 + source/libs/parser/src/parTranslater.c | 143 +- source/libs/parser/src/parUtil.c | 22 +- source/libs/parser/src/sql.c | 4609 ++++++++++--------- source/libs/planner/inc/planInt.h | 4 + source/libs/planner/src/planLogicCreater.c | 4 +- source/libs/planner/src/planPhysiCreater.c | 10 +- 29 files changed, 2796 insertions(+), 2408 deletions(-) diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 88ce0cd970..8a8e3cd223 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -94,6 +94,9 @@ extern bool tsRetrieveBlockingModel; // retrieve threads will be blocked extern bool tsKeepOriginalColumnName; extern bool tsDeadLockKillQuery; +// query client +extern int32_t tsQueryPolicy; + // client extern int32_t tsMaxWildCardsLen; extern int32_t tsMaxRegexStringLen; diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 5ea53b5510..9a6a14ab70 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1283,15 +1283,13 @@ typedef struct { } SMVCreateStreamRsp, SMSCreateStreamRsp; typedef struct { - char name[TSDB_TOPIC_FNAME_LEN]; + char name[TSDB_TOPIC_FNAME_LEN]; // accout.topic int8_t igExists; int8_t withTbName; int8_t withSchema; int8_t withTag; - int8_t withTagSchema; char* sql; char* ast; - int64_t subDbUid; char subscribeDbName[TSDB_DB_NAME_LEN]; } SCMCreateTopicReq; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 39858cbbde..50be63dd56 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -156,87 +156,96 @@ #define TK_INTERVAL 138 #define TK_TOPIC 139 #define TK_AS 140 -#define TK_DESC 141 -#define TK_DESCRIBE 142 -#define TK_RESET 143 -#define TK_QUERY 144 -#define TK_EXPLAIN 145 -#define TK_ANALYZE 146 -#define TK_VERBOSE 147 -#define TK_NK_BOOL 148 -#define TK_RATIO 149 -#define TK_COMPACT 150 -#define TK_VNODES 151 -#define TK_IN 152 -#define TK_OUTPUTTYPE 153 -#define TK_AGGREGATE 154 -#define TK_BUFSIZE 155 -#define TK_STREAM 156 -#define TK_INTO 157 -#define TK_TRIGGER 158 -#define TK_AT_ONCE 159 -#define TK_WINDOW_CLOSE 160 -#define TK_WATERMARK 161 -#define TK_KILL 162 -#define TK_CONNECTION 163 -#define TK_MERGE 164 -#define TK_VGROUP 165 -#define TK_REDISTRIBUTE 166 -#define TK_SPLIT 167 -#define TK_SYNCDB 168 -#define TK_NULL 169 -#define TK_NK_QUESTION 170 -#define TK_NK_ARROW 171 -#define TK_ROWTS 172 -#define TK_TBNAME 173 -#define TK_QSTARTTS 174 -#define TK_QENDTS 175 -#define TK_WSTARTTS 176 -#define TK_WENDTS 177 -#define TK_WDURATION 178 -#define TK_CAST 179 -#define TK_NOW 180 -#define TK_TODAY 181 -#define TK_TIMEZONE 182 -#define TK_COUNT 183 -#define TK_FIRST 184 -#define TK_LAST 185 -#define TK_LAST_ROW 186 -#define TK_BETWEEN 187 -#define TK_IS 188 -#define TK_NK_LT 189 -#define TK_NK_GT 190 -#define TK_NK_LE 191 -#define TK_NK_GE 192 -#define TK_NK_NE 193 -#define TK_MATCH 194 -#define TK_NMATCH 195 -#define TK_CONTAINS 196 -#define TK_JOIN 197 -#define TK_INNER 198 -#define TK_SELECT 199 -#define TK_DISTINCT 200 -#define TK_WHERE 201 -#define TK_PARTITION 202 -#define TK_BY 203 -#define TK_SESSION 204 -#define TK_STATE_WINDOW 205 -#define TK_SLIDING 206 -#define TK_FILL 207 -#define TK_VALUE 208 -#define TK_NONE 209 -#define TK_PREV 210 -#define TK_LINEAR 211 -#define TK_NEXT 212 -#define TK_GROUP 213 -#define TK_HAVING 214 -#define TK_ORDER 215 -#define TK_SLIMIT 216 -#define TK_SOFFSET 217 -#define TK_LIMIT 218 -#define TK_OFFSET 219 -#define TK_ASC 220 -#define TK_NULLS 221 +#define TK_WITH 141 +#define TK_SCHEMA 142 +#define TK_DESC 143 +#define TK_DESCRIBE 144 +#define TK_RESET 145 +#define TK_QUERY 146 +#define TK_EXPLAIN 147 +#define TK_ANALYZE 148 +#define TK_VERBOSE 149 +#define TK_NK_BOOL 150 +#define TK_RATIO 151 +#define TK_COMPACT 152 +#define TK_VNODES 153 +#define TK_IN 154 +#define TK_OUTPUTTYPE 155 +#define TK_AGGREGATE 156 +#define TK_BUFSIZE 157 +#define TK_STREAM 158 +#define TK_INTO 159 +#define TK_TRIGGER 160 +#define TK_AT_ONCE 161 +#define TK_WINDOW_CLOSE 162 +#define TK_WATERMARK 163 +#define TK_KILL 164 +#define TK_CONNECTION 165 +#define TK_MERGE 166 +#define TK_VGROUP 167 +#define TK_REDISTRIBUTE 168 +#define TK_SPLIT 169 +#define TK_SYNCDB 170 +#define TK_NULL 171 +#define TK_NK_QUESTION 172 +#define TK_NK_ARROW 173 +#define TK_ROWTS 174 +#define TK_TBNAME 175 +#define TK_QSTARTTS 176 +#define TK_QENDTS 177 +#define TK_WSTARTTS 178 +#define TK_WENDTS 179 +#define TK_WDURATION 180 +#define TK_CAST 181 +#define TK_NOW 182 +#define TK_TODAY 183 +#define TK_TIMEZONE 184 +#define TK_COUNT 185 +#define TK_FIRST 186 +#define TK_LAST 187 +#define TK_LAST_ROW 188 +#define TK_BETWEEN 189 +#define TK_IS 190 +#define TK_NK_LT 191 +#define TK_NK_GT 192 +#define TK_NK_LE 193 +#define TK_NK_GE 194 +#define TK_NK_NE 195 +#define TK_MATCH 196 +#define TK_NMATCH 197 +#define TK_CONTAINS 198 +#define TK_JOIN 199 +#define TK_INNER 200 +#define TK_SELECT 201 +#define TK_DISTINCT 202 +#define TK_WHERE 203 +#define TK_PARTITION 204 +#define TK_BY 205 +#define TK_SESSION 206 +#define TK_STATE_WINDOW 207 +#define TK_SLIDING 208 +#define TK_FILL 209 +#define TK_VALUE 210 +#define TK_NONE 211 +#define TK_PREV 212 +#define TK_LINEAR 213 +#define TK_NEXT 214 +#define TK_GROUP 215 +#define TK_HAVING 216 +#define TK_ORDER 217 +#define TK_SLIMIT 218 +#define TK_SOFFSET 219 +#define TK_LIMIT 220 +#define TK_OFFSET 221 +#define TK_ASC 222 +#define TK_NULLS 223 +#define TK_ID 224 +#define TK_NK_BITNOT 225 +#define TK_INSERT 226 +#define TK_VALUES 227 +#define TK_IMPORT 228 +#define TK_NK_SEMI 229 +#define TK_FILE 230 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 @@ -244,13 +253,6 @@ #define TK_NK_HEX 303 // hex number 0x123 #define TK_NK_OCT 304 // oct number #define TK_NK_BIN 305 // bin format data 0b111 -#define TK_NK_FILE 306 - -#define TK_NK_BITNOT 501 -#define TK_INSERT 502 -#define TK_VALUES 507 -#define TK_IMPORT 509 -#define TK_NK_SEMI 508 #define TK_NK_NIL 65535 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 0394dfd9bd..44ff73c8bb 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -241,12 +241,20 @@ typedef struct SDropComponentNodeStmt { int32_t dnodeId; } SDropComponentNodeStmt; +typedef struct STopicOptions { + ENodeType type; + bool withTable; + bool withSchema; + bool withTag; +} STopicOptions; + typedef struct SCreateTopicStmt { ENodeType type; char topicName[TSDB_TABLE_NAME_LEN]; char subscribeDbName[TSDB_DB_NAME_LEN]; bool ignoreExists; SNode* pQuery; + STopicOptions* pOptions; } SCreateTopicStmt; typedef struct SDropTopicStmt { diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index a47bf4caee..6f77e8edb6 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -84,6 +84,7 @@ typedef enum ENodeType { QUERY_NODE_INDEX_OPTIONS, QUERY_NODE_EXPLAIN_OPTIONS, QUERY_NODE_STREAM_OPTIONS, + QUERY_NODE_TOPIC_OPTIONS, // Statement nodes are used in parser and planner module. QUERY_NODE_SET_OPERATOR, diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 143224d8f5..d8e2354e8e 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -237,8 +237,8 @@ typedef struct SSelectStmt { SNodeList* pGroupByList; // SGroupingSetNode SNode* pHaving; SNodeList* pOrderByList; // SOrderByExprNode - SNode* pLimit; - SNode* pSlimit; + SLimitNode* pLimit; + SLimitNode* pSlimit; char stmtName[TSDB_TABLE_NAME_LEN]; uint8_t precision; bool isEmptyResult; diff --git a/include/libs/planner/planner.h b/include/libs/planner/planner.h index 851d4d63c5..2f6b9e1866 100644 --- a/include/libs/planner/planner.h +++ b/include/libs/planner/planner.h @@ -35,6 +35,8 @@ typedef struct SPlanContext { int8_t triggerType; int64_t watermark; bool isStmtQuery; + void* pTransporter; + struct SCatalog* pCatalog; } SPlanContext; // Create the physical plan for the query, according to the AST. diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 215e83c7d4..da7c1d4408 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -615,6 +615,10 @@ int32_t* taosGetErrno(); #define TSDB_CODE_PAR_INTER_SLIDING_TOO_SMALL TAOS_DEF_ERROR_CODE(0, 0x2632) #define TSDB_CODE_PAR_ONLY_ONE_JSON_TAG TAOS_DEF_ERROR_CODE(0, 0x2633) #define TSDB_CODE_PAR_INCORRECT_NUM_OF_COL TAOS_DEF_ERROR_CODE(0, 0x2634) +#define TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL TAOS_DEF_ERROR_CODE(0, 0x2635) +#define TSDB_CODE_PAR_INVALID_DAYS_VALUE TAOS_DEF_ERROR_CODE(0, 0x2636) +#define TSDB_CODE_PAR_OFFSET_LESS_ZERO TAOS_DEF_ERROR_CODE(0, 0x2637) +#define TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY TAOS_DEF_ERROR_CODE(0, 0x2638) //planner #define TSDB_CODE_PLAN_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x2700) diff --git a/include/util/tdef.h b/include/util/tdef.h index 2548df7186..31fbe42b6c 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -118,7 +118,6 @@ extern const int32_t TYPE_BYTES[15]; #define TSDB_INS_TABLE_USER_USERS "user_users" #define TSDB_INS_TABLE_LICENCES "grants" #define TSDB_INS_TABLE_VGROUPS "vgroups" -#define TSDB_INS_TABLE_TOPICS "topics" #define TSDB_INS_TABLE_CONSUMERS "consumers" #define TSDB_INS_TABLE_SUBSCRIBES "subscribes" #define TSDB_INS_TABLE_TRANS "trans" diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 10edb38bf1..43a1f828c3 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -226,14 +226,17 @@ int32_t execDdlQuery(SRequestObj* pRequest, SQuery* pQuery) { int32_t getPlan(SRequestObj* pRequest, SQuery* pQuery, SQueryPlan** pPlan, SArray* pNodeList) { pRequest->type = pQuery->msgType; - SPlanContext cxt = {.queryId = pRequest->requestId, - .acctId = pRequest->pTscObj->acctId, - .mgmtEpSet = getEpSet_s(&pRequest->pTscObj->pAppInfo->mgmtEp), - .pAstRoot = pQuery->pRoot, - .showRewrite = pQuery->showRewrite}; - int32_t code = qCreateQueryPlan(&cxt, pPlan, pNodeList); - if (code != 0) { - return code; + SPlanContext cxt = { + .queryId = pRequest->requestId, + .acctId = pRequest->pTscObj->acctId, + .mgmtEpSet = getEpSet_s(&pRequest->pTscObj->pAppInfo->mgmtEp), + .pAstRoot = pQuery->pRoot, + .showRewrite = pQuery->showRewrite, + .pTransporter = pRequest->pTscObj->pAppInfo->pTransporter + }; + int32_t code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &cxt.pCatalog); + if (TSDB_CODE_SUCCESS == code) { + code = qCreateQueryPlan(&cxt, pPlan, pNodeList); } return code; } @@ -302,8 +305,6 @@ int32_t scheduleQuery(SRequestObj* pRequest, SQueryPlan* pDag, SArray* pNodeList } SRequestObj* launchQueryImpl(SRequestObj* pRequest, SQuery* pQuery, int32_t code, bool keepQuery) { - SArray* pNodeList = taosArrayInit(4, sizeof(struct SQueryNodeAddr)); - if (TSDB_CODE_SUCCESS == code) { switch (pQuery->execMode) { case QUERY_EXEC_MODE_LOCAL: @@ -312,12 +313,15 @@ SRequestObj* launchQueryImpl(SRequestObj* pRequest, SQuery* pQuery, int32_t code case QUERY_EXEC_MODE_RPC: code = execDdlQuery(pRequest, pQuery); break; - case QUERY_EXEC_MODE_SCHEDULE: + case QUERY_EXEC_MODE_SCHEDULE: { + SArray* pNodeList = taosArrayInit(4, sizeof(struct SQueryNodeAddr)); code = getPlan(pRequest, pQuery, &pRequest->body.pDag, pNodeList); if (TSDB_CODE_SUCCESS == code) { code = scheduleQuery(pRequest, pRequest->body.pDag, pNodeList); } + taosArrayDestroy(pNodeList); break; + } case QUERY_EXEC_MODE_EMPTY_RESULT: pRequest->type = TSDB_SQL_RETRIEVE_EMPTY_RESULT; break; @@ -326,7 +330,6 @@ SRequestObj* launchQueryImpl(SRequestObj* pRequest, SQuery* pQuery, int32_t code } } - taosArrayDestroy(pNodeList); if (!keepQuery) { qDestroyQuery(pQuery); } diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 73031c410d..b41bcd7145 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -80,6 +80,9 @@ int32_t tsTelemInterval = 86400; char tsTelemServer[TSDB_FQDN_LEN] = "telemetry.taosdata.com"; uint16_t tsTelemPort = 80; +// query +int32_t tsQueryPolicy = 1; + /* * denote if the server needs to compress response message at the application layer to client, including query rsp, * metricmeta rsp, and multi-meter query rsp message body. The client compress the submit message to server. @@ -322,6 +325,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { return -1; if (cfgAddBool(pCfg, "keepColumnName", tsKeepOriginalColumnName, 1) != 0) return -1; if (cfgAddInt32(pCfg, "maxBinaryDisplayWidth", tsMaxBinaryDisplayWidth, 1, 65536, 1) != 0) return -1; + if (cfgAddInt32(pCfg, "queryPolicy", tsQueryPolicy, 1, 3, 1) != 0) return -1; tsNumOfTaskQueueThreads = tsNumOfCores / 4; tsNumOfTaskQueueThreads = TRANGE(tsNumOfTaskQueueThreads, 1, 2); @@ -515,6 +519,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) { tsKeepOriginalColumnName = cfgGetItem(pCfg, "keepColumnName")->bval; tsMaxBinaryDisplayWidth = cfgGetItem(pCfg, "maxBinaryDisplayWidth")->i32; tsNumOfTaskQueueThreads = cfgGetItem(pCfg, "numOfTaskQueueThreads")->i32; + tsQueryPolicy = cfgGetItem(pCfg, "queryPolicy")->i32; return 0; } diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 0ea196f1a1..06a96cdf9a 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -2734,11 +2734,11 @@ int32_t tSerializeSCMCreateTopicReq(void *buf, int32_t bufLen, const SCMCreateTo if (tEncodeI8(&encoder, pReq->withTbName) < 0) return -1; if (tEncodeI8(&encoder, pReq->withSchema) < 0) return -1; if (tEncodeI8(&encoder, pReq->withTag) < 0) return -1; - if (tEncodeI8(&encoder, pReq->withTagSchema) < 0) return -1; if (tEncodeI32(&encoder, sqlLen) < 0) return -1; if (tEncodeI32(&encoder, astLen) < 0) return -1; if (sqlLen > 0 && tEncodeCStr(&encoder, pReq->sql) < 0) return -1; if (astLen > 0 && tEncodeCStr(&encoder, pReq->ast) < 0) return -1; + if (0 == astLen && tEncodeCStr(&encoder, pReq->subscribeDbName) < 0) return -1; tEndEncode(&encoder); @@ -2760,7 +2760,6 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR if (tDecodeI8(&decoder, &pReq->withTbName) < 0) return -1; if (tDecodeI8(&decoder, &pReq->withSchema) < 0) return -1; if (tDecodeI8(&decoder, &pReq->withTag) < 0) return -1; - if (tDecodeI8(&decoder, &pReq->withTagSchema) < 0) return -1; if (tDecodeI32(&decoder, &sqlLen) < 0) return -1; if (tDecodeI32(&decoder, &astLen) < 0) return -1; @@ -2774,6 +2773,8 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR pReq->ast = taosMemoryCalloc(1, astLen + 1); if (pReq->ast == NULL) return -1; if (tDecodeCStrTo(&decoder, pReq->ast) < 0) return -1; + } else { + if (tDecodeCStrTo(&decoder, pReq->subscribeDbName) < 0) return -1; } tEndDecode(&decoder); diff --git a/source/common/src/ttime.c b/source/common/src/ttime.c index 2f3677330b..491601b12d 100644 --- a/source/common/src/ttime.c +++ b/source/common/src/ttime.c @@ -412,7 +412,7 @@ int64_t convertTimeFromPrecisionToUnit(int64_t time, int32_t fromPrecision, char int32_t convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, int64_t *timeVal) { int32_t charLen = varDataLen(inputData); char *newColData; - if (type == TSDB_DATA_TYPE_BINARY) { + if (type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_VARBINARY) { newColData = taosMemoryCalloc(1, charLen + 1); memcpy(newColData, varDataVal(inputData), charLen); bool ret = taosParseTime(newColData, timeVal, charLen, (int32_t)timePrec, 0); diff --git a/source/dnode/mnode/impl/src/mndInfoSchema.c b/source/dnode/mnode/impl/src/mndInfoSchema.c index 32c667faf9..5dbbd27930 100644 --- a/source/dnode/mnode/impl/src/mndInfoSchema.c +++ b/source/dnode/mnode/impl/src/mndInfoSchema.c @@ -199,15 +199,6 @@ static const SInfosTableSchema vgroupsSchema[] = { {.name = "file_size", .bytes = 4, .type = TSDB_DATA_TYPE_INT}, }; -// TODO put into perf schema -static const SInfosTableSchema topicSchema[] = { - {.name = "topic_name", .bytes = SYSTABLE_SCH_TABLE_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR}, - {.name = "db_name", .bytes = SYSTABLE_SCH_DB_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR}, - {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP}, - {.name = "sql", .bytes = 1024 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, - {.name = "row_len", .bytes = 4, .type = TSDB_DATA_TYPE_INT}, -}; - static const SInfosTableSchema consumerSchema[] = { {.name = "client_id", .bytes = SYSTABLE_SCH_TABLE_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR}, {.name = "group_id", .bytes = SYSTABLE_SCH_TABLE_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR}, @@ -291,7 +282,6 @@ static const SInfosTableMeta infosMeta[] = { {TSDB_INS_TABLE_USER_USERS, userUsersSchema, tListLen(userUsersSchema)}, {TSDB_INS_TABLE_LICENCES, grantsSchema, tListLen(grantsSchema)}, {TSDB_INS_TABLE_VGROUPS, vgroupsSchema, tListLen(vgroupsSchema)}, - {TSDB_INS_TABLE_TOPICS, topicSchema, tListLen(topicSchema)}, {TSDB_INS_TABLE_CONSUMERS, consumerSchema, tListLen(consumerSchema)}, {TSDB_INS_TABLE_SUBSCRIBES, subscribeSchema, tListLen(subscribeSchema)}, {TSDB_INS_TABLE_TRANS, transSchema, tListLen(transSchema)}, diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index f81179201c..059da38ee5 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -84,8 +84,6 @@ static int32_t convertToRetrieveType(char* name, int32_t len) { type = TSDB_MGMT_TABLE_GRANTS; } else if (strncasecmp(name, TSDB_INS_TABLE_VGROUPS, len) == 0) { type = TSDB_MGMT_TABLE_VGROUP; - } else if (strncasecmp(name, TSDB_INS_TABLE_TOPICS, len) == 0) { - type = TSDB_MGMT_TABLE_TOPICS; } else if (strncasecmp(name, TSDB_INS_TABLE_CONSUMERS, len) == 0) { type = TSDB_MGMT_TABLE_CONSUMERS; } else if (strncasecmp(name, TSDB_INS_TABLE_SUBSCRIBES, len) == 0) { diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 7eb472dad8..676304f9a8 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -2465,10 +2465,10 @@ static int32_t jsonToSelectStmt(const SJson* pJson, void* pObj) { code = jsonToNodeList(pJson, jkSelectStmtOrderBy, &pNode->pOrderByList); } if (TSDB_CODE_SUCCESS == code) { - code = jsonToNodeObject(pJson, jkSelectStmtLimit, &pNode->pLimit); + code = jsonToNodeObject(pJson, jkSelectStmtLimit, (SNode**)&pNode->pLimit); } if (TSDB_CODE_SUCCESS == code) { - code = jsonToNodeObject(pJson, jkSelectStmtSlimit, &pNode->pSlimit); + code = jsonToNodeObject(pJson, jkSelectStmtSlimit, (SNode**)&pNode->pSlimit); } if (TSDB_CODE_SUCCESS == code) { code = tjsonGetStringValue(pJson, jkSelectStmtStmtName, pNode->stmtName); diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index bc9614b169..6415c16db5 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -86,6 +86,8 @@ SNodeptr nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SExplainOptions)); case QUERY_NODE_STREAM_OPTIONS: return makeNode(type, sizeof(SStreamOptions)); + case QUERY_NODE_TOPIC_OPTIONS: + return makeNode(type, sizeof(STopicOptions)); case QUERY_NODE_SET_OPERATOR: return makeNode(type, sizeof(SSetOperator)); case QUERY_NODE_SELECT_STMT: diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 7cb64b78e3..f4e206af9d 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -128,7 +128,7 @@ SNode* createDropDatabaseStmt(SAstCreateContext* pCxt, bool ignoreNotExists, STo SNode* createAlterDatabaseStmt(SAstCreateContext* pCxt, SToken* pDbName, SNode* pOptions); SNode* createTableOptions(SAstCreateContext* pCxt); SNode* setTableAlterOption(SAstCreateContext* pCxt, SNode* pOptions, SAlterOption* pAlterOption); -SNode* createColumnDefNode(SAstCreateContext* pCxt, const SToken* pColName, SDataType dataType, const SToken* pComment); +SNode* createColumnDefNode(SAstCreateContext* pCxt, SToken* pColName, SDataType dataType, const SToken* pComment); SDataType createDataType(uint8_t type); SDataType createVarLenDataType(uint8_t type, const SToken* pLen); SNode* createCreateTableStmt(SAstCreateContext* pCxt, bool ignoreExists, SNode* pRealTable, SNodeList* pCols, SNodeList* pTags, SNode* pOptions); @@ -157,7 +157,8 @@ SNode* createIndexOption(SAstCreateContext* pCxt, SNodeList* pFuncs, SNode* pInt SNode* createDropIndexStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pIndexName, SToken* pTableName); SNode* createCreateComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId); SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, const SToken* pDnodeId); -SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pTopicName, SNode* pQuery, const SToken* pSubscribeDbName); +SNode* createTopicOptions(SAstCreateContext* pCxt); +SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pTopicName, SNode* pQuery, const SToken* pSubscribeDbName, SNode* pOptions); SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pTopicName); SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue); SNode* createDefaultExplainOptions(SAstCreateContext* pCxt); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 9ff36c702f..b1cf5759b7 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -35,14 +35,11 @@ %left OR. %left AND. -//%right NOT. %left UNION ALL MINUS EXCEPT INTERSECT. %left NK_BITAND NK_BITOR NK_LSHIFT NK_RSHIFT. %left NK_PLUS NK_MINUS. -//%left DIVIDE TIMES. %left NK_STAR NK_SLASH NK_REM. %left NK_CONCAT. -//%right NK_BITNOT. /************************************************ create/alter account *****************************************/ cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options. { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } @@ -387,10 +384,17 @@ func_list(A) ::= func_list(B) NK_COMMA func(C). func(A) ::= function_name(B) NK_LP expression_list(C) NK_RP. { A = createFunctionNode(pCxt, &B, C); } /************************************************ create/drop topic ***************************************************/ -cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS query_expression(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, C, NULL); } -cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS db_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, &C); } +cmd ::= CREATE TOPIC not_exists_opt(A) + topic_name(B) topic_options(D) AS query_expression(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, C, NULL, D); } +cmd ::= CREATE TOPIC not_exists_opt(A) + topic_name(B) topic_options(D) AS db_name(C). { pCxt->pRootNode = createCreateTopicStmt(pCxt, A, &B, NULL, &C, D); } cmd ::= DROP TOPIC exists_opt(A) topic_name(B). { pCxt->pRootNode = createDropTopicStmt(pCxt, A, &B); } +topic_options(A) ::= . { A = createTopicOptions(pCxt); } +topic_options(A) ::= topic_options(B) WITH TABLE. { ((STopicOptions*)B)->withTable = true; A = B; } +topic_options(A) ::= topic_options(B) WITH SCHEMA. { ((STopicOptions*)B)->withSchema = true; A = B; } +topic_options(A) ::= topic_options(B) WITH TAG. { ((STopicOptions*)B)->withTag = true; A = B; } + /************************************************ desc/describe *******************************************************/ cmd ::= DESC full_table_name(A). { pCxt->pRootNode = createDescribeStmt(pCxt, A); } cmd ::= DESCRIBE full_table_name(A). { pCxt->pRootNode = createDescribeStmt(pCxt, A); } @@ -887,3 +891,5 @@ ordering_specification_opt(A) ::= DESC. null_ordering_opt(A) ::= . { A = NULL_ORDER_DEFAULT; } null_ordering_opt(A) ::= NULLS FIRST. { A = NULL_ORDER_FIRST; } null_ordering_opt(A) ::= NULLS LAST. { A = NULL_ORDER_LAST; } + +%fallback ID NK_BITNOT INSERT VALUES IMPORT NK_SEMI FILE. diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index ea4e8cae50..cbd57595bb 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -146,44 +146,42 @@ static bool checkDbName(SAstCreateContext* pCxt, SToken* pDbName, bool query) { pCxt->valid = false; } } else { + trimEscape(pDbName); if (pDbName->n >= TSDB_DB_NAME_LEN) { generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME, pDbName->z); pCxt->valid = false; } } - if (pCxt->valid) { - trimEscape(pDbName); - } return pCxt->valid; } static bool checkTableName(SAstCreateContext* pCxt, SToken* pTableName) { + trimEscape(pTableName); if (NULL != pTableName && pTableName->n >= TSDB_TABLE_NAME_LEN) { generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME, pTableName->z); pCxt->valid = false; return false; } - trimEscape(pTableName); return true; } static bool checkColumnName(SAstCreateContext* pCxt, SToken* pColumnName) { + trimEscape(pColumnName); if (NULL != pColumnName && pColumnName->n >= TSDB_COL_NAME_LEN) { generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME, pColumnName->z); pCxt->valid = false; return false; } - trimEscape(pColumnName); return true; } static bool checkIndexName(SAstCreateContext* pCxt, SToken* pIndexName) { + trimEscape(pIndexName); if (NULL != pIndexName && pIndexName->n >= TSDB_INDEX_NAME_LEN) { generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME, pIndexName->z); pCxt->valid = false; return false; } - trimEscape(pIndexName); return true; } @@ -609,14 +607,14 @@ SNode* addOrderByClause(SAstCreateContext* pCxt, SNode* pStmt, SNodeList* pOrder SNode* addSlimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pSlimit) { if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { - ((SSelectStmt*)pStmt)->pSlimit = pSlimit; + ((SSelectStmt*)pStmt)->pSlimit = (SLimitNode*)pSlimit; } return pStmt; } SNode* addLimitClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pLimit) { if (QUERY_NODE_SELECT_STMT == nodeType(pStmt)) { - ((SSelectStmt*)pStmt)->pLimit = pLimit; + ((SSelectStmt*)pStmt)->pLimit = (SLimitNode*)pLimit; } return pStmt; } @@ -771,7 +769,10 @@ SNode* setTableAlterOption(SAstCreateContext* pCxt, SNode* pOptions, SAlterOptio return pOptions; } -SNode* createColumnDefNode(SAstCreateContext* pCxt, const SToken* pColName, SDataType dataType, const SToken* pComment) { +SNode* createColumnDefNode(SAstCreateContext* pCxt, SToken* pColName, SDataType dataType, const SToken* pComment) { + if (!checkColumnName(pCxt, pColName)) { + return NULL; + } SColumnDefNode* pCol = (SColumnDefNode*)nodesMakeNode(QUERY_NODE_COLUMN_DEF); CHECK_OUT_OF_MEM(pCol); strncpy(pCol->colName, pColName->z, pColName->n); @@ -1101,7 +1102,17 @@ SNode* createDropComponentNodeStmt(SAstCreateContext* pCxt, ENodeType type, cons return (SNode*)pStmt; } -SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const SToken* pTopicName, SNode* pQuery, const SToken* pSubscribeDbName) { +SNode* createTopicOptions(SAstCreateContext* pCxt) { + STopicOptions* pOptions = nodesMakeNode(QUERY_NODE_TOPIC_OPTIONS); + CHECK_OUT_OF_MEM(pOptions); + pOptions->withTable = false; + pOptions->withSchema = false; + pOptions->withTag = false; + return (SNode*)pOptions; +} + +SNode* createCreateTopicStmt(SAstCreateContext* pCxt, + bool ignoreExists, const SToken* pTopicName, SNode* pQuery, const SToken* pSubscribeDbName, SNode* pOptions) { SCreateTopicStmt* pStmt = nodesMakeNode(QUERY_NODE_CREATE_TOPIC_STMT); CHECK_OUT_OF_MEM(pStmt); strncpy(pStmt->topicName, pTopicName->z, pTopicName->n); @@ -1110,6 +1121,7 @@ SNode* createCreateTopicStmt(SAstCreateContext* pCxt, bool ignoreExists, const S if (NULL != pSubscribeDbName) { strncpy(pStmt->subscribeDbName, pSubscribeDbName->z, pSubscribeDbName->n); } + pStmt->pOptions = (STopicOptions*)pOptions; return (SNode*)pStmt; } diff --git a/source/libs/parser/src/parCalcConst.c b/source/libs/parser/src/parCalcConst.c index ead3ec90ad..ef1f9ada01 100644 --- a/source/libs/parser/src/parCalcConst.c +++ b/source/libs/parser/src/parCalcConst.c @@ -16,12 +16,15 @@ #include "functionMgt.h" #include "parInt.h" #include "scalar.h" +#include "ttime.h" typedef struct SCalcConstContext { + SParseContext* pParseCxt; + SMsgBuf msgBuf; int32_t code; } SCalcConstContext; -static int32_t calcConstQuery(SNode* pStmt); +static int32_t calcConstQuery(SCalcConstContext* pCxt, SNode* pStmt); static EDealRes doCalcConst(SNode** pNode, SCalcConstContext* pCxt) { SNode* pNew = NULL; @@ -35,10 +38,45 @@ static EDealRes doCalcConst(SNode** pNode, SCalcConstContext* pCxt) { return DEAL_RES_CONTINUE; } +static bool isTimestampCol(SNode* pNode) { + if (NULL == pNode) { + return false; + } + return (QUERY_NODE_COLUMN == nodeType(pNode) && TSDB_DATA_TYPE_TIMESTAMP == ((SExprNode*)pNode)->resType.type); +} + +static EDealRes stringToTimestamp(SCalcConstContext* pCxt, uint8_t precision, SValueNode* pVal) { + switch (pVal->node.resType.type) { + case TSDB_DATA_TYPE_VARCHAR: + case TSDB_DATA_TYPE_NCHAR: + case TSDB_DATA_TYPE_VARBINARY: { + int64_t val = 0; + if (TSDB_CODE_SUCCESS != convertStringToTimestamp(pVal->node.resType.type, pVal->datum.p, precision, &val)) { + pCxt->code = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL, varDataVal(pVal->datum.p)); + return DEAL_RES_ERROR; + } + pVal->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; + pVal->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes; + taosMemoryFreeClear(pVal->datum.p); + pVal->datum.i = val; + break; + } + default: + break; + } + return DEAL_RES_CONTINUE; +} + static EDealRes calcConstOperator(SOperatorNode** pNode, void* pContext) { + SCalcConstContext* pCxt = pContext; SOperatorNode* pOp = *pNode; if (QUERY_NODE_VALUE == nodeType(pOp->pLeft) && (NULL == pOp->pRight || QUERY_NODE_VALUE == nodeType(pOp->pRight))) { - return doCalcConst((SNode**)pNode, (SCalcConstContext*)pContext); + return doCalcConst((SNode**)pNode, pCxt); + } + if (isTimestampCol(pOp->pLeft) && (NULL == pOp->pRight || QUERY_NODE_VALUE == nodeType(pOp->pRight))) { + return stringToTimestamp(pCxt, ((SColumnNode*)pOp->pLeft)->node.resType.precision, (SValueNode*)pOp->pRight); + } else if (isTimestampCol(pOp->pRight) && QUERY_NODE_VALUE == nodeType(pOp->pLeft)) { + return stringToTimestamp(pCxt, ((SColumnNode*)pOp->pRight)->node.resType.precision, (SValueNode*)pOp->pLeft); } return DEAL_RES_CONTINUE; } @@ -71,7 +109,7 @@ static EDealRes calcConstLogicCond(SLogicConditionNode** pNode, void* pContext) static EDealRes calcConstSubquery(STempTableNode** pNode, void* pContext) { SCalcConstContext* pCxt = pContext; - pCxt->code = calcConstQuery((*pNode)->pSubquery); + pCxt->code = calcConstQuery(pCxt, (*pNode)->pSubquery); return (TSDB_CODE_SUCCESS == pCxt->code ? DEAL_RES_CONTINUE : DEAL_RES_ERROR); } @@ -185,39 +223,38 @@ static int32_t calcConstCondition(SCalcConstContext* pCxt, SSelectStmt* pSelect, return pCxt->code; } -static int32_t calcConstSelect(SSelectStmt* pSelect) { - SCalcConstContext cxt = { .code = TSDB_CODE_SUCCESS }; - nodesRewriteExprsPostOrder(pSelect->pProjectionList, calcConst, &cxt); - if (TSDB_CODE_SUCCESS == cxt.code) { - cxt.code = calcConstFromTable(&cxt, pSelect); +static int32_t calcConstSelect(SCalcConstContext* pCxt, SSelectStmt* pSelect) { + nodesRewriteExprsPostOrder(pSelect->pProjectionList, calcConst, pCxt); + if (TSDB_CODE_SUCCESS == pCxt->code) { + pCxt->code = calcConstFromTable(pCxt, pSelect); } - if (TSDB_CODE_SUCCESS == cxt.code) { - cxt.code = calcConstCondition(&cxt, pSelect, &pSelect->pWhere); + if (TSDB_CODE_SUCCESS == pCxt->code) { + pCxt->code = calcConstCondition(pCxt, pSelect, &pSelect->pWhere); } - if (TSDB_CODE_SUCCESS == cxt.code) { - nodesRewriteExprsPostOrder(pSelect->pPartitionByList, calcConst, &cxt); + if (TSDB_CODE_SUCCESS == pCxt->code) { + nodesRewriteExprsPostOrder(pSelect->pPartitionByList, calcConst, pCxt); } - if (TSDB_CODE_SUCCESS == cxt.code) { - nodesRewriteExprPostOrder(&pSelect->pWindow, calcConst, &cxt); + if (TSDB_CODE_SUCCESS == pCxt->code) { + nodesRewriteExprPostOrder(&pSelect->pWindow, calcConst, pCxt); } - if (TSDB_CODE_SUCCESS == cxt.code) { - nodesRewriteExprsPostOrder(pSelect->pGroupByList, calcConst, &cxt); + if (TSDB_CODE_SUCCESS == pCxt->code) { + nodesRewriteExprsPostOrder(pSelect->pGroupByList, calcConst, pCxt); } - if (TSDB_CODE_SUCCESS == cxt.code) { - cxt.code = calcConstCondition(&cxt, pSelect, &pSelect->pHaving); + if (TSDB_CODE_SUCCESS == pCxt->code) { + pCxt->code = calcConstCondition(pCxt, pSelect, &pSelect->pHaving); } - if (TSDB_CODE_SUCCESS == cxt.code) { - nodesRewriteExprsPostOrder(pSelect->pOrderByList, calcConst, &cxt); + if (TSDB_CODE_SUCCESS == pCxt->code) { + nodesRewriteExprsPostOrder(pSelect->pOrderByList, calcConst, pCxt); } - return cxt.code; + return pCxt->code; } -static int32_t calcConstQuery(SNode* pStmt) { +static int32_t calcConstQuery(SCalcConstContext* pCxt, SNode* pStmt) { switch (nodeType(pStmt)) { case QUERY_NODE_SELECT_STMT: - return calcConstSelect((SSelectStmt*)pStmt); + return calcConstSelect(pCxt, (SSelectStmt*)pStmt); case QUERY_NODE_EXPLAIN_STMT: - return calcConstQuery(((SExplainStmt*)pStmt)->pQuery); + return calcConstQuery(pCxt, ((SExplainStmt*)pStmt)->pQuery); default: break; } @@ -237,7 +274,13 @@ static bool isEmptyResultQuery(SNode* pStmt) { } int32_t calculateConstant(SParseContext* pParseCxt, SQuery* pQuery) { - int32_t code = calcConstQuery(pQuery->pRoot); + SCalcConstContext cxt = { + .pParseCxt = pParseCxt, + .msgBuf.buf = pParseCxt->pMsg, + .msgBuf.len = pParseCxt->msgLen, + .code = TSDB_CODE_SUCCESS + }; + int32_t code = calcConstQuery(&cxt, pQuery->pRoot); if (TSDB_CODE_SUCCESS == code) { pQuery->execMode = isEmptyResultQuery(pQuery->pRoot) ? QUERY_EXEC_MODE_EMPTY_RESULT : pQuery->execMode; } diff --git a/source/libs/parser/src/parInsert.c b/source/libs/parser/src/parInsert.c index f21a738032..eb6c068493 100644 --- a/source/libs/parser/src/parInsert.c +++ b/source/libs/parser/src/parInsert.c @@ -1115,7 +1115,7 @@ static int32_t parseInsertBody(SInsertParseContext* pCxt) { } // FILE csv_file_path - if (TK_NK_FILE == sToken.type) { + if (TK_FILE == sToken.type) { // pSql -> csv_file_path NEXT_TOKEN(pCxt->pSql, sToken); if (0 == sToken.n || (TK_NK_STRING != sToken.type && TK_NK_ID != sToken.type)) { diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 666cdbb6db..fe7835d355 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -148,6 +148,7 @@ static SKeyword keywordTable[] = { {"RESET", TK_RESET}, {"RETENTIONS", TK_RETENTIONS}, {"ROLLUP", TK_ROLLUP}, + {"SCHEMA", TK_SCHEMA}, {"SCORES", TK_SCORES}, {"SELECT", TK_SELECT}, {"SESSION", TK_SESSION}, @@ -202,6 +203,7 @@ static SKeyword keywordTable[] = { {"WATERMARK", TK_WATERMARK}, {"WHERE", TK_WHERE}, {"WINDOW_CLOSE", TK_WINDOW_CLOSE}, + {"WITH", TK_WITH}, {"_QENDTS", TK_QENDTS}, {"_QSTARTTS", TK_QSTARTTS}, {"_ROWTS", TK_ROWTS}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 8506cfc33d..982703e5cb 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -117,10 +117,8 @@ static int32_t getTableMetaImpl(STranslateContext* pCxt, const SName* pName, STa } static int32_t getTableMeta(STranslateContext* pCxt, const char* pDbName, const char* pTableName, STableMeta** pMeta) { - SName name = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(name.dbname, pDbName); - strcpy(name.tname, pTableName); - return getTableMetaImpl(pCxt, &name, pMeta); + SName name; + return getTableMetaImpl(pCxt, toName(pCxt->pParseCxt->acctId, pDbName, pTableName, &name), pMeta); } static int32_t getTableDistVgInfo(STranslateContext* pCxt, const SName* pName, SArray** pVgInfo) { @@ -179,10 +177,8 @@ static int32_t getTableHashVgroupImpl(STranslateContext* pCxt, const SName* pNam static int32_t getTableHashVgroup(STranslateContext* pCxt, const char* pDbName, const char* pTableName, SVgroupInfo* pInfo) { - SName name = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(name.dbname, pDbName); - strcpy(name.tname, pTableName); - return getTableHashVgroupImpl(pCxt, &name, pInfo); + SName name; + return getTableHashVgroupImpl(pCxt, toName(pCxt->pParseCxt->acctId, pDbName, pTableName, &name), pInfo); } static int32_t getDBVgVersion(STranslateContext* pCxt, const char* pDbFName, int32_t* pVersion, int64_t* pDbId, @@ -564,6 +560,9 @@ static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) { TSDB_DATA_TYPE_BLOB == rdt.type) { return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, ((SExprNode*)(pOp->pRight))->aliasName); } + if (OP_TYPE_IN == pOp->opType || OP_TYPE_NOT_IN == pOp->opType) { + ((SExprNode*)pOp->pRight)->resType = ((SExprNode*)pOp->pLeft)->resType; + } pOp->node.resType.type = TSDB_DATA_TYPE_BOOL; pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes; } else if (nodesIsJsonOp(pOp)){ @@ -933,7 +932,7 @@ static int32_t findTable(STranslateContext* pCxt, const char* pTableAlias, STabl return TSDB_CODE_SUCCESS; } } - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_TABLE_NOT_EXIST, pTableAlias); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_TABLE_NOT_EXIST, pTableAlias); } static int32_t createTableAllCols(STranslateContext* pCxt, SColumnNode* pCol, SNodeList** pOutput) { @@ -1341,6 +1340,18 @@ static int32_t translateFrom(STranslateContext* pCxt, SSelectStmt* pSelect) { return code; } +static int32_t checkLimit(STranslateContext* pCxt, SSelectStmt* pSelect) { + if ((NULL != pSelect->pLimit && pSelect->pLimit->offset < 0) || (NULL != pSelect->pSlimit && pSelect->pSlimit->offset < 0)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_OFFSET_LESS_ZERO); + } + + if (NULL != pSelect->pSlimit && NULL == pSelect->pPartitionByList) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY); + } + + return TSDB_CODE_SUCCESS; +} + static int32_t translateSelect(STranslateContext* pCxt, SSelectStmt* pSelect) { pCxt->pCurrStmt = pSelect; int32_t code = translateFrom(pCxt, pSelect); @@ -1368,6 +1379,9 @@ static int32_t translateSelect(STranslateContext* pCxt, SSelectStmt* pSelect) { if (TSDB_CODE_SUCCESS == code) { code = checkAggColCoexist(pCxt, pSelect); } + if (TSDB_CODE_SUCCESS == code) { + code = checkLimit(pCxt, pSelect); + } return code; } @@ -1532,11 +1546,11 @@ static int32_t checkRangeOption(STranslateContext* pCxt, const char* pName, SVal } if (pVal->isDuration && (TIME_UNIT_MINUTE != pVal->unit && TIME_UNIT_HOUR != pVal->unit && TIME_UNIT_DAY != pVal->unit)) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_OPTION_UNIT, pName, pVal->unit); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_OPTION_UNIT, pName, pVal->unit); } int64_t val = getBigintFromValueNode(pVal); if (val < minVal || val > maxVal) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_RANGE_OPTION, pName, val, minVal, maxVal); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_RANGE_OPTION, pName, val, minVal, maxVal); } } return TSDB_CODE_SUCCESS; @@ -1562,7 +1576,7 @@ static int32_t checkDbPrecisionOption(STranslateContext* pCxt, SValueNode* pVal) } else if (0 == strcmp(pRrecision, TSDB_TIME_PRECISION_NANO_STR)) { convertValueFromStrToInt(pVal, TSDB_TIME_PRECISION_NANO); } else { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_STR_OPTION, "precision", pVal->datum.p); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STR_OPTION, "precision", pVal->datum.p); } } return TSDB_CODE_SUCCESS; @@ -1575,7 +1589,7 @@ static int32_t checkDbEnumOption(STranslateContext* pCxt, const char* pName, SVa } int64_t val = pVal->datum.i; if (val != v1 && val != v2) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_ENUM_OPTION, pName, val, v1, v2); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_ENUM_OPTION, pName, val, v1, v2); } } return TSDB_CODE_SUCCESS; @@ -1588,7 +1602,7 @@ static int32_t checkTtlOption(STranslateContext* pCxt, SValueNode* pVal) { } int64_t val = pVal->datum.i; if (val < TSDB_MIN_DB_TTL) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_TTL_OPTION, val, TSDB_MIN_DB_TTL); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TTL_OPTION, val, TSDB_MIN_DB_TTL); } } return TSDB_CODE_SUCCESS; @@ -1601,7 +1615,7 @@ static int32_t checkKeepOption(STranslateContext* pCxt, SNodeList* pKeep) { int32_t numOfKeep = LIST_LENGTH(pKeep); if (numOfKeep > 3 || numOfKeep < 1) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_KEEP_NUM); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_KEEP_NUM); } SNode* pNode = NULL; @@ -1632,7 +1646,7 @@ static int32_t checkKeepOption(STranslateContext* pCxt, SNodeList* pKeep) { (TIME_UNIT_MINUTE != pKeep1->unit && TIME_UNIT_HOUR != pKeep1->unit && TIME_UNIT_DAY != pKeep1->unit)) || (pKeep2->isDuration && (TIME_UNIT_MINUTE != pKeep2->unit && TIME_UNIT_HOUR != pKeep2->unit && TIME_UNIT_DAY != pKeep2->unit))) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_KEEP_UNIT, pKeep0->unit, pKeep1->unit, pKeep2->unit); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_KEEP_UNIT, pKeep0->unit, pKeep1->unit, pKeep2->unit); } int32_t daysToKeep0 = getBigintFromValueNode(pKeep0); @@ -1640,12 +1654,12 @@ static int32_t checkKeepOption(STranslateContext* pCxt, SNodeList* pKeep) { int32_t daysToKeep2 = getBigintFromValueNode(pKeep2); if (daysToKeep0 < TSDB_MIN_KEEP || daysToKeep1 < TSDB_MIN_KEEP || daysToKeep2 < TSDB_MIN_KEEP || daysToKeep0 > TSDB_MAX_KEEP || daysToKeep1 > TSDB_MAX_KEEP || daysToKeep2 > TSDB_MAX_KEEP) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_KEEP_VALUE, daysToKeep0, daysToKeep1, daysToKeep2, + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_KEEP_VALUE, daysToKeep0, daysToKeep1, daysToKeep2, TSDB_MIN_KEEP, TSDB_MAX_KEEP); } if (!((daysToKeep0 <= daysToKeep1) && (daysToKeep1 <= daysToKeep2))) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_KEEP_ORDER); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_KEEP_ORDER); } return TSDB_CODE_SUCCESS; @@ -1657,7 +1671,7 @@ static int32_t checkDbRetentionsOption(STranslateContext* pCxt, SNodeList* pRete } if (LIST_LENGTH(pRetentions) > 3) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_RETENTIONS_OPTION); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_RETENTIONS_OPTION); } SNode* pNode = NULL; @@ -1673,7 +1687,28 @@ static int32_t checkDbRetentionsOption(STranslateContext* pCxt, SNodeList* pRete return TSDB_CODE_SUCCESS; } -static int32_t checkDatabaseOptions(STranslateContext* pCxt, SDatabaseOptions* pOptions) { +static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions, bool alter) { + if (NULL == pOptions->pDaysPerFile && NULL == pOptions->pKeep) { + return TSDB_CODE_SUCCESS; + } + int64_t daysPerFile = GET_OPTION_VAL(pOptions->pDaysPerFile, alter ? -1 : TSDB_DEFAULT_DAYS_PER_FILE); + int64_t daysToKeep0 = GET_OPTION_VAL(nodesListGetNode(pOptions->pKeep, 0), alter ? -1 : TSDB_DEFAULT_KEEP); + if (alter && (-1 == daysPerFile || -1 == daysToKeep0)) { + SDbCfgInfo dbCfg; + int32_t code = getDBCfg(pCxt, pDbName, &dbCfg); + if (TSDB_CODE_SUCCESS != code) { + return code; + } + daysPerFile = (-1 == daysPerFile ? dbCfg.daysPerFile : daysPerFile); + daysToKeep0 = (-1 == daysPerFile ? dbCfg.daysToKeep0 : daysToKeep0); + } + if (daysPerFile > daysToKeep0) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DAYS_VALUE); + } + return TSDB_CODE_SUCCESS; +} + +static int32_t checkDatabaseOptions(STranslateContext* pCxt, const char* pDbName, SDatabaseOptions* pOptions, bool alter) { int32_t code = checkRangeOption(pCxt, "totalBlocks", pOptions->pNumOfBlocks, TSDB_MIN_TOTAL_BLOCKS, TSDB_MAX_TOTAL_BLOCKS); if (TSDB_CODE_SUCCESS == code) { @@ -1734,11 +1769,14 @@ static int32_t checkDatabaseOptions(STranslateContext* pCxt, SDatabaseOptions* p if (TSDB_CODE_SUCCESS == code) { code = checkDbEnumOption(pCxt, "strict", pOptions->pStrict, TSDB_DB_STRICT_OFF, TSDB_DB_STRICT_ON); } + if (TSDB_CODE_SUCCESS == code) { + code = checkOptionsDependency(pCxt, pDbName, pOptions, alter); + } return code; } static int32_t checkCreateDatabase(STranslateContext* pCxt, SCreateDatabaseStmt* pStmt) { - return checkDatabaseOptions(pCxt, pStmt->pOptions); + return checkDatabaseOptions(pCxt, pStmt->dbName, pStmt->pOptions, false); } typedef int32_t (*FSerializeFunc)(void* pBuf, int32_t bufLen, void* pReq); @@ -1802,7 +1840,7 @@ static void buildAlterDbReq(STranslateContext* pCxt, SAlterDatabaseStmt* pStmt, } static int32_t translateAlterDatabase(STranslateContext* pCxt, SAlterDatabaseStmt* pStmt) { - int32_t code = checkDatabaseOptions(pCxt, pStmt->pOptions); + int32_t code = checkDatabaseOptions(pCxt, pStmt->dbName, pStmt->pOptions, true); if (TSDB_CODE_SUCCESS != code) { return code; } @@ -1863,7 +1901,7 @@ static int32_t checkTableCommentOption(STranslateContext* pCxt, SValueNode* pVal return pCxt->errCode; } if (pVal->node.resType.bytes >= TSDB_STB_COMMENT_LEN) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_COMMENT_OPTION, TSDB_STB_COMMENT_LEN - 1); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_COMMENT_OPTION, TSDB_STB_COMMENT_LEN - 1); } } return TSDB_CODE_SUCCESS; @@ -1875,7 +1913,7 @@ static int32_t checTableFactorOption(STranslateContext* pCxt, SValueNode* pVal) return pCxt->errCode; } if (pVal->datum.d < TSDB_MIN_DB_FILE_FACTOR || pVal->datum.d > TSDB_MAX_DB_FILE_FACTOR) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_F_RANGE_OPTION, "file_factor", pVal->datum.d, + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_F_RANGE_OPTION, "file_factor", pVal->datum.d, TSDB_MIN_DB_FILE_FACTOR, TSDB_MAX_DB_FILE_FACTOR); } } @@ -1916,12 +1954,12 @@ static int32_t checkTableRollupOption(STranslateContext* pCxt, SNodeList* pFuncs } if (1 != LIST_LENGTH(pFuncs)) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_ROLLUP_OPTION); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_ROLLUP_OPTION); } SFunctionNode* pFunc = nodesListGetNode(pFuncs, 0); SFmGetFuncInfoParam param = { .pCtg = pCxt->pParseCxt->pCatalog, .pRpc = pCxt->pParseCxt->pTransporter, .pMgmtEps = &pCxt->pParseCxt->mgmtEpSet}; if (TSDB_CODE_SUCCESS != fmGetFuncInfo(¶m, pFunc->functionName, &pFunc->funcId, &pFunc->funcType)) { - return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_FUNTION, pFunc->functionName); + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_FUNTION, pFunc->functionName); } return TSDB_CODE_SUCCESS; } @@ -2195,10 +2233,8 @@ static int32_t buildCreateStbReq(STranslateContext* pCxt, SCreateTableStmt* pStm pReq->numOfSmas = LIST_LENGTH(pStmt->pOptions->pSma); } - SName tableName = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(tableName.dbname, pStmt->dbName); - strcpy(tableName.tname, pStmt->tableName); - tNameExtractFullName(&tableName, pReq->name); + SName tableName; + tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, &tableName), pReq->name); return buildRollupAst(pCxt, pStmt, pReq); } @@ -2248,10 +2284,8 @@ static int32_t translateDropTable(STranslateContext* pCxt, SDropTableStmt* pStmt } static int32_t translateDropSuperTable(STranslateContext* pCxt, SDropSuperTableStmt* pStmt) { - SName tableName = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(tableName.dbname, pStmt->dbName); - strcpy(tableName.tname, pStmt->tableName); - return doTranslateDropSuperTable(pCxt, &tableName, pStmt->ignoreNotExists); + SName tableName; + return doTranslateDropSuperTable(pCxt, toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, &tableName), pStmt->ignoreNotExists); } static int32_t setAlterTableField(SAlterTableStmt* pStmt, SMAltertbReq* pAlterReq) { @@ -2291,10 +2325,8 @@ static int32_t setAlterTableField(SAlterTableStmt* pStmt, SMAltertbReq* pAlterRe static int32_t translateAlterTable(STranslateContext* pCxt, SAlterTableStmt* pStmt) { SMAltertbReq alterReq = {0}; - SName tableName = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(tableName.dbname, pStmt->dbName); - strcpy(tableName.tname, pStmt->tableName); - tNameExtractFullName(&tableName, alterReq.name); + SName tableName; + tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, &tableName), alterReq.name); alterReq.alterType = pStmt->alterType; alterReq.numOfFields = 1; if (TSDB_ALTER_TABLE_UPDATE_OPTIONS == pStmt->alterType) { @@ -2384,8 +2416,6 @@ static int32_t nodeTypeToShowType(ENodeType nt) { return TSDB_MGMT_TABLE_GRANTS; case QUERY_NODE_SHOW_QUERIES_STMT: return TSDB_MGMT_TABLE_QUERIES; - case QUERY_NODE_SHOW_TOPICS_STMT: - return 0; // todo case QUERY_NODE_SHOW_VARIABLE_STMT: return 0; // todo default: @@ -2447,10 +2477,8 @@ static int32_t getSmaIndexAst(STranslateContext* pCxt, SCreateIndexStmt* pStmt, } static int32_t buildCreateSmaReq(STranslateContext* pCxt, SCreateIndexStmt* pStmt, SMCreateSmaReq* pReq) { - SName name = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(name.dbname, pCxt->pParseCxt->db); - strcpy(name.tname, pStmt->indexName); - tNameExtractFullName(&name, pReq->name); + SName name; + tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pCxt->pParseCxt->db, pStmt->indexName, &name), pReq->name); strcpy(name.tname, pStmt->tableName); name.tname[strlen(pStmt->tableName)] = '\0'; tNameExtractFullName(&name, pReq->stb); @@ -2605,11 +2633,14 @@ static int32_t translateCreateTopic(STranslateContext* pCxt, SCreateTopicStmt* p return TSDB_CODE_OUT_OF_MEMORY; } - SName name = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(name.dbname, pCxt->pParseCxt->db); - strcpy(name.tname, pStmt->topicName); - tNameExtractFullName(&name, createReq.name); + SName name; + // tNameSetDbName(&name, pCxt->pParseCxt->acctId, pCxt->pParseCxt->db, strlen(pCxt->pParseCxt->db)); + // tNameGetFullDbName(&name, createReq.name); + tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pCxt->pParseCxt->db, pStmt->topicName, &name), createReq.name); createReq.igExists = pStmt->ignoreExists; + createReq.withTbName = pStmt->pOptions->withTable; + createReq.withSchema = pStmt->pOptions->withSchema; + createReq.withTag = pStmt->pOptions->withTag; int32_t code = buildCmdMsg(pCxt, TDMT_MND_CREATE_TOPIC, (FSerializeFunc)tSerializeSCMCreateTopicReq, &createReq); tFreeSCMCreateTopicReq(&createReq); @@ -2619,10 +2650,8 @@ static int32_t translateCreateTopic(STranslateContext* pCxt, SCreateTopicStmt* p static int32_t translateDropTopic(STranslateContext* pCxt, SDropTopicStmt* pStmt) { SMDropTopicReq dropReq = {0}; - SName name = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(name.dbname, pCxt->pParseCxt->db); - strcpy(name.tname, pStmt->topicName); - tNameExtractFullName(&name, dropReq.name); + SName name; + tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pCxt->pParseCxt->db, pStmt->topicName, &name), dropReq.name); dropReq.igNotExists = pStmt->ignoreNotExists; return buildCmdMsg(pCxt, TDMT_MND_DROP_TOPIC, (FSerializeFunc)tSerializeSMDropTopicReq, &dropReq); @@ -2661,10 +2690,8 @@ static int32_t translateCreateStream(STranslateContext* pCxt, SCreateStreamStmt* createReq.igExists = pStmt->ignoreExists; - SName name = {.type = TSDB_TABLE_NAME_T, .acctId = pCxt->pParseCxt->acctId}; - strcpy(name.dbname, pCxt->pParseCxt->db); - strcpy(name.tname, pStmt->streamName); - tNameExtractFullName(&name, createReq.name); + SName name; + tNameExtractFullName(toName(pCxt->pParseCxt->acctId, pCxt->pParseCxt->db, pStmt->streamName, &name), createReq.name); if ('\0' != pStmt->targetTabName[0]) { strcpy(name.dbname, pStmt->targetDbName); @@ -2979,6 +3006,7 @@ static const char* getSysDbName(ENodeType type) { return TSDB_INFORMATION_SCHEMA_DB; case QUERY_NODE_SHOW_CONNECTIONS_STMT: case QUERY_NODE_SHOW_QUERIES_STMT: + case QUERY_NODE_SHOW_TOPICS_STMT: return TSDB_PERFORMANCE_SCHEMA_DB; default: break; @@ -3024,6 +3052,8 @@ static const char* getSysTableName(ENodeType type) { return TSDB_PERFS_TABLE_CONNECTIONS; case QUERY_NODE_SHOW_QUERIES_STMT: return TSDB_PERFS_TABLE_QUERIES; + case QUERY_NODE_SHOW_TOPICS_STMT: + return TSDB_PERFS_TABLE_TOPICS; default: break; } @@ -3545,6 +3575,7 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_CONNECTIONS_STMT: case QUERY_NODE_SHOW_QUERIES_STMT: case QUERY_NODE_SHOW_CLUSTER_STMT: + case QUERY_NODE_SHOW_TOPICS_STMT: code = rewriteShow(pCxt, pQuery); break; case QUERY_NODE_CREATE_TABLE_STMT: diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index 075caa868c..7e41bbe3fd 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -23,15 +23,15 @@ static char* getSyntaxErrFormat(int32_t errCode) { case TSDB_CODE_PAR_INCOMPLETE_SQL: return "Incomplete SQL statement"; case TSDB_CODE_PAR_INVALID_COLUMN: - return "Invalid column name : %s"; + return "Invalid column name: %s"; case TSDB_CODE_PAR_TABLE_NOT_EXIST: - return "Table does not exist : %s"; + return "Table does not exist: %s"; case TSDB_CODE_PAR_AMBIGUOUS_COLUMN: - return "Column ambiguously defined : %s"; + return "Column ambiguously defined: %s"; case TSDB_CODE_PAR_WRONG_VALUE_TYPE: - return "Invalid value type : %s"; + return "Invalid value type: %s"; case TSDB_CODE_PAR_INVALID_FUNTION: - return "Invalid function name : %s"; + return "Invalid function name: %s"; case TSDB_CODE_PAR_ILLEGAL_USE_AGG_FUNCTION: return "There mustn't be aggregation"; case TSDB_CODE_PAR_WRONG_NUMBER_OF_SELECT: @@ -45,7 +45,7 @@ static char* getSyntaxErrFormat(int32_t errCode) { case TSDB_CODE_PAR_TAGS_NOT_MATCHED: return "Tags number not matched"; case TSDB_CODE_PAR_INVALID_TAG_NAME: - return "Invalid tag name : %s"; + return "Invalid tag name: %s"; case TSDB_CODE_PAR_NAME_OR_PASSWD_TOO_LONG: return "Name or password too long"; case TSDB_CODE_PAR_PASSWD_EMPTY: @@ -61,7 +61,7 @@ static char* getSyntaxErrFormat(int32_t errCode) { case TSDB_CODE_PAR_DB_NOT_SPECIFIED: return "Database not specified"; case TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME: - return "Invalid identifier name : %s"; + return "Invalid identifier name: %s"; case TSDB_CODE_PAR_CORRESPONDING_STABLE_ERR: return "Corresponding super table not in this db"; case TSDB_CODE_PAR_INVALID_RANGE_OPTION: @@ -120,6 +120,14 @@ static char* getSyntaxErrFormat(int32_t errCode) { return "Only one tag if there is a json tag"; case TSDB_CODE_PAR_INCORRECT_NUM_OF_COL: return "Query block has incorrect number of result columns"; + case TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL: + return "Incorrect TIMESTAMP value: %s"; + case TSDB_CODE_PAR_INVALID_DAYS_VALUE: + return "Invalid days value, should be keep2 >= keep1 >= keep0 >= days"; + case TSDB_CODE_PAR_OFFSET_LESS_ZERO: + return "soffset/offset can not be less than 0"; + case TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY: + return "slimit/soffset only available for PARTITION BY query"; case TSDB_CODE_OUT_OF_MEMORY: return "Out of memory"; default: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index b38e4092e3..5e91a15025 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -100,24 +100,24 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 336 +#define YYNOCODE 346 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - int32_t yy4; - bool yy89; - EFillMode yy102; - SDataType yy112; - SAlterOption yy221; - ENullOrder yy361; - EJoinType yy372; - SNodeList* yy376; - EOperatorType yy380; - EOrder yy386; - SNode* yy392; - SToken yy449; + SAlterOption yy145; + EOrder yy250; + EOperatorType yy348; + int32_t yy376; + SDataType yy380; + SNode* yy456; + SToken yy517; + EFillMode yy534; + ENullOrder yy645; + SNodeList* yy652; + bool yy673; + EJoinType yy684; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -132,17 +132,18 @@ typedef union { #define ParseCTX_PARAM #define ParseCTX_FETCH #define ParseCTX_STORE -#define YYNSTATE 572 -#define YYNRULE 437 -#define YYNTOKEN 222 -#define YY_MAX_SHIFT 571 -#define YY_MIN_SHIFTREDUCE 850 -#define YY_MAX_SHIFTREDUCE 1286 -#define YY_ERROR_ACTION 1287 -#define YY_ACCEPT_ACTION 1288 -#define YY_NO_ACTION 1289 -#define YY_MIN_REDUCE 1290 -#define YY_MAX_REDUCE 1726 +#define YYFALLBACK 1 +#define YYNSTATE 574 +#define YYNRULE 441 +#define YYNTOKEN 231 +#define YY_MAX_SHIFT 573 +#define YY_MIN_SHIFTREDUCE 855 +#define YY_MAX_SHIFTREDUCE 1295 +#define YY_ERROR_ACTION 1296 +#define YY_ACCEPT_ACTION 1297 +#define YY_NO_ACTION 1298 +#define YY_MIN_REDUCE 1299 +#define YY_MAX_REDUCE 1739 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -209,553 +210,544 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (1960) +#define YY_ACTTAB_COUNT (1906) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 270, 1593, 287, 472, 1577, 485, 282, 325, 469, 1505, - /* 10 */ 1288, 1401, 33, 31, 78, 1577, 124, 1563, 1302, 1563, - /* 20 */ 279, 383, 1106, 34, 32, 30, 29, 28, 1593, 1563, - /* 30 */ 1412, 1559, 1565, 1559, 1565, 469, 125, 250, 1104, 1593, - /* 40 */ 1369, 1705, 438, 1559, 1566, 468, 469, 1389, 445, 1549, - /* 50 */ 12, 33, 31, 1228, 1704, 54, 468, 1112, 1702, 279, - /* 60 */ 1549, 1106, 484, 295, 319, 449, 1577, 243, 1578, 471, - /* 70 */ 1580, 1581, 467, 105, 462, 1, 1408, 1104, 73, 1578, - /* 80 */ 471, 1580, 1581, 467, 525, 462, 1384, 290, 1643, 12, - /* 90 */ 1593, 484, 251, 1639, 1496, 1498, 1112, 448, 568, 26, - /* 100 */ 205, 362, 1705, 1705, 1705, 441, 421, 468, 107, 103, - /* 110 */ 1105, 1549, 516, 485, 1, 137, 137, 137, 1129, 1702, - /* 120 */ 1702, 1702, 323, 447, 133, 1650, 1651, 445, 1655, 74, - /* 130 */ 1578, 471, 1580, 1581, 467, 519, 462, 568, 1412, 1643, - /* 140 */ 54, 144, 485, 272, 1639, 132, 36, 940, 1107, 1105, - /* 150 */ 422, 324, 105, 100, 515, 514, 513, 201, 512, 1127, - /* 160 */ 439, 1407, 1130, 428, 1670, 435, 942, 1412, 52, 1110, - /* 170 */ 1111, 51, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 464, - /* 180 */ 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1107, 103, 1705, - /* 190 */ 1461, 34, 32, 30, 29, 28, 269, 9, 8, 138, - /* 200 */ 69, 1459, 137, 134, 1650, 1651, 1702, 1655, 1110, 1111, - /* 210 */ 65, 1155, 1156, 1157, 1158, 1159, 1160, 1161, 464, 1166, - /* 220 */ 1167, 1168, 1169, 1170, 1171, 1172, 33, 31, 138, 252, - /* 230 */ 227, 440, 436, 1442, 279, 249, 1106, 1127, 1577, 399, - /* 240 */ 63, 393, 521, 1461, 341, 398, 70, 353, 102, 284, - /* 250 */ 394, 392, 1104, 395, 1459, 1142, 354, 318, 391, 317, - /* 260 */ 106, 1405, 1593, 1190, 12, 33, 31, 1404, 1227, 469, - /* 270 */ 138, 1112, 1204, 279, 22, 1106, 1657, 56, 268, 468, - /* 280 */ 1252, 175, 24, 1549, 34, 32, 30, 29, 28, 1, - /* 290 */ 1657, 1104, 34, 32, 30, 29, 28, 30, 29, 28, - /* 300 */ 1654, 74, 1578, 471, 1580, 1581, 467, 128, 462, 138, - /* 310 */ 1112, 1643, 568, 1191, 1653, 272, 1639, 1717, 1453, 432, - /* 320 */ 1250, 1251, 1253, 1254, 1105, 413, 1677, 1390, 7, 1290, - /* 330 */ 352, 1196, 1128, 347, 346, 345, 344, 343, 138, 340, - /* 340 */ 339, 338, 337, 336, 332, 331, 330, 329, 328, 327, - /* 350 */ 326, 568, 59, 98, 97, 96, 95, 94, 93, 92, - /* 360 */ 91, 90, 1107, 1105, 1705, 1705, 25, 277, 1185, 1186, - /* 370 */ 1187, 1188, 1189, 1193, 1194, 1195, 362, 137, 1703, 1403, - /* 380 */ 1131, 1702, 1702, 1110, 1111, 6, 1155, 1156, 1157, 1158, - /* 390 */ 1159, 1160, 1161, 464, 1166, 1167, 1168, 1169, 1170, 1171, - /* 400 */ 1172, 1107, 524, 484, 452, 34, 32, 30, 29, 28, - /* 410 */ 89, 564, 563, 88, 87, 86, 85, 84, 83, 82, - /* 420 */ 81, 80, 1110, 1111, 1549, 1155, 1156, 1157, 1158, 1159, - /* 430 */ 1160, 1161, 464, 1166, 1167, 1168, 1169, 1170, 1171, 1172, - /* 440 */ 33, 31, 1173, 252, 1291, 536, 1313, 283, 279, 313, - /* 450 */ 1106, 289, 138, 485, 472, 122, 262, 101, 36, 122, - /* 460 */ 1506, 386, 333, 1414, 1226, 89, 1104, 1414, 88, 87, - /* 470 */ 86, 85, 84, 83, 82, 81, 80, 1190, 1412, 33, - /* 480 */ 31, 48, 101, 1387, 389, 1112, 386, 279, 1312, 1106, - /* 490 */ 1577, 1549, 34, 32, 30, 29, 28, 485, 485, 263, - /* 500 */ 200, 261, 260, 7, 385, 1104, 78, 334, 511, 389, - /* 510 */ 388, 387, 292, 390, 1593, 34, 32, 30, 29, 28, - /* 520 */ 122, 469, 1412, 1412, 1112, 485, 568, 1191, 1414, 1311, - /* 530 */ 1461, 468, 1493, 1549, 361, 1549, 291, 485, 1105, 146, - /* 540 */ 1223, 1459, 7, 1192, 107, 1196, 1409, 138, 516, 453, - /* 550 */ 1412, 397, 396, 74, 1578, 471, 1580, 1581, 467, 1461, - /* 560 */ 462, 1197, 1412, 1643, 1342, 568, 1132, 272, 1639, 1717, - /* 570 */ 1460, 519, 348, 1397, 1549, 1657, 1107, 1105, 1700, 1242, - /* 580 */ 25, 277, 1185, 1186, 1187, 1188, 1189, 1193, 1194, 1195, - /* 590 */ 515, 514, 513, 1577, 512, 1538, 23, 1110, 1111, 1652, - /* 600 */ 1155, 1156, 1157, 1158, 1159, 1160, 1161, 464, 1166, 1167, - /* 610 */ 1168, 1169, 1170, 1171, 1172, 1107, 399, 1593, 393, 148, - /* 620 */ 147, 1283, 398, 1310, 448, 102, 166, 394, 392, 164, - /* 630 */ 395, 302, 518, 517, 468, 391, 1110, 1111, 1549, 1155, - /* 640 */ 1156, 1157, 1158, 1159, 1160, 1161, 464, 1166, 1167, 1168, - /* 650 */ 1169, 1170, 1171, 1172, 33, 31, 74, 1578, 471, 1580, - /* 660 */ 1581, 467, 279, 462, 1106, 1577, 1643, 1388, 1549, 485, - /* 670 */ 272, 1639, 132, 34, 32, 30, 29, 28, 1530, 485, - /* 680 */ 1104, 1309, 122, 485, 445, 887, 186, 886, 482, 1593, - /* 690 */ 1415, 1671, 293, 451, 1412, 1399, 469, 537, 535, 1112, - /* 700 */ 1282, 1235, 485, 886, 1412, 888, 468, 1129, 1412, 105, - /* 710 */ 1549, 483, 485, 1308, 1307, 310, 521, 1, 1339, 381, - /* 720 */ 1306, 219, 1305, 1304, 1301, 1395, 1549, 1412, 74, 1578, - /* 730 */ 471, 1580, 1581, 467, 312, 462, 168, 1412, 1643, 167, - /* 740 */ 568, 455, 272, 1639, 1717, 103, 34, 32, 30, 29, - /* 750 */ 28, 1300, 1105, 1661, 1299, 1298, 178, 1297, 1549, 1549, - /* 760 */ 135, 1650, 1651, 1296, 1655, 1549, 459, 1549, 1549, 1549, - /* 770 */ 544, 543, 542, 541, 294, 463, 540, 539, 538, 108, - /* 780 */ 533, 532, 531, 530, 529, 528, 527, 526, 115, 522, - /* 790 */ 1107, 1178, 1497, 1498, 1662, 1223, 1549, 1129, 510, 1549, - /* 800 */ 1549, 121, 1549, 1295, 1092, 1093, 1294, 1293, 1549, 113, - /* 810 */ 1142, 1110, 1111, 424, 1155, 1156, 1157, 1158, 1159, 1160, - /* 820 */ 1161, 464, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1570, - /* 830 */ 978, 508, 507, 506, 982, 505, 984, 985, 504, 987, - /* 840 */ 501, 1568, 993, 498, 995, 996, 495, 492, 1549, 123, - /* 850 */ 1577, 1549, 1549, 170, 233, 1329, 169, 172, 1324, 411, - /* 860 */ 171, 1322, 1115, 1577, 47, 189, 231, 420, 1249, 191, - /* 870 */ 9, 8, 409, 1114, 1593, 1285, 1286, 400, 35, 149, - /* 880 */ 402, 469, 1198, 405, 1303, 1182, 35, 1593, 456, 35, - /* 890 */ 1162, 468, 208, 1067, 469, 1549, 210, 110, 1370, 111, - /* 900 */ 449, 477, 113, 216, 468, 47, 971, 202, 1549, 966, - /* 910 */ 433, 1454, 414, 240, 1578, 471, 1580, 1581, 467, 490, - /* 920 */ 462, 111, 195, 999, 380, 1003, 75, 1578, 471, 1580, - /* 930 */ 1581, 467, 446, 462, 1118, 1673, 1643, 1594, 112, 1705, - /* 940 */ 1642, 1639, 1010, 72, 1577, 1117, 204, 912, 2, 301, - /* 950 */ 161, 113, 137, 131, 111, 1009, 1702, 1127, 114, 379, - /* 960 */ 297, 375, 371, 367, 160, 257, 913, 259, 1593, 940, - /* 970 */ 224, 335, 50, 49, 322, 469, 143, 1495, 1076, 342, - /* 980 */ 145, 316, 350, 349, 351, 468, 355, 1136, 356, 1549, - /* 990 */ 150, 55, 357, 258, 158, 308, 1577, 304, 300, 140, - /* 1000 */ 1135, 358, 153, 359, 1134, 360, 156, 75, 1578, 471, - /* 1010 */ 1580, 1581, 467, 53, 462, 363, 159, 1643, 1133, 571, - /* 1020 */ 1593, 458, 1639, 382, 384, 1402, 79, 466, 163, 267, - /* 1030 */ 138, 1398, 1112, 223, 165, 116, 99, 468, 117, 1400, - /* 1040 */ 1396, 1549, 560, 118, 556, 552, 548, 222, 119, 176, - /* 1050 */ 225, 1577, 157, 415, 152, 423, 154, 1534, 179, 247, - /* 1060 */ 1578, 471, 1580, 1581, 467, 465, 462, 460, 1615, 419, - /* 1070 */ 181, 425, 426, 151, 71, 1593, 416, 217, 1132, 434, - /* 1080 */ 184, 187, 469, 1684, 475, 1674, 431, 1683, 5, 190, - /* 1090 */ 442, 271, 468, 437, 430, 4, 1549, 1223, 104, 1131, - /* 1100 */ 1577, 273, 37, 1720, 457, 454, 197, 481, 1658, 1664, - /* 1110 */ 16, 473, 1624, 474, 126, 1578, 471, 1580, 1581, 467, - /* 1120 */ 194, 462, 130, 1504, 1593, 196, 478, 1503, 226, 212, - /* 1130 */ 281, 469, 479, 214, 480, 62, 427, 1701, 203, 182, - /* 1140 */ 1413, 468, 64, 488, 221, 1549, 1385, 228, 567, 129, - /* 1150 */ 230, 234, 1577, 43, 1084, 235, 177, 232, 450, 1718, - /* 1160 */ 445, 1543, 1542, 75, 1578, 471, 1580, 1581, 467, 296, - /* 1170 */ 462, 1539, 298, 1643, 299, 1100, 1593, 1101, 1640, 141, - /* 1180 */ 303, 1537, 1577, 469, 305, 105, 306, 307, 1536, 309, - /* 1190 */ 1535, 1520, 311, 468, 142, 314, 315, 1549, 1079, 1078, - /* 1200 */ 429, 1514, 1513, 320, 449, 321, 1593, 1512, 1511, 1050, - /* 1210 */ 1488, 1487, 1486, 469, 109, 248, 1578, 471, 1580, 1581, - /* 1220 */ 467, 103, 462, 468, 1485, 1484, 1483, 1549, 1482, 1481, - /* 1230 */ 1480, 1479, 1478, 1577, 1477, 1476, 198, 1650, 444, 1475, - /* 1240 */ 443, 1474, 1473, 1705, 1472, 126, 1578, 471, 1580, 1581, - /* 1250 */ 467, 1471, 462, 1470, 1469, 1468, 137, 1593, 1467, 1466, - /* 1260 */ 1702, 1465, 1052, 1577, 469, 1464, 1463, 1462, 1341, 1528, - /* 1270 */ 1522, 1510, 1501, 1391, 468, 162, 155, 1340, 1549, 1338, - /* 1280 */ 1336, 276, 365, 364, 369, 368, 366, 1593, 905, 1334, - /* 1290 */ 1719, 1577, 370, 374, 466, 372, 248, 1578, 471, 1580, - /* 1300 */ 1581, 467, 1332, 462, 468, 378, 1321, 1320, 1549, 1317, - /* 1310 */ 373, 1393, 1015, 1392, 1018, 1593, 376, 377, 1330, 264, - /* 1320 */ 77, 939, 469, 938, 534, 937, 247, 1578, 471, 1580, - /* 1330 */ 1581, 467, 468, 462, 936, 1616, 1549, 935, 932, 278, - /* 1340 */ 1577, 931, 286, 285, 1325, 1323, 265, 403, 266, 1106, - /* 1350 */ 406, 1316, 1120, 408, 248, 1578, 471, 1580, 1581, 467, - /* 1360 */ 536, 462, 1315, 410, 1593, 1104, 76, 1527, 1113, 1521, - /* 1370 */ 1086, 469, 120, 1509, 417, 180, 1508, 1500, 1577, 57, - /* 1380 */ 183, 468, 3, 13, 1112, 1549, 35, 1112, 280, 1577, - /* 1390 */ 14, 188, 41, 1248, 127, 38, 46, 192, 185, 11, - /* 1400 */ 418, 1241, 1593, 248, 1578, 471, 1580, 1581, 467, 469, - /* 1410 */ 462, 1220, 193, 1593, 20, 1568, 199, 58, 1271, 468, - /* 1420 */ 469, 21, 40, 1549, 1219, 568, 39, 15, 486, 1276, - /* 1430 */ 468, 1270, 274, 1275, 1549, 1274, 275, 1105, 8, 1577, - /* 1440 */ 1116, 236, 1578, 471, 1580, 1581, 467, 136, 462, 461, - /* 1450 */ 17, 1165, 242, 1578, 471, 1580, 1581, 467, 1164, 462, - /* 1460 */ 1183, 27, 10, 1593, 1163, 18, 139, 1150, 206, 470, - /* 1470 */ 469, 19, 476, 1499, 209, 1107, 207, 1246, 1121, 211, - /* 1480 */ 468, 60, 213, 61, 1549, 215, 42, 65, 1122, 1577, - /* 1490 */ 1567, 1000, 489, 288, 218, 487, 1110, 1111, 491, 1124, - /* 1500 */ 1577, 997, 244, 1578, 471, 1580, 1581, 467, 493, 462, - /* 1510 */ 494, 977, 496, 1593, 994, 497, 499, 988, 500, 502, - /* 1520 */ 469, 992, 986, 503, 1593, 509, 991, 990, 989, 1012, - /* 1530 */ 468, 469, 66, 67, 1549, 68, 1008, 1005, 903, 1011, - /* 1540 */ 520, 468, 928, 946, 523, 1549, 926, 220, 1577, 925, - /* 1550 */ 924, 923, 237, 1578, 471, 1580, 1581, 467, 922, 462, - /* 1560 */ 921, 1577, 404, 245, 1578, 471, 1580, 1581, 467, 920, - /* 1570 */ 462, 919, 1593, 943, 941, 916, 915, 412, 914, 469, - /* 1580 */ 911, 910, 909, 908, 1337, 1593, 545, 546, 1335, 468, - /* 1590 */ 547, 174, 469, 1549, 407, 549, 550, 551, 1333, 401, - /* 1600 */ 553, 554, 468, 1331, 555, 173, 1549, 557, 558, 559, - /* 1610 */ 1319, 238, 1578, 471, 1580, 1581, 467, 561, 462, 562, - /* 1620 */ 1318, 1314, 565, 566, 246, 1578, 471, 1580, 1581, 467, - /* 1630 */ 1577, 462, 45, 1108, 229, 44, 569, 570, 1289, 1577, - /* 1640 */ 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1650 */ 1289, 1289, 1289, 1289, 1593, 1289, 1289, 1289, 1289, 1289, - /* 1660 */ 1289, 469, 1289, 1593, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1670 */ 469, 468, 1289, 1289, 1289, 1549, 1289, 1289, 1289, 1289, - /* 1680 */ 468, 1289, 1289, 1289, 1549, 1289, 1289, 1289, 1289, 1577, - /* 1690 */ 1289, 1289, 1289, 239, 1578, 471, 1580, 1581, 467, 1289, - /* 1700 */ 462, 1289, 1589, 1578, 471, 1580, 1581, 467, 1289, 462, - /* 1710 */ 1289, 1289, 1289, 1593, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1720 */ 469, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1730 */ 468, 1289, 1289, 1289, 1549, 1289, 1289, 1289, 1289, 1577, - /* 1740 */ 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1750 */ 1577, 1289, 1588, 1578, 471, 1580, 1581, 467, 1289, 462, - /* 1760 */ 1289, 1289, 1289, 1593, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1770 */ 469, 1289, 1289, 1289, 1593, 1289, 1289, 1289, 1289, 1289, - /* 1780 */ 468, 469, 1289, 1289, 1549, 1289, 1289, 1289, 1289, 1289, - /* 1790 */ 1289, 468, 1289, 1289, 1289, 1549, 1289, 1289, 1577, 1289, - /* 1800 */ 1289, 1289, 1587, 1578, 471, 1580, 1581, 467, 1289, 462, - /* 1810 */ 1289, 1577, 1289, 255, 1578, 471, 1580, 1581, 467, 1289, - /* 1820 */ 462, 1289, 1593, 1289, 1289, 1289, 1289, 1289, 1289, 469, - /* 1830 */ 1289, 1289, 1289, 1289, 1289, 1593, 1289, 1289, 1289, 468, - /* 1840 */ 1289, 1289, 469, 1549, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1850 */ 1289, 1289, 468, 1289, 1289, 1289, 1549, 1289, 1289, 1289, - /* 1860 */ 1289, 254, 1578, 471, 1580, 1581, 467, 1289, 462, 1289, - /* 1870 */ 1289, 1289, 1289, 1289, 256, 1578, 471, 1580, 1581, 467, - /* 1880 */ 1577, 462, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1577, - /* 1890 */ 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1900 */ 1289, 1289, 1289, 1289, 1593, 1289, 1289, 1289, 1289, 1289, - /* 1910 */ 1289, 469, 1289, 1593, 1289, 1289, 1289, 1289, 1289, 1289, - /* 1920 */ 469, 468, 1289, 1289, 1289, 1549, 1289, 1289, 1289, 1289, - /* 1930 */ 468, 1289, 1289, 1289, 1549, 1289, 1289, 1289, 1289, 1289, - /* 1940 */ 1289, 1289, 1289, 253, 1578, 471, 1580, 1581, 467, 1289, - /* 1950 */ 462, 1289, 241, 1578, 471, 1580, 1581, 467, 1289, 462, + /* 0 */ 487, 1718, 1590, 1502, 273, 474, 322, 290, 285, 78, + /* 10 */ 146, 1514, 33, 31, 1717, 1410, 386, 407, 1715, 487, + /* 20 */ 282, 1576, 1115, 1470, 1576, 1421, 1606, 125, 78, 272, + /* 30 */ 447, 1378, 415, 450, 1468, 393, 1572, 1578, 1113, 1572, + /* 40 */ 1578, 26, 205, 470, 1421, 1718, 174, 1562, 1576, 410, + /* 50 */ 12, 33, 31, 1237, 404, 105, 486, 1121, 137, 282, + /* 60 */ 173, 1115, 1715, 1572, 1579, 54, 74, 1591, 473, 1593, + /* 70 */ 1594, 469, 486, 464, 59, 1, 1656, 1113, 100, 487, + /* 80 */ 275, 1652, 132, 30, 29, 28, 1416, 45, 326, 12, + /* 90 */ 44, 54, 103, 486, 201, 293, 1121, 286, 570, 1348, + /* 100 */ 430, 1683, 1505, 1507, 1421, 122, 449, 133, 1663, 1664, + /* 110 */ 1114, 1668, 1417, 1423, 1, 1300, 983, 510, 509, 508, + /* 120 */ 987, 507, 989, 990, 506, 992, 503, 36, 998, 500, + /* 130 */ 1000, 1001, 497, 494, 9, 8, 89, 570, 1136, 88, + /* 140 */ 87, 86, 85, 84, 83, 82, 81, 80, 36, 1114, + /* 150 */ 1116, 546, 545, 544, 543, 297, 365, 542, 541, 540, + /* 160 */ 108, 535, 534, 533, 532, 531, 530, 529, 528, 115, + /* 170 */ 524, 1119, 1120, 63, 1164, 1165, 1166, 1167, 1168, 1169, + /* 180 */ 1170, 466, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1116, + /* 190 */ 891, 1606, 292, 402, 1414, 396, 416, 1297, 471, 401, + /* 200 */ 122, 138, 102, 1140, 397, 395, 384, 398, 1423, 1213, + /* 210 */ 1119, 1120, 394, 1164, 1165, 1166, 1167, 1168, 1169, 1170, + /* 220 */ 466, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 33, 31, + /* 230 */ 101, 1590, 414, 440, 389, 1718, 282, 250, 1115, 1136, + /* 240 */ 34, 32, 30, 29, 28, 412, 344, 1718, 137, 356, + /* 250 */ 1670, 298, 1715, 138, 1113, 1606, 1299, 392, 357, 1470, + /* 260 */ 1716, 321, 471, 320, 1715, 287, 12, 33, 31, 487, + /* 270 */ 1468, 138, 470, 1121, 1667, 282, 1562, 1115, 327, 138, + /* 280 */ 98, 97, 96, 95, 94, 93, 92, 91, 90, 1412, + /* 290 */ 1718, 1, 1138, 1113, 1421, 74, 1591, 473, 1593, 1594, + /* 300 */ 469, 328, 464, 137, 1251, 1656, 128, 1715, 69, 275, + /* 310 */ 1652, 1730, 1121, 138, 570, 1261, 1470, 1462, 65, 138, + /* 320 */ 1690, 1077, 294, 200, 56, 270, 1114, 1468, 175, 1079, + /* 330 */ 7, 251, 355, 264, 1562, 350, 349, 348, 347, 346, + /* 340 */ 6, 343, 342, 341, 340, 339, 335, 334, 333, 332, + /* 350 */ 331, 330, 329, 570, 434, 1259, 1260, 1262, 1263, 101, + /* 360 */ 892, 441, 891, 389, 89, 1114, 1116, 88, 87, 86, + /* 370 */ 85, 84, 83, 82, 81, 80, 265, 1322, 263, 262, + /* 380 */ 893, 388, 437, 124, 48, 1311, 392, 1119, 1120, 1078, + /* 390 */ 1164, 1165, 1166, 1167, 1168, 1169, 1170, 466, 1175, 1176, + /* 400 */ 1177, 1178, 1179, 1180, 1181, 1116, 1398, 22, 295, 34, + /* 410 */ 32, 30, 29, 28, 1351, 523, 122, 34, 32, 30, + /* 420 */ 29, 28, 1562, 1141, 1423, 228, 1119, 1120, 1451, 1164, + /* 430 */ 1165, 1166, 1167, 1168, 1169, 1170, 466, 1175, 1176, 1177, + /* 440 */ 1178, 1179, 1180, 1181, 33, 31, 1182, 254, 24, 1201, + /* 450 */ 442, 438, 282, 424, 1115, 1590, 138, 945, 34, 32, + /* 460 */ 30, 29, 28, 566, 565, 487, 402, 107, 396, 1206, + /* 470 */ 1113, 518, 401, 1151, 336, 102, 947, 397, 395, 1606, + /* 480 */ 398, 1199, 313, 33, 31, 394, 471, 391, 390, 1121, + /* 490 */ 1421, 282, 1139, 1115, 521, 1321, 470, 1232, 425, 474, + /* 500 */ 1562, 315, 487, 1320, 23, 1515, 451, 7, 1590, 1113, + /* 510 */ 1137, 337, 1319, 517, 516, 515, 487, 514, 1318, 73, + /* 520 */ 1591, 473, 1593, 1594, 469, 364, 464, 1421, 1121, 1656, + /* 530 */ 570, 1200, 1606, 253, 1652, 487, 351, 1718, 70, 471, + /* 540 */ 1562, 1421, 1114, 186, 1418, 1718, 7, 122, 1562, 470, + /* 550 */ 137, 1205, 106, 1562, 1715, 1424, 431, 1562, 137, 1413, + /* 560 */ 1421, 513, 1715, 1562, 34, 32, 30, 29, 28, 570, + /* 570 */ 144, 487, 249, 1591, 473, 1593, 1594, 469, 1317, 464, + /* 580 */ 1543, 1114, 1116, 148, 147, 1316, 25, 280, 1194, 1195, + /* 590 */ 1196, 1197, 1198, 1202, 1203, 1204, 1421, 52, 453, 1315, + /* 600 */ 51, 400, 399, 1119, 1120, 526, 1164, 1165, 1166, 1167, + /* 610 */ 1168, 1169, 1170, 466, 1175, 1176, 1177, 1178, 1179, 1180, + /* 620 */ 1181, 1116, 1314, 1562, 1313, 34, 32, 30, 29, 28, + /* 630 */ 1562, 457, 1310, 34, 32, 30, 29, 28, 1399, 520, + /* 640 */ 519, 1236, 1119, 1120, 1562, 1164, 1165, 1166, 1167, 1168, + /* 650 */ 1169, 1170, 466, 1175, 1176, 1177, 1178, 1179, 1180, 1181, + /* 660 */ 33, 31, 1309, 254, 1670, 1590, 1670, 1562, 282, 1562, + /* 670 */ 1115, 34, 32, 30, 29, 28, 447, 1562, 34, 32, + /* 680 */ 30, 29, 28, 289, 288, 1406, 1113, 365, 1666, 1606, + /* 690 */ 1665, 1397, 1583, 1129, 487, 1292, 450, 1199, 527, 487, + /* 700 */ 1393, 105, 487, 484, 1581, 1121, 470, 1562, 485, 1122, + /* 710 */ 1562, 219, 539, 537, 1506, 1507, 487, 1408, 1590, 1421, + /* 720 */ 1308, 451, 1404, 1, 1421, 296, 1307, 1421, 1121, 74, + /* 730 */ 1591, 473, 1593, 1594, 469, 1151, 464, 178, 103, 1656, + /* 740 */ 523, 1421, 1606, 275, 1652, 132, 570, 1200, 1306, 471, + /* 750 */ 1305, 1101, 1102, 198, 1663, 446, 1304, 445, 1114, 470, + /* 760 */ 1718, 121, 538, 1562, 1684, 1562, 316, 1205, 1303, 488, + /* 770 */ 1302, 1562, 1244, 137, 1291, 1675, 1232, 1715, 1138, 1470, + /* 780 */ 458, 1125, 75, 1591, 473, 1593, 1594, 469, 1187, 464, + /* 790 */ 1469, 454, 1656, 1562, 1138, 1562, 1655, 1652, 1116, 9, + /* 800 */ 8, 1562, 25, 280, 1194, 1195, 1196, 1197, 1198, 1202, + /* 810 */ 1203, 1204, 465, 1562, 1551, 1562, 1590, 40, 252, 1119, + /* 820 */ 1120, 1130, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 466, + /* 830 */ 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1396, 123, 1235, + /* 840 */ 1606, 166, 1133, 234, 164, 1338, 168, 471, 1590, 167, + /* 850 */ 305, 170, 1333, 1115, 169, 232, 172, 470, 113, 171, + /* 860 */ 47, 1562, 426, 512, 1258, 1294, 1295, 403, 149, 1113, + /* 870 */ 1331, 189, 1606, 35, 405, 191, 461, 1207, 1312, 471, + /* 880 */ 74, 1591, 473, 1593, 1594, 469, 423, 464, 1121, 470, + /* 890 */ 1656, 1379, 408, 1562, 275, 1652, 1730, 35, 107, 35, + /* 900 */ 208, 1171, 518, 1072, 210, 1713, 110, 111, 202, 435, + /* 910 */ 479, 216, 74, 1591, 473, 1593, 1594, 469, 1463, 464, + /* 920 */ 113, 1124, 1656, 1123, 976, 521, 275, 1652, 1730, 570, + /* 930 */ 195, 47, 72, 417, 383, 971, 917, 1674, 455, 492, + /* 940 */ 448, 1114, 1686, 1004, 517, 516, 515, 111, 514, 112, + /* 950 */ 447, 1008, 113, 1015, 111, 918, 1014, 1607, 114, 2, + /* 960 */ 204, 1136, 300, 50, 49, 325, 304, 143, 1590, 259, + /* 970 */ 945, 261, 319, 224, 145, 105, 338, 1590, 1085, 1504, + /* 980 */ 345, 1116, 352, 353, 260, 354, 311, 358, 307, 303, + /* 990 */ 140, 1145, 1606, 1127, 359, 1126, 150, 1191, 360, 471, + /* 1000 */ 1144, 1606, 1119, 1120, 361, 153, 362, 1143, 471, 470, + /* 1010 */ 156, 363, 103, 1562, 1142, 53, 366, 159, 470, 451, + /* 1020 */ 385, 138, 1562, 387, 1411, 79, 269, 134, 1663, 1664, + /* 1030 */ 1121, 1668, 241, 1591, 473, 1593, 1594, 469, 1590, 464, + /* 1040 */ 163, 75, 1591, 473, 1593, 1594, 469, 1407, 464, 165, + /* 1050 */ 116, 1656, 117, 1409, 1405, 460, 1652, 1547, 1718, 573, + /* 1060 */ 118, 119, 1606, 428, 447, 418, 1141, 1687, 176, 468, + /* 1070 */ 225, 137, 419, 223, 427, 1715, 99, 179, 181, 470, + /* 1080 */ 422, 184, 562, 1562, 558, 554, 550, 222, 436, 105, + /* 1090 */ 226, 1697, 1590, 187, 477, 433, 444, 190, 1696, 194, + /* 1100 */ 274, 439, 248, 1591, 473, 1593, 1594, 469, 467, 464, + /* 1110 */ 462, 1628, 5, 432, 71, 4, 1606, 217, 1232, 104, + /* 1120 */ 1140, 130, 37, 471, 1590, 197, 103, 196, 1677, 1671, + /* 1130 */ 276, 459, 456, 470, 16, 1513, 475, 1562, 481, 476, + /* 1140 */ 1590, 135, 1663, 1664, 1512, 1668, 480, 483, 1606, 212, + /* 1150 */ 203, 1733, 1714, 284, 1637, 471, 126, 1591, 473, 1593, + /* 1160 */ 1594, 469, 214, 464, 1606, 470, 62, 482, 1422, 1562, + /* 1170 */ 227, 471, 64, 1394, 490, 229, 429, 221, 569, 182, + /* 1180 */ 43, 470, 233, 129, 271, 1562, 235, 231, 244, 1591, + /* 1190 */ 473, 1593, 1594, 469, 1556, 464, 1093, 236, 177, 1590, + /* 1200 */ 452, 1731, 1555, 299, 75, 1591, 473, 1593, 1594, 469, + /* 1210 */ 301, 464, 1590, 1552, 1656, 302, 1109, 1110, 141, 1653, + /* 1220 */ 306, 1550, 308, 1606, 309, 310, 443, 1549, 312, 1548, + /* 1230 */ 471, 314, 1533, 142, 317, 318, 1606, 1088, 1087, 1527, + /* 1240 */ 470, 1526, 323, 471, 1562, 324, 1525, 1524, 1055, 1497, + /* 1250 */ 1496, 1495, 1494, 470, 1493, 1492, 1491, 1562, 109, 1480, + /* 1260 */ 279, 1490, 1489, 126, 1591, 473, 1593, 1594, 469, 1590, + /* 1270 */ 464, 155, 1400, 910, 1349, 1057, 249, 1591, 473, 1593, + /* 1280 */ 1594, 469, 1488, 464, 1487, 1486, 1485, 1484, 1483, 1482, + /* 1290 */ 1481, 1479, 1478, 1606, 1477, 1476, 1475, 1474, 1473, 1472, + /* 1300 */ 468, 1471, 1350, 1541, 1535, 1519, 1510, 1347, 1732, 369, + /* 1310 */ 470, 367, 368, 1345, 1562, 371, 372, 1590, 373, 1343, + /* 1320 */ 1341, 375, 377, 1330, 381, 1329, 1326, 1402, 77, 376, + /* 1330 */ 162, 1401, 536, 248, 1591, 473, 1593, 1594, 469, 538, + /* 1340 */ 464, 1606, 1629, 1020, 380, 1339, 1590, 379, 471, 1023, + /* 1350 */ 944, 266, 943, 942, 941, 940, 937, 1334, 470, 267, + /* 1360 */ 936, 1332, 1562, 406, 268, 281, 409, 1325, 411, 1324, + /* 1370 */ 1606, 413, 76, 1540, 46, 1534, 1095, 471, 120, 180, + /* 1380 */ 420, 249, 1591, 473, 1593, 1594, 469, 470, 464, 1518, + /* 1390 */ 1517, 1562, 161, 183, 283, 131, 1590, 421, 1509, 185, + /* 1400 */ 13, 382, 3, 378, 374, 370, 160, 57, 35, 188, + /* 1410 */ 249, 1591, 473, 1593, 1594, 469, 41, 464, 38, 14, + /* 1420 */ 1606, 11, 1581, 1257, 1250, 1280, 127, 471, 192, 20, + /* 1430 */ 58, 8, 193, 55, 21, 1590, 158, 470, 39, 1229, + /* 1440 */ 1228, 1562, 1279, 199, 1590, 277, 1285, 1284, 15, 1283, + /* 1450 */ 278, 17, 136, 1174, 1173, 463, 27, 1159, 139, 1606, + /* 1460 */ 237, 1591, 473, 1593, 1594, 469, 471, 464, 1606, 1508, + /* 1470 */ 1172, 1192, 10, 206, 18, 471, 470, 19, 478, 207, + /* 1480 */ 1562, 1255, 213, 472, 1131, 470, 65, 1580, 209, 1562, + /* 1490 */ 211, 60, 1590, 61, 157, 218, 152, 42, 154, 243, + /* 1500 */ 1591, 473, 1593, 1594, 469, 1590, 464, 215, 245, 1591, + /* 1510 */ 473, 1593, 1594, 469, 489, 464, 1606, 151, 491, 1005, + /* 1520 */ 291, 493, 495, 471, 1002, 496, 498, 999, 499, 1606, + /* 1530 */ 993, 501, 502, 470, 991, 504, 471, 1562, 505, 982, + /* 1540 */ 997, 996, 66, 511, 995, 994, 470, 1017, 1016, 67, + /* 1550 */ 1562, 68, 1013, 1010, 908, 522, 238, 1591, 473, 1593, + /* 1560 */ 1594, 469, 933, 464, 951, 525, 220, 931, 1590, 246, + /* 1570 */ 1591, 473, 1593, 1594, 469, 930, 464, 1590, 929, 928, + /* 1580 */ 927, 926, 925, 924, 948, 946, 921, 920, 919, 1346, + /* 1590 */ 916, 915, 1606, 914, 913, 547, 548, 549, 1344, 471, + /* 1600 */ 551, 1606, 552, 1342, 556, 555, 553, 557, 471, 470, + /* 1610 */ 1340, 559, 560, 1562, 561, 1328, 1590, 563, 470, 564, + /* 1620 */ 1327, 1323, 1562, 567, 1117, 568, 571, 1590, 230, 572, + /* 1630 */ 1298, 1298, 239, 1591, 473, 1593, 1594, 469, 1298, 464, + /* 1640 */ 1606, 247, 1591, 473, 1593, 1594, 469, 471, 464, 1298, + /* 1650 */ 1298, 1606, 1298, 1298, 1298, 1298, 1298, 470, 471, 1298, + /* 1660 */ 1298, 1562, 1298, 1298, 1298, 1298, 1298, 1298, 470, 1298, + /* 1670 */ 1298, 1298, 1562, 1298, 1298, 1298, 1590, 1298, 1298, 1298, + /* 1680 */ 240, 1591, 473, 1593, 1594, 469, 1298, 464, 1298, 1298, + /* 1690 */ 1298, 1602, 1591, 473, 1593, 1594, 469, 1298, 464, 1298, + /* 1700 */ 1606, 1298, 1298, 1298, 1298, 1298, 1298, 471, 1298, 1298, + /* 1710 */ 1298, 1298, 1298, 1298, 1298, 1590, 1298, 470, 1298, 1298, + /* 1720 */ 1298, 1562, 1298, 1298, 1590, 1298, 1298, 1298, 1298, 1298, + /* 1730 */ 1298, 1298, 1298, 1590, 1298, 1298, 1298, 1298, 1298, 1606, + /* 1740 */ 1601, 1591, 473, 1593, 1594, 469, 471, 464, 1606, 1298, + /* 1750 */ 1298, 1298, 1298, 1298, 1298, 471, 470, 1606, 1298, 1298, + /* 1760 */ 1562, 1298, 1298, 1298, 471, 470, 1298, 1298, 1298, 1562, + /* 1770 */ 1298, 1298, 1590, 1298, 470, 1298, 1298, 1298, 1562, 1600, + /* 1780 */ 1591, 473, 1593, 1594, 469, 1590, 464, 1298, 257, 1591, + /* 1790 */ 473, 1593, 1594, 469, 1298, 464, 1606, 256, 1591, 473, + /* 1800 */ 1593, 1594, 469, 471, 464, 1298, 1298, 1298, 1298, 1606, + /* 1810 */ 1298, 1298, 1298, 470, 1298, 1298, 471, 1562, 1298, 1298, + /* 1820 */ 1298, 1298, 1298, 1298, 1298, 1298, 470, 1298, 1298, 1298, + /* 1830 */ 1562, 1298, 1298, 1298, 1590, 1298, 258, 1591, 473, 1593, + /* 1840 */ 1594, 469, 1298, 464, 1298, 1298, 1298, 1298, 1298, 255, + /* 1850 */ 1591, 473, 1593, 1594, 469, 1298, 464, 1298, 1606, 1298, + /* 1860 */ 1298, 1298, 1298, 1298, 1298, 471, 1298, 1298, 1298, 1298, + /* 1870 */ 1298, 1298, 1298, 1298, 1298, 470, 1298, 1298, 1298, 1562, + /* 1880 */ 1298, 1298, 1298, 1298, 1298, 1298, 1298, 1298, 1298, 1298, + /* 1890 */ 1298, 1298, 1298, 1298, 1298, 1298, 1298, 1298, 242, 1591, + /* 1900 */ 473, 1593, 1594, 469, 1298, 464, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 253, 249, 253, 266, 225, 231, 269, 231, 256, 272, - /* 10 */ 222, 250, 12, 13, 240, 225, 224, 270, 226, 270, - /* 20 */ 20, 247, 22, 12, 13, 14, 15, 16, 249, 270, - /* 30 */ 256, 284, 285, 284, 285, 256, 234, 261, 38, 249, - /* 40 */ 238, 314, 290, 284, 285, 266, 256, 0, 231, 270, - /* 50 */ 50, 12, 13, 14, 327, 233, 266, 57, 331, 20, - /* 60 */ 270, 22, 20, 275, 275, 275, 225, 288, 289, 290, - /* 70 */ 291, 292, 293, 256, 295, 75, 254, 38, 288, 289, - /* 80 */ 290, 291, 292, 293, 237, 295, 239, 258, 298, 50, - /* 90 */ 249, 20, 302, 303, 265, 266, 57, 256, 98, 299, - /* 100 */ 300, 49, 314, 314, 314, 326, 231, 266, 61, 292, - /* 110 */ 110, 270, 65, 231, 75, 327, 327, 327, 20, 331, - /* 120 */ 331, 331, 240, 306, 307, 308, 309, 231, 311, 288, - /* 130 */ 289, 290, 291, 292, 293, 88, 295, 98, 256, 298, - /* 140 */ 233, 47, 231, 302, 303, 304, 75, 38, 148, 110, - /* 150 */ 275, 240, 256, 246, 107, 108, 109, 316, 111, 20, - /* 160 */ 20, 254, 20, 322, 323, 138, 57, 256, 74, 169, - /* 170 */ 170, 77, 172, 173, 174, 175, 176, 177, 178, 179, - /* 180 */ 180, 181, 182, 183, 184, 185, 186, 148, 292, 314, - /* 190 */ 249, 12, 13, 14, 15, 16, 255, 1, 2, 199, - /* 200 */ 75, 260, 327, 307, 308, 309, 331, 311, 169, 170, - /* 210 */ 85, 172, 173, 174, 175, 176, 177, 178, 179, 180, - /* 220 */ 181, 182, 183, 184, 185, 186, 12, 13, 199, 50, - /* 230 */ 242, 204, 205, 245, 20, 18, 22, 20, 225, 52, - /* 240 */ 230, 54, 49, 249, 27, 58, 230, 30, 61, 255, - /* 250 */ 63, 64, 38, 66, 260, 76, 39, 147, 71, 149, - /* 260 */ 244, 251, 249, 84, 50, 12, 13, 251, 4, 256, - /* 270 */ 199, 57, 76, 20, 2, 22, 286, 157, 158, 266, - /* 280 */ 169, 161, 2, 270, 12, 13, 14, 15, 16, 75, - /* 290 */ 286, 38, 12, 13, 14, 15, 16, 14, 15, 16, - /* 300 */ 310, 288, 289, 290, 291, 292, 293, 248, 295, 199, - /* 310 */ 57, 298, 98, 134, 310, 302, 303, 304, 259, 208, - /* 320 */ 209, 210, 211, 212, 110, 275, 313, 0, 75, 0, - /* 330 */ 113, 152, 20, 116, 117, 118, 119, 120, 199, 122, - /* 340 */ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - /* 350 */ 133, 98, 4, 24, 25, 26, 27, 28, 29, 30, - /* 360 */ 31, 32, 148, 110, 314, 314, 187, 188, 189, 190, - /* 370 */ 191, 192, 193, 194, 195, 196, 49, 327, 327, 225, - /* 380 */ 20, 331, 331, 169, 170, 43, 172, 173, 174, 175, - /* 390 */ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - /* 400 */ 186, 148, 57, 20, 72, 12, 13, 14, 15, 16, - /* 410 */ 21, 228, 229, 24, 25, 26, 27, 28, 29, 30, - /* 420 */ 31, 32, 169, 170, 270, 172, 173, 174, 175, 176, - /* 430 */ 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - /* 440 */ 12, 13, 14, 50, 0, 72, 225, 241, 20, 76, - /* 450 */ 22, 241, 199, 231, 266, 249, 35, 61, 75, 249, - /* 460 */ 272, 65, 240, 257, 200, 21, 38, 257, 24, 25, - /* 470 */ 26, 27, 28, 29, 30, 31, 32, 84, 256, 12, - /* 480 */ 13, 3, 61, 0, 88, 57, 65, 20, 225, 22, - /* 490 */ 225, 270, 12, 13, 14, 15, 16, 231, 231, 78, - /* 500 */ 140, 80, 81, 75, 83, 38, 240, 240, 86, 88, - /* 510 */ 235, 236, 241, 247, 249, 12, 13, 14, 15, 16, - /* 520 */ 249, 256, 256, 256, 57, 231, 98, 134, 257, 225, - /* 530 */ 249, 266, 256, 270, 240, 270, 255, 231, 110, 263, - /* 540 */ 198, 260, 75, 134, 61, 152, 240, 199, 65, 217, - /* 550 */ 256, 235, 236, 288, 289, 290, 291, 292, 293, 249, - /* 560 */ 295, 152, 256, 298, 0, 98, 20, 302, 303, 304, - /* 570 */ 260, 88, 67, 250, 270, 286, 148, 110, 313, 76, - /* 580 */ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - /* 590 */ 107, 108, 109, 225, 111, 0, 187, 169, 170, 310, - /* 600 */ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - /* 610 */ 182, 183, 184, 185, 186, 148, 52, 249, 54, 114, - /* 620 */ 115, 141, 58, 225, 256, 61, 79, 63, 64, 82, - /* 630 */ 66, 36, 235, 236, 266, 71, 169, 170, 270, 172, - /* 640 */ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - /* 650 */ 183, 184, 185, 186, 12, 13, 288, 289, 290, 291, - /* 660 */ 292, 293, 20, 295, 22, 225, 298, 0, 270, 231, - /* 670 */ 302, 303, 304, 12, 13, 14, 15, 16, 240, 231, - /* 680 */ 38, 225, 249, 231, 231, 20, 140, 22, 240, 249, - /* 690 */ 257, 323, 240, 215, 256, 250, 256, 235, 236, 57, - /* 700 */ 220, 14, 231, 22, 256, 40, 266, 20, 256, 256, - /* 710 */ 270, 240, 231, 225, 225, 144, 49, 75, 0, 38, - /* 720 */ 225, 240, 225, 225, 225, 250, 270, 256, 288, 289, - /* 730 */ 290, 291, 292, 293, 163, 295, 79, 256, 298, 82, - /* 740 */ 98, 72, 302, 303, 304, 292, 12, 13, 14, 15, - /* 750 */ 16, 225, 110, 313, 225, 225, 250, 225, 270, 270, - /* 760 */ 307, 308, 309, 225, 311, 270, 50, 270, 270, 270, - /* 770 */ 52, 53, 54, 55, 56, 250, 58, 59, 60, 61, - /* 780 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - /* 790 */ 148, 14, 265, 266, 197, 198, 270, 20, 250, 270, - /* 800 */ 270, 140, 270, 225, 159, 160, 225, 225, 270, 72, - /* 810 */ 76, 169, 170, 76, 172, 173, 174, 175, 176, 177, - /* 820 */ 178, 179, 180, 181, 182, 183, 184, 185, 186, 75, - /* 830 */ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - /* 840 */ 99, 87, 101, 102, 103, 104, 105, 106, 270, 18, - /* 850 */ 225, 270, 270, 79, 23, 0, 82, 79, 0, 21, - /* 860 */ 82, 0, 38, 225, 72, 72, 35, 278, 76, 76, - /* 870 */ 1, 2, 34, 38, 249, 184, 185, 22, 72, 48, - /* 880 */ 22, 256, 76, 22, 226, 169, 72, 249, 219, 72, - /* 890 */ 76, 266, 72, 76, 256, 270, 76, 72, 238, 72, - /* 900 */ 275, 76, 72, 76, 266, 72, 76, 334, 270, 76, - /* 910 */ 325, 259, 282, 288, 289, 290, 291, 292, 293, 72, - /* 920 */ 295, 72, 319, 76, 228, 76, 288, 289, 290, 291, - /* 930 */ 292, 293, 312, 295, 110, 287, 298, 249, 72, 314, - /* 940 */ 302, 303, 76, 112, 225, 110, 328, 38, 315, 36, - /* 950 */ 33, 72, 327, 36, 72, 76, 331, 20, 76, 42, - /* 960 */ 231, 44, 45, 46, 47, 283, 57, 235, 249, 38, - /* 970 */ 276, 231, 141, 142, 143, 256, 145, 231, 146, 264, - /* 980 */ 121, 150, 134, 262, 262, 266, 231, 20, 280, 270, - /* 990 */ 233, 74, 266, 162, 77, 164, 225, 166, 167, 168, - /* 1000 */ 20, 274, 233, 256, 20, 267, 233, 288, 289, 290, - /* 1010 */ 291, 292, 293, 233, 295, 231, 233, 298, 20, 19, - /* 1020 */ 249, 302, 303, 227, 249, 249, 231, 256, 249, 227, - /* 1030 */ 199, 249, 57, 33, 249, 249, 36, 266, 249, 249, - /* 1040 */ 249, 270, 42, 249, 44, 45, 46, 47, 249, 230, - /* 1050 */ 280, 225, 135, 155, 137, 274, 139, 270, 230, 288, - /* 1060 */ 289, 290, 291, 292, 293, 294, 295, 296, 297, 266, - /* 1070 */ 230, 256, 267, 156, 74, 249, 279, 77, 20, 207, - /* 1080 */ 230, 271, 256, 324, 206, 287, 270, 324, 214, 271, - /* 1090 */ 213, 270, 266, 270, 202, 201, 270, 198, 256, 20, - /* 1100 */ 225, 221, 121, 335, 218, 216, 305, 107, 286, 321, - /* 1110 */ 75, 270, 301, 270, 288, 289, 290, 291, 292, 293, - /* 1120 */ 320, 295, 318, 271, 249, 317, 137, 271, 245, 256, - /* 1130 */ 270, 256, 268, 230, 267, 230, 136, 330, 329, 139, - /* 1140 */ 256, 266, 75, 252, 230, 270, 239, 231, 227, 281, - /* 1150 */ 232, 243, 225, 277, 154, 243, 156, 223, 332, 333, - /* 1160 */ 231, 0, 0, 288, 289, 290, 291, 292, 293, 64, - /* 1170 */ 295, 0, 38, 298, 165, 38, 249, 38, 303, 38, - /* 1180 */ 165, 0, 225, 256, 38, 256, 38, 165, 0, 38, - /* 1190 */ 0, 0, 38, 266, 75, 152, 151, 270, 110, 148, - /* 1200 */ 273, 0, 0, 53, 275, 144, 249, 0, 0, 87, - /* 1210 */ 0, 0, 0, 256, 121, 288, 289, 290, 291, 292, - /* 1220 */ 293, 292, 295, 266, 0, 0, 0, 270, 0, 0, - /* 1230 */ 0, 0, 0, 225, 0, 0, 307, 308, 309, 0, - /* 1240 */ 311, 0, 0, 314, 0, 288, 289, 290, 291, 292, - /* 1250 */ 293, 0, 295, 0, 0, 0, 327, 249, 0, 0, - /* 1260 */ 331, 0, 22, 225, 256, 0, 0, 0, 0, 0, - /* 1270 */ 0, 0, 0, 0, 266, 82, 43, 0, 270, 0, - /* 1280 */ 0, 273, 36, 38, 36, 38, 43, 249, 51, 0, - /* 1290 */ 333, 225, 43, 43, 256, 38, 288, 289, 290, 291, - /* 1300 */ 292, 293, 0, 295, 266, 43, 0, 0, 270, 0, - /* 1310 */ 36, 0, 22, 0, 38, 249, 38, 36, 0, 22, - /* 1320 */ 84, 38, 256, 38, 72, 38, 288, 289, 290, 291, - /* 1330 */ 292, 293, 266, 295, 38, 297, 270, 38, 38, 273, - /* 1340 */ 225, 38, 12, 13, 0, 0, 22, 39, 22, 22, - /* 1350 */ 38, 0, 22, 22, 288, 289, 290, 291, 292, 293, - /* 1360 */ 72, 295, 0, 22, 249, 38, 20, 0, 38, 0, - /* 1370 */ 38, 256, 153, 0, 22, 137, 0, 0, 225, 75, - /* 1380 */ 43, 266, 72, 203, 57, 270, 72, 57, 273, 225, - /* 1390 */ 203, 76, 72, 76, 75, 197, 140, 75, 135, 203, - /* 1400 */ 140, 76, 249, 288, 289, 290, 291, 292, 293, 256, - /* 1410 */ 295, 76, 72, 249, 75, 87, 87, 75, 38, 266, - /* 1420 */ 256, 72, 140, 270, 76, 98, 72, 72, 98, 76, - /* 1430 */ 266, 38, 38, 38, 270, 38, 38, 110, 2, 225, - /* 1440 */ 110, 288, 289, 290, 291, 292, 293, 87, 295, 75, - /* 1450 */ 72, 76, 288, 289, 290, 291, 292, 293, 76, 295, - /* 1460 */ 169, 75, 75, 249, 76, 75, 87, 22, 87, 171, - /* 1470 */ 256, 75, 138, 0, 75, 148, 76, 76, 148, 75, - /* 1480 */ 266, 75, 43, 75, 270, 135, 75, 85, 22, 225, - /* 1490 */ 87, 76, 38, 38, 87, 86, 169, 170, 75, 169, - /* 1500 */ 225, 76, 288, 289, 290, 291, 292, 293, 38, 295, - /* 1510 */ 75, 22, 38, 249, 76, 75, 38, 76, 75, 38, - /* 1520 */ 256, 100, 76, 75, 249, 88, 100, 100, 100, 38, - /* 1530 */ 266, 256, 75, 75, 270, 75, 38, 22, 51, 110, - /* 1540 */ 50, 266, 38, 57, 73, 270, 38, 72, 225, 38, - /* 1550 */ 38, 38, 288, 289, 290, 291, 292, 293, 38, 295, - /* 1560 */ 38, 225, 4, 288, 289, 290, 291, 292, 293, 38, - /* 1570 */ 295, 22, 249, 57, 38, 38, 38, 19, 38, 256, - /* 1580 */ 38, 38, 38, 38, 0, 249, 38, 36, 0, 266, - /* 1590 */ 43, 33, 256, 270, 36, 38, 36, 43, 0, 41, - /* 1600 */ 38, 36, 266, 0, 43, 47, 270, 38, 36, 43, - /* 1610 */ 0, 288, 289, 290, 291, 292, 293, 38, 295, 37, - /* 1620 */ 0, 0, 22, 21, 288, 289, 290, 291, 292, 293, - /* 1630 */ 225, 295, 74, 22, 22, 77, 21, 20, 336, 225, - /* 1640 */ 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - /* 1650 */ 336, 336, 336, 336, 249, 336, 336, 336, 336, 336, - /* 1660 */ 336, 256, 336, 249, 336, 336, 336, 336, 336, 336, - /* 1670 */ 256, 266, 336, 336, 336, 270, 336, 336, 336, 336, - /* 1680 */ 266, 336, 336, 336, 270, 336, 336, 336, 336, 225, - /* 1690 */ 336, 336, 336, 288, 289, 290, 291, 292, 293, 336, - /* 1700 */ 295, 336, 288, 289, 290, 291, 292, 293, 336, 295, - /* 1710 */ 336, 336, 336, 249, 336, 336, 336, 336, 336, 336, - /* 1720 */ 256, 336, 336, 336, 336, 336, 336, 336, 336, 336, - /* 1730 */ 266, 336, 336, 336, 270, 336, 336, 336, 336, 225, - /* 1740 */ 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - /* 1750 */ 225, 336, 288, 289, 290, 291, 292, 293, 336, 295, - /* 1760 */ 336, 336, 336, 249, 336, 336, 336, 336, 336, 336, - /* 1770 */ 256, 336, 336, 336, 249, 336, 336, 336, 336, 336, - /* 1780 */ 266, 256, 336, 336, 270, 336, 336, 336, 336, 336, - /* 1790 */ 336, 266, 336, 336, 336, 270, 336, 336, 225, 336, - /* 1800 */ 336, 336, 288, 289, 290, 291, 292, 293, 336, 295, - /* 1810 */ 336, 225, 336, 288, 289, 290, 291, 292, 293, 336, - /* 1820 */ 295, 336, 249, 336, 336, 336, 336, 336, 336, 256, - /* 1830 */ 336, 336, 336, 336, 336, 249, 336, 336, 336, 266, - /* 1840 */ 336, 336, 256, 270, 336, 336, 336, 336, 336, 336, - /* 1850 */ 336, 336, 266, 336, 336, 336, 270, 336, 336, 336, - /* 1860 */ 336, 288, 289, 290, 291, 292, 293, 336, 295, 336, - /* 1870 */ 336, 336, 336, 336, 288, 289, 290, 291, 292, 293, - /* 1880 */ 225, 295, 336, 336, 336, 336, 336, 336, 336, 225, - /* 1890 */ 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - /* 1900 */ 336, 336, 336, 336, 249, 336, 336, 336, 336, 336, - /* 1910 */ 336, 256, 336, 249, 336, 336, 336, 336, 336, 336, - /* 1920 */ 256, 266, 336, 336, 336, 270, 336, 336, 336, 336, - /* 1930 */ 266, 336, 336, 336, 270, 336, 336, 336, 336, 336, - /* 1940 */ 336, 336, 336, 288, 289, 290, 291, 292, 293, 336, - /* 1950 */ 295, 336, 288, 289, 290, 291, 292, 293, 336, 295, + /* 0 */ 240, 324, 234, 265, 262, 275, 285, 262, 278, 249, + /* 10 */ 272, 281, 12, 13, 337, 259, 256, 4, 341, 240, + /* 20 */ 20, 279, 22, 258, 279, 265, 258, 243, 249, 264, + /* 30 */ 240, 247, 19, 265, 269, 256, 294, 295, 38, 294, + /* 40 */ 295, 309, 310, 275, 265, 324, 33, 279, 279, 36, + /* 50 */ 50, 12, 13, 14, 41, 265, 20, 57, 337, 20, + /* 60 */ 47, 22, 341, 294, 295, 242, 298, 299, 300, 301, + /* 70 */ 302, 303, 20, 305, 4, 75, 308, 38, 255, 240, + /* 80 */ 312, 313, 314, 14, 15, 16, 263, 74, 249, 50, + /* 90 */ 77, 242, 302, 20, 326, 267, 57, 250, 98, 0, + /* 100 */ 332, 333, 274, 275, 265, 258, 316, 317, 318, 319, + /* 110 */ 110, 321, 263, 266, 75, 0, 89, 90, 91, 92, + /* 120 */ 93, 94, 95, 96, 97, 98, 99, 75, 101, 102, + /* 130 */ 103, 104, 105, 106, 1, 2, 21, 98, 20, 24, + /* 140 */ 25, 26, 27, 28, 29, 30, 31, 32, 75, 110, + /* 150 */ 150, 52, 53, 54, 55, 56, 49, 58, 59, 60, + /* 160 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + /* 170 */ 71, 171, 172, 239, 174, 175, 176, 177, 178, 179, + /* 180 */ 180, 181, 182, 183, 184, 185, 186, 187, 188, 150, + /* 190 */ 22, 258, 250, 52, 260, 54, 285, 231, 265, 58, + /* 200 */ 258, 201, 61, 20, 63, 64, 38, 66, 266, 76, + /* 210 */ 171, 172, 71, 174, 175, 176, 177, 178, 179, 180, + /* 220 */ 181, 182, 183, 184, 185, 186, 187, 188, 12, 13, + /* 230 */ 61, 234, 21, 300, 65, 324, 20, 18, 22, 20, + /* 240 */ 12, 13, 14, 15, 16, 34, 27, 324, 337, 30, + /* 250 */ 296, 285, 341, 201, 38, 258, 0, 88, 39, 258, + /* 260 */ 337, 149, 265, 151, 341, 264, 50, 12, 13, 240, + /* 270 */ 269, 201, 275, 57, 320, 20, 279, 22, 249, 201, + /* 280 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 234, + /* 290 */ 324, 75, 20, 38, 265, 298, 299, 300, 301, 302, + /* 300 */ 303, 240, 305, 337, 76, 308, 257, 341, 75, 312, + /* 310 */ 313, 314, 57, 201, 98, 171, 258, 268, 85, 201, + /* 320 */ 323, 74, 264, 140, 159, 160, 110, 269, 163, 82, + /* 330 */ 75, 270, 113, 35, 279, 116, 117, 118, 119, 120, + /* 340 */ 43, 122, 123, 124, 125, 126, 127, 128, 129, 130, + /* 350 */ 131, 132, 133, 98, 210, 211, 212, 213, 214, 61, + /* 360 */ 20, 20, 22, 65, 21, 110, 150, 24, 25, 26, + /* 370 */ 27, 28, 29, 30, 31, 32, 78, 234, 80, 81, + /* 380 */ 40, 83, 138, 233, 3, 235, 88, 171, 172, 142, + /* 390 */ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + /* 400 */ 184, 185, 186, 187, 188, 150, 0, 2, 250, 12, + /* 410 */ 13, 14, 15, 16, 0, 49, 258, 12, 13, 14, + /* 420 */ 15, 16, 279, 20, 266, 251, 171, 172, 254, 174, + /* 430 */ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + /* 440 */ 185, 186, 187, 188, 12, 13, 14, 50, 2, 134, + /* 450 */ 206, 207, 20, 240, 22, 234, 201, 38, 12, 13, + /* 460 */ 14, 15, 16, 237, 238, 240, 52, 61, 54, 154, + /* 470 */ 38, 65, 58, 76, 249, 61, 57, 63, 64, 258, + /* 480 */ 66, 84, 146, 12, 13, 71, 265, 244, 245, 57, + /* 490 */ 265, 20, 20, 22, 88, 234, 275, 200, 285, 275, + /* 500 */ 279, 165, 240, 234, 189, 281, 285, 75, 234, 38, + /* 510 */ 20, 249, 234, 107, 108, 109, 240, 111, 234, 298, + /* 520 */ 299, 300, 301, 302, 303, 249, 305, 265, 57, 308, + /* 530 */ 98, 134, 258, 312, 313, 240, 67, 324, 239, 265, + /* 540 */ 279, 265, 110, 140, 249, 324, 75, 258, 279, 275, + /* 550 */ 337, 154, 253, 279, 341, 266, 282, 279, 337, 260, + /* 560 */ 265, 86, 341, 279, 12, 13, 14, 15, 16, 98, + /* 570 */ 47, 240, 298, 299, 300, 301, 302, 303, 234, 305, + /* 580 */ 249, 110, 150, 114, 115, 234, 189, 190, 191, 192, + /* 590 */ 193, 194, 195, 196, 197, 198, 265, 74, 217, 234, + /* 600 */ 77, 244, 245, 171, 172, 57, 174, 175, 176, 177, + /* 610 */ 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + /* 620 */ 188, 150, 234, 279, 234, 12, 13, 14, 15, 16, + /* 630 */ 279, 72, 234, 12, 13, 14, 15, 16, 0, 244, + /* 640 */ 245, 4, 171, 172, 279, 174, 175, 176, 177, 178, + /* 650 */ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + /* 660 */ 12, 13, 234, 50, 296, 234, 296, 279, 20, 279, + /* 670 */ 22, 12, 13, 14, 15, 16, 240, 279, 12, 13, + /* 680 */ 14, 15, 16, 12, 13, 259, 38, 49, 320, 258, + /* 690 */ 320, 0, 75, 22, 240, 143, 265, 84, 246, 240, + /* 700 */ 248, 265, 240, 249, 87, 57, 275, 279, 249, 38, + /* 710 */ 279, 249, 244, 245, 274, 275, 240, 259, 234, 265, + /* 720 */ 234, 285, 259, 75, 265, 249, 234, 265, 57, 298, + /* 730 */ 299, 300, 301, 302, 303, 76, 305, 259, 302, 308, + /* 740 */ 49, 265, 258, 312, 313, 314, 98, 134, 234, 265, + /* 750 */ 234, 161, 162, 317, 318, 319, 234, 321, 110, 275, + /* 760 */ 324, 140, 72, 279, 333, 279, 76, 154, 234, 98, + /* 770 */ 234, 279, 14, 337, 222, 199, 200, 341, 20, 258, + /* 780 */ 221, 110, 298, 299, 300, 301, 302, 303, 14, 305, + /* 790 */ 269, 72, 308, 279, 20, 279, 312, 313, 150, 1, + /* 800 */ 2, 279, 189, 190, 191, 192, 193, 194, 195, 196, + /* 810 */ 197, 198, 259, 279, 0, 279, 234, 140, 141, 171, + /* 820 */ 172, 150, 174, 175, 176, 177, 178, 179, 180, 181, + /* 830 */ 182, 183, 184, 185, 186, 187, 188, 0, 18, 202, + /* 840 */ 258, 79, 171, 23, 82, 0, 79, 265, 234, 82, + /* 850 */ 36, 79, 0, 22, 82, 35, 79, 275, 72, 82, + /* 860 */ 72, 279, 76, 259, 76, 186, 187, 22, 48, 38, + /* 870 */ 0, 72, 258, 72, 22, 76, 50, 76, 235, 265, + /* 880 */ 298, 299, 300, 301, 302, 303, 288, 305, 57, 275, + /* 890 */ 308, 247, 22, 279, 312, 313, 314, 72, 61, 72, + /* 900 */ 72, 76, 65, 76, 76, 323, 72, 72, 344, 335, + /* 910 */ 76, 76, 298, 299, 300, 301, 302, 303, 268, 305, + /* 920 */ 72, 38, 308, 38, 76, 88, 312, 313, 314, 98, + /* 930 */ 329, 72, 112, 292, 237, 76, 38, 323, 219, 72, + /* 940 */ 322, 110, 297, 76, 107, 108, 109, 72, 111, 72, + /* 950 */ 240, 76, 72, 76, 72, 57, 76, 258, 76, 325, + /* 960 */ 338, 20, 240, 143, 144, 145, 36, 147, 234, 293, + /* 970 */ 38, 244, 152, 286, 121, 265, 240, 234, 148, 240, + /* 980 */ 273, 150, 271, 134, 164, 271, 166, 240, 168, 169, + /* 990 */ 170, 20, 258, 110, 290, 110, 242, 171, 275, 265, + /* 1000 */ 20, 258, 171, 172, 283, 242, 265, 20, 265, 275, + /* 1010 */ 242, 276, 302, 279, 20, 242, 240, 242, 275, 285, + /* 1020 */ 236, 201, 279, 258, 258, 240, 236, 317, 318, 319, + /* 1030 */ 57, 321, 298, 299, 300, 301, 302, 303, 234, 305, + /* 1040 */ 258, 298, 299, 300, 301, 302, 303, 258, 305, 258, + /* 1050 */ 258, 308, 258, 258, 258, 312, 313, 279, 324, 19, + /* 1060 */ 258, 258, 258, 276, 240, 157, 20, 297, 239, 265, + /* 1070 */ 290, 337, 289, 33, 265, 341, 36, 239, 239, 275, + /* 1080 */ 275, 239, 42, 279, 44, 45, 46, 47, 209, 265, + /* 1090 */ 283, 334, 234, 280, 208, 279, 215, 280, 334, 330, + /* 1100 */ 279, 279, 298, 299, 300, 301, 302, 303, 304, 305, + /* 1110 */ 306, 307, 216, 204, 74, 203, 258, 77, 200, 265, + /* 1120 */ 20, 328, 121, 265, 234, 315, 302, 327, 331, 296, + /* 1130 */ 223, 220, 218, 275, 75, 280, 279, 279, 277, 279, + /* 1140 */ 234, 317, 318, 319, 280, 321, 137, 107, 258, 265, + /* 1150 */ 339, 345, 340, 279, 311, 265, 298, 299, 300, 301, + /* 1160 */ 302, 303, 239, 305, 258, 275, 239, 276, 265, 279, + /* 1170 */ 254, 265, 75, 248, 261, 240, 136, 239, 236, 139, + /* 1180 */ 287, 275, 232, 291, 284, 279, 252, 241, 298, 299, + /* 1190 */ 300, 301, 302, 303, 0, 305, 156, 252, 158, 234, + /* 1200 */ 342, 343, 0, 64, 298, 299, 300, 301, 302, 303, + /* 1210 */ 38, 305, 234, 0, 308, 167, 38, 38, 38, 313, + /* 1220 */ 167, 0, 38, 258, 38, 167, 336, 0, 38, 0, + /* 1230 */ 265, 38, 0, 75, 154, 153, 258, 110, 150, 0, + /* 1240 */ 275, 0, 53, 265, 279, 146, 0, 0, 87, 0, + /* 1250 */ 0, 0, 0, 275, 0, 0, 0, 279, 121, 0, + /* 1260 */ 282, 0, 0, 298, 299, 300, 301, 302, 303, 234, + /* 1270 */ 305, 43, 0, 51, 0, 22, 298, 299, 300, 301, + /* 1280 */ 302, 303, 0, 305, 0, 0, 0, 0, 0, 0, + /* 1290 */ 0, 0, 0, 258, 0, 0, 0, 0, 0, 0, + /* 1300 */ 265, 0, 0, 0, 0, 0, 0, 0, 343, 43, + /* 1310 */ 275, 38, 36, 0, 279, 38, 36, 234, 43, 0, + /* 1320 */ 0, 38, 43, 0, 43, 0, 0, 0, 84, 36, + /* 1330 */ 82, 0, 72, 298, 299, 300, 301, 302, 303, 72, + /* 1340 */ 305, 258, 307, 22, 36, 0, 234, 38, 265, 38, + /* 1350 */ 38, 22, 38, 38, 38, 38, 38, 0, 275, 22, + /* 1360 */ 38, 0, 279, 39, 22, 282, 38, 0, 22, 0, + /* 1370 */ 258, 22, 20, 0, 140, 0, 38, 265, 155, 137, + /* 1380 */ 22, 298, 299, 300, 301, 302, 303, 275, 305, 0, + /* 1390 */ 0, 279, 33, 43, 282, 36, 234, 140, 0, 135, + /* 1400 */ 205, 42, 72, 44, 45, 46, 47, 75, 72, 76, + /* 1410 */ 298, 299, 300, 301, 302, 303, 72, 305, 199, 205, + /* 1420 */ 258, 205, 87, 76, 76, 38, 75, 265, 75, 75, + /* 1430 */ 75, 2, 72, 74, 72, 234, 77, 275, 72, 76, + /* 1440 */ 76, 279, 38, 87, 234, 38, 76, 38, 72, 38, + /* 1450 */ 38, 72, 87, 76, 76, 75, 75, 22, 87, 258, + /* 1460 */ 298, 299, 300, 301, 302, 303, 265, 305, 258, 0, + /* 1470 */ 76, 171, 75, 87, 75, 265, 275, 75, 138, 76, + /* 1480 */ 279, 76, 43, 173, 22, 275, 85, 87, 75, 279, + /* 1490 */ 75, 75, 234, 75, 135, 87, 137, 75, 139, 298, + /* 1500 */ 299, 300, 301, 302, 303, 234, 305, 135, 298, 299, + /* 1510 */ 300, 301, 302, 303, 86, 305, 258, 158, 38, 76, + /* 1520 */ 38, 75, 38, 265, 76, 75, 38, 76, 75, 258, + /* 1530 */ 76, 38, 75, 275, 76, 38, 265, 279, 75, 22, + /* 1540 */ 100, 100, 75, 88, 100, 100, 275, 38, 110, 75, + /* 1550 */ 279, 75, 38, 22, 51, 50, 298, 299, 300, 301, + /* 1560 */ 302, 303, 38, 305, 57, 73, 72, 38, 234, 298, + /* 1570 */ 299, 300, 301, 302, 303, 38, 305, 234, 38, 38, + /* 1580 */ 38, 38, 38, 22, 57, 38, 38, 38, 38, 0, + /* 1590 */ 38, 38, 258, 38, 38, 38, 36, 43, 0, 265, + /* 1600 */ 38, 258, 36, 0, 36, 38, 43, 43, 265, 275, + /* 1610 */ 0, 38, 36, 279, 43, 0, 234, 38, 275, 37, + /* 1620 */ 0, 0, 279, 22, 22, 21, 21, 234, 22, 20, + /* 1630 */ 346, 346, 298, 299, 300, 301, 302, 303, 346, 305, + /* 1640 */ 258, 298, 299, 300, 301, 302, 303, 265, 305, 346, + /* 1650 */ 346, 258, 346, 346, 346, 346, 346, 275, 265, 346, + /* 1660 */ 346, 279, 346, 346, 346, 346, 346, 346, 275, 346, + /* 1670 */ 346, 346, 279, 346, 346, 346, 234, 346, 346, 346, + /* 1680 */ 298, 299, 300, 301, 302, 303, 346, 305, 346, 346, + /* 1690 */ 346, 298, 299, 300, 301, 302, 303, 346, 305, 346, + /* 1700 */ 258, 346, 346, 346, 346, 346, 346, 265, 346, 346, + /* 1710 */ 346, 346, 346, 346, 346, 234, 346, 275, 346, 346, + /* 1720 */ 346, 279, 346, 346, 234, 346, 346, 346, 346, 346, + /* 1730 */ 346, 346, 346, 234, 346, 346, 346, 346, 346, 258, + /* 1740 */ 298, 299, 300, 301, 302, 303, 265, 305, 258, 346, + /* 1750 */ 346, 346, 346, 346, 346, 265, 275, 258, 346, 346, + /* 1760 */ 279, 346, 346, 346, 265, 275, 346, 346, 346, 279, + /* 1770 */ 346, 346, 234, 346, 275, 346, 346, 346, 279, 298, + /* 1780 */ 299, 300, 301, 302, 303, 234, 305, 346, 298, 299, + /* 1790 */ 300, 301, 302, 303, 346, 305, 258, 298, 299, 300, + /* 1800 */ 301, 302, 303, 265, 305, 346, 346, 346, 346, 258, + /* 1810 */ 346, 346, 346, 275, 346, 346, 265, 279, 346, 346, + /* 1820 */ 346, 346, 346, 346, 346, 346, 275, 346, 346, 346, + /* 1830 */ 279, 346, 346, 346, 234, 346, 298, 299, 300, 301, + /* 1840 */ 302, 303, 346, 305, 346, 346, 346, 346, 346, 298, + /* 1850 */ 299, 300, 301, 302, 303, 346, 305, 346, 258, 346, + /* 1860 */ 346, 346, 346, 346, 346, 265, 346, 346, 346, 346, + /* 1870 */ 346, 346, 346, 346, 346, 275, 346, 346, 346, 279, + /* 1880 */ 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, + /* 1890 */ 346, 346, 346, 346, 346, 346, 346, 346, 298, 299, + /* 1900 */ 300, 301, 302, 303, 346, 305, }; -#define YY_SHIFT_COUNT (571) +#define YY_SHIFT_COUNT (573) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (1621) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 831, 0, 39, 214, 214, 214, 214, 253, 214, 214, - /* 10 */ 428, 467, 642, 467, 467, 467, 467, 467, 467, 467, - /* 20 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 30 */ 467, 467, 467, 467, 467, 467, 71, 383, 383, 383, - /* 40 */ 139, 1330, 1330, 110, 42, 42, 29, 1330, 348, 42, - /* 50 */ 42, 42, 42, 42, 42, 52, 42, 98, 140, 29, - /* 60 */ 142, 98, 42, 42, 98, 42, 98, 142, 98, 98, - /* 70 */ 42, 193, 217, 179, 393, 393, 389, 1327, 421, 187, - /* 80 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, - /* 90 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 665, - /* 100 */ 327, 109, 109, 360, 360, 360, 667, 109, 109, 312, - /* 110 */ 142, 98, 142, 98, 422, 345, 741, 741, 741, 741, - /* 120 */ 741, 741, 741, 1000, 444, 564, 480, 111, 396, 120, - /* 130 */ 27, 681, 546, 597, 342, 597, 687, 478, 264, 777, - /* 140 */ 937, 913, 931, 832, 937, 937, 859, 848, 848, 937, - /* 150 */ 967, 52, 142, 980, 52, 312, 984, 52, 52, 937, - /* 160 */ 52, 998, 98, 98, 98, 98, 98, 98, 98, 98, - /* 170 */ 98, 98, 98, 937, 998, 975, 967, 193, 898, 142, - /* 180 */ 193, 980, 193, 312, 984, 193, 1058, 872, 878, 975, - /* 190 */ 872, 878, 975, 975, 874, 877, 892, 894, 899, 312, - /* 200 */ 1079, 981, 880, 886, 889, 1035, 98, 878, 975, 975, - /* 210 */ 878, 975, 989, 312, 984, 193, 422, 193, 312, 1067, - /* 220 */ 345, 937, 193, 998, 1960, 1960, 1960, 1960, 1960, 1960, - /* 230 */ 718, 917, 329, 1558, 47, 483, 503, 272, 280, 661, - /* 240 */ 734, 11, 11, 11, 11, 11, 11, 11, 11, 94, - /* 250 */ 505, 196, 409, 283, 283, 283, 283, 595, 571, 373, - /* 260 */ 547, 657, 774, 778, 855, 858, 861, 838, 645, 737, - /* 270 */ 792, 793, 869, 691, 332, 669, 806, 716, 814, 754, - /* 280 */ 817, 820, 825, 827, 830, 824, 835, 833, 847, 849, - /* 290 */ 866, 879, 882, 125, 909, 1161, 1162, 1105, 1171, 1134, - /* 300 */ 1009, 1137, 1139, 1141, 1015, 1181, 1146, 1148, 1022, 1188, - /* 310 */ 1151, 1190, 1154, 1191, 1119, 1043, 1045, 1088, 1051, 1201, - /* 320 */ 1202, 1150, 1061, 1207, 1208, 1122, 1210, 1211, 1212, 1224, - /* 330 */ 1225, 1226, 1228, 1229, 1230, 1231, 1232, 1234, 1235, 1239, - /* 340 */ 1241, 1242, 1244, 1093, 1251, 1253, 1254, 1255, 1258, 1259, - /* 350 */ 1240, 1261, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, - /* 360 */ 1233, 1273, 1237, 1277, 1279, 1245, 1246, 1243, 1280, 1247, - /* 370 */ 1248, 1249, 1289, 1257, 1274, 1250, 1302, 1278, 1281, 1262, - /* 380 */ 1306, 1307, 1309, 1311, 1236, 1193, 1276, 1252, 1288, 1290, - /* 390 */ 1313, 1283, 1285, 1287, 1296, 1299, 1252, 1288, 1300, 1303, - /* 400 */ 1318, 1297, 1344, 1324, 1308, 1345, 1326, 1312, 1351, 1331, - /* 410 */ 1362, 1341, 1346, 1367, 1256, 1332, 1369, 1219, 1352, 1260, - /* 420 */ 1238, 1373, 1376, 1282, 1377, 1304, 1337, 1263, 1310, 1314, - /* 430 */ 1180, 1315, 1320, 1317, 1319, 1322, 1339, 1325, 1340, 1328, - /* 440 */ 1342, 1349, 1187, 1335, 1348, 1329, 1198, 1354, 1360, 1353, - /* 450 */ 1355, 1196, 1380, 1393, 1394, 1395, 1397, 1398, 1436, 1291, - /* 460 */ 1378, 1375, 1374, 1382, 1386, 1388, 1379, 1387, 1390, 1381, - /* 470 */ 1445, 1298, 1396, 1400, 1401, 1399, 1404, 1334, 1406, 1473, - /* 480 */ 1439, 1350, 1408, 1402, 1403, 1407, 1466, 1411, 1409, 1415, - /* 490 */ 1454, 1455, 1423, 1425, 1470, 1435, 1438, 1474, 1440, 1441, - /* 500 */ 1478, 1443, 1446, 1481, 1448, 1421, 1426, 1427, 1428, 1489, - /* 510 */ 1437, 1457, 1491, 1429, 1458, 1460, 1498, 1252, 1288, 1515, - /* 520 */ 1487, 1490, 1504, 1486, 1471, 1475, 1508, 1511, 1512, 1513, - /* 530 */ 1520, 1522, 1531, 1549, 1516, 1252, 1536, 1288, 1537, 1538, - /* 540 */ 1540, 1542, 1543, 1544, 1545, 1584, 1548, 1551, 1547, 1588, - /* 550 */ 1557, 1560, 1554, 1598, 1562, 1565, 1561, 1603, 1569, 1572, - /* 560 */ 1566, 1610, 1579, 1582, 1620, 1621, 1600, 1602, 1611, 1612, - /* 570 */ 1615, 1617, + /* 0 */ 820, 0, 39, 216, 216, 216, 216, 255, 216, 216, + /* 10 */ 432, 471, 648, 471, 471, 471, 471, 471, 471, 471, + /* 20 */ 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, + /* 30 */ 471, 471, 471, 471, 471, 471, 52, 73, 73, 73, + /* 40 */ 118, 671, 671, 112, 36, 36, 78, 671, 70, 36, + /* 50 */ 36, 36, 36, 36, 36, 107, 36, 272, 341, 78, + /* 60 */ 472, 272, 36, 36, 272, 36, 272, 472, 272, 272, + /* 70 */ 36, 366, 219, 397, 613, 613, 343, 831, 298, 141, + /* 80 */ 831, 831, 831, 831, 831, 831, 831, 831, 831, 831, + /* 90 */ 831, 831, 831, 831, 831, 831, 831, 831, 831, 340, + /* 100 */ 638, 419, 419, 183, 183, 183, 691, 419, 419, 490, + /* 110 */ 472, 272, 472, 272, 475, 548, 27, 27, 27, 27, + /* 120 */ 27, 27, 27, 1040, 115, 414, 552, 144, 169, 165, + /* 130 */ 244, 168, 403, 576, 297, 576, 758, 381, 637, 774, + /* 140 */ 941, 930, 932, 830, 941, 941, 853, 849, 849, 941, + /* 150 */ 971, 107, 472, 980, 107, 490, 987, 107, 107, 941, + /* 160 */ 107, 994, 272, 272, 272, 272, 272, 272, 272, 272, + /* 170 */ 272, 272, 272, 941, 994, 973, 971, 366, 908, 472, + /* 180 */ 366, 980, 366, 490, 987, 366, 1046, 879, 886, 973, + /* 190 */ 879, 886, 973, 973, 896, 881, 909, 912, 918, 490, + /* 200 */ 1100, 1001, 907, 911, 914, 1059, 272, 886, 973, 973, + /* 210 */ 886, 973, 1009, 490, 987, 366, 475, 366, 490, 1097, + /* 220 */ 548, 941, 366, 994, 1906, 1906, 1906, 1906, 1906, 1906, + /* 230 */ 1906, 99, 1359, 256, 13, 406, 837, 228, 405, 446, + /* 240 */ 621, 659, 666, 666, 666, 666, 666, 666, 666, 666, + /* 250 */ 523, 469, 247, 133, 315, 69, 69, 69, 69, 814, + /* 260 */ 336, 690, 762, 767, 772, 777, 845, 852, 870, 211, + /* 270 */ 590, 677, 786, 788, 799, 798, 679, 719, 559, 801, + /* 280 */ 826, 825, 617, 827, 828, 834, 835, 848, 883, 885, + /* 290 */ 859, 867, 875, 877, 880, 882, 233, 898, 1194, 1202, + /* 300 */ 1139, 1213, 1172, 1048, 1178, 1179, 1180, 1053, 1221, 1184, + /* 310 */ 1186, 1058, 1227, 1190, 1229, 1193, 1232, 1158, 1080, 1082, + /* 320 */ 1127, 1088, 1239, 1241, 1189, 1099, 1246, 1247, 1161, 1249, + /* 330 */ 1250, 1251, 1252, 1254, 1255, 1256, 1261, 1262, 1282, 1284, + /* 340 */ 1285, 1286, 1287, 1288, 1289, 1290, 1137, 1259, 1291, 1292, + /* 350 */ 1294, 1295, 1296, 1253, 1297, 1298, 1299, 1301, 1302, 1303, + /* 360 */ 1304, 1305, 1306, 1228, 1272, 1222, 1274, 1307, 1273, 1276, + /* 370 */ 1266, 1313, 1277, 1280, 1275, 1319, 1283, 1293, 1279, 1320, + /* 380 */ 1309, 1308, 1281, 1323, 1325, 1326, 1327, 1244, 1248, 1311, + /* 390 */ 1260, 1267, 1321, 1331, 1312, 1314, 1315, 1316, 1317, 1260, + /* 400 */ 1267, 1318, 1322, 1345, 1329, 1357, 1337, 1324, 1361, 1342, + /* 410 */ 1328, 1367, 1346, 1369, 1349, 1352, 1373, 1234, 1338, 1375, + /* 420 */ 1223, 1358, 1257, 1242, 1389, 1390, 1398, 1332, 1350, 1264, + /* 430 */ 1330, 1336, 1195, 1333, 1344, 1347, 1351, 1353, 1354, 1348, + /* 440 */ 1360, 1335, 1355, 1362, 1214, 1363, 1364, 1356, 1219, 1366, + /* 450 */ 1365, 1370, 1376, 1216, 1387, 1404, 1407, 1409, 1411, 1412, + /* 460 */ 1429, 1300, 1379, 1377, 1380, 1378, 1381, 1394, 1371, 1397, + /* 470 */ 1399, 1386, 1435, 1310, 1402, 1403, 1405, 1413, 1415, 1340, + /* 480 */ 1416, 1469, 1439, 1372, 1418, 1401, 1400, 1408, 1462, 1422, + /* 490 */ 1428, 1443, 1480, 1482, 1446, 1448, 1484, 1450, 1451, 1488, + /* 500 */ 1453, 1454, 1493, 1457, 1458, 1497, 1463, 1440, 1441, 1444, + /* 510 */ 1445, 1517, 1455, 1467, 1509, 1438, 1474, 1476, 1514, 1260, + /* 520 */ 1267, 1531, 1503, 1505, 1524, 1507, 1492, 1494, 1529, 1537, + /* 530 */ 1540, 1541, 1542, 1543, 1544, 1561, 1527, 1260, 1547, 1267, + /* 540 */ 1548, 1549, 1550, 1552, 1553, 1555, 1556, 1589, 1557, 1560, + /* 550 */ 1554, 1598, 1562, 1566, 1563, 1603, 1567, 1568, 1564, 1610, + /* 560 */ 1573, 1576, 1571, 1615, 1579, 1582, 1620, 1621, 1601, 1604, + /* 570 */ 1602, 1606, 1605, 1609, }; -#define YY_REDUCE_COUNT (229) -#define YY_REDUCE_MIN (-273) -#define YY_REDUCE_MAX (1664) +#define YY_REDUCE_COUNT (230) +#define YY_REDUCE_MIN (-323) +#define YY_REDUCE_MAX (1600) static const short yy_reduce_ofst[] = { - /* 0 */ -212, -210, -159, 368, 13, 265, 440, 625, 638, 719, - /* 10 */ 771, 826, 875, 927, -221, 957, 1008, 1038, 1066, 1115, - /* 20 */ 1153, 1164, 1214, 1264, 1275, 1323, 1336, 1405, 1414, 1464, - /* 30 */ 1514, 1525, 1573, 1586, 1655, 1664, 929, -183, -104, 453, - /* 40 */ -125, -253, -251, -211, -226, 266, 50, -241, -273, -118, - /* 50 */ -89, 222, 267, 294, 306, -93, 438, -59, -248, 51, - /* 60 */ -263, 206, 448, 471, -6, 481, 210, -171, 281, 271, - /* 70 */ 452, 16, -224, -200, -200, -200, -208, 154, 59, -198, - /* 80 */ 221, 263, 304, 398, 456, 488, 489, 495, 497, 498, - /* 90 */ 499, 526, 529, 530, 532, 538, 578, 581, 582, 183, - /* 100 */ -178, 275, 316, -10, 4, 289, 10, 397, 462, 276, - /* 110 */ 188, 433, 527, 310, -12, -153, -239, 323, 445, 475, - /* 120 */ 506, 525, 548, 589, 658, 660, 573, 585, 652, 630, - /* 130 */ 603, 696, 648, 620, 620, 620, 688, 618, 633, 688, - /* 140 */ 729, 682, 732, 694, 740, 746, 715, 721, 722, 755, - /* 150 */ 708, 757, 726, 727, 769, 747, 738, 773, 780, 784, - /* 160 */ 783, 796, 775, 776, 779, 782, 785, 786, 789, 790, - /* 170 */ 791, 794, 799, 795, 802, 787, 770, 819, 797, 803, - /* 180 */ 828, 781, 840, 815, 805, 850, 798, 759, 810, 816, - /* 190 */ 763, 818, 821, 823, 788, 800, 804, 808, 620, 842, - /* 200 */ 822, 801, 768, 807, 809, 811, 688, 852, 841, 843, - /* 210 */ 856, 860, 864, 873, 867, 903, 883, 905, 884, 891, - /* 220 */ 907, 916, 914, 921, 876, 868, 908, 912, 918, 934, + /* 0 */ -34, 221, -232, 431, -3, 582, 614, 734, 484, 743, + /* 10 */ 804, 858, 906, 274, 890, 965, 978, 1035, 1083, 1112, + /* 20 */ 1162, 1201, 1210, 1258, 1271, 1334, 1343, 1382, 1393, 1442, + /* 30 */ 1481, 1490, 1499, 1538, 1551, 1600, 436, -210, 710, 824, + /* 40 */ 213, -258, -255, -279, -240, -221, -89, -231, -323, -161, + /* 50 */ 29, 225, 262, 276, 295, -177, 331, -235, -67, -77, + /* 60 */ -270, -153, 454, 459, 1, 462, -58, -172, 58, 158, + /* 70 */ 476, 299, 61, -268, -268, -268, 150, 55, 49, -216, + /* 80 */ 143, 261, 269, 278, 284, 344, 351, 365, 388, 390, + /* 90 */ 398, 428, 486, 492, 514, 516, 522, 534, 536, 226, + /* 100 */ -151, 243, 357, -46, 368, 370, -66, 395, 468, -262, + /* 110 */ 224, 289, 440, 521, 174, 452, -244, 426, 458, 463, + /* 120 */ 478, 553, 604, 598, 643, 644, 564, 574, 650, 641, + /* 130 */ 601, 697, 645, 618, 618, 618, 699, 622, 634, 699, + /* 140 */ 722, 676, 727, 687, 736, 739, 707, 711, 714, 747, + /* 150 */ 704, 754, 723, 721, 763, 741, 735, 768, 773, 776, + /* 160 */ 775, 784, 765, 766, 782, 789, 791, 792, 794, 795, + /* 170 */ 796, 802, 803, 785, 790, 778, 780, 829, 783, 805, + /* 180 */ 838, 807, 839, 809, 787, 842, 770, 757, 813, 816, + /* 190 */ 764, 817, 821, 822, 797, 769, 793, 800, 618, 854, + /* 200 */ 833, 810, 806, 812, 811, 843, 699, 855, 857, 860, + /* 210 */ 864, 874, 861, 884, 891, 923, 916, 927, 903, 913, + /* 220 */ 925, 935, 938, 942, 893, 892, 900, 934, 945, 946, + /* 230 */ 950, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 10 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 20 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 30 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 40 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 50 */ 1287, 1287, 1287, 1287, 1287, 1346, 1287, 1287, 1287, 1287, - /* 60 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 70 */ 1287, 1344, 1489, 1287, 1645, 1287, 1287, 1287, 1287, 1287, - /* 80 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 90 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 100 */ 1346, 1287, 1287, 1656, 1656, 1656, 1344, 1287, 1287, 1287, - /* 110 */ 1287, 1287, 1287, 1287, 1441, 1287, 1287, 1287, 1287, 1287, - /* 120 */ 1287, 1287, 1287, 1523, 1287, 1287, 1721, 1287, 1394, 1529, - /* 130 */ 1680, 1287, 1672, 1648, 1662, 1649, 1287, 1706, 1665, 1287, - /* 140 */ 1287, 1287, 1287, 1515, 1287, 1287, 1494, 1491, 1491, 1287, - /* 150 */ 1287, 1346, 1287, 1287, 1346, 1287, 1287, 1346, 1346, 1287, - /* 160 */ 1346, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 170 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1344, 1525, 1287, - /* 180 */ 1344, 1287, 1344, 1287, 1287, 1344, 1287, 1687, 1685, 1287, - /* 190 */ 1687, 1685, 1287, 1287, 1699, 1695, 1678, 1676, 1662, 1287, - /* 200 */ 1287, 1287, 1724, 1712, 1708, 1287, 1287, 1685, 1287, 1287, - /* 210 */ 1685, 1287, 1502, 1287, 1287, 1344, 1287, 1344, 1287, 1410, - /* 220 */ 1287, 1287, 1344, 1287, 1517, 1531, 1444, 1444, 1347, 1292, - /* 230 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 240 */ 1287, 1592, 1698, 1697, 1621, 1620, 1619, 1617, 1591, 1287, - /* 250 */ 1287, 1287, 1287, 1585, 1586, 1584, 1583, 1287, 1287, 1287, - /* 260 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 270 */ 1287, 1287, 1646, 1287, 1709, 1713, 1287, 1287, 1287, 1569, - /* 280 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 290 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 300 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 310 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 320 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 330 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 340 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 350 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 360 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 370 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 380 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1457, 1456, 1287, - /* 390 */ 1287, 1287, 1287, 1287, 1287, 1287, 1374, 1373, 1287, 1287, - /* 400 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 410 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 420 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1669, 1679, - /* 430 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1569, - /* 440 */ 1287, 1696, 1287, 1655, 1651, 1287, 1287, 1647, 1287, 1287, - /* 450 */ 1707, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1641, 1287, - /* 460 */ 1614, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 470 */ 1287, 1579, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 480 */ 1287, 1287, 1287, 1287, 1568, 1287, 1287, 1287, 1287, 1287, - /* 490 */ 1287, 1287, 1438, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 500 */ 1287, 1287, 1287, 1287, 1287, 1423, 1421, 1420, 1419, 1287, - /* 510 */ 1416, 1287, 1287, 1287, 1287, 1287, 1287, 1447, 1446, 1287, - /* 520 */ 1287, 1287, 1287, 1287, 1287, 1367, 1287, 1287, 1287, 1287, - /* 530 */ 1287, 1287, 1287, 1287, 1287, 1358, 1287, 1357, 1287, 1287, - /* 540 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 550 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 560 */ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - /* 570 */ 1287, 1287, + /* 0 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 10 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 20 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 30 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 40 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 50 */ 1296, 1296, 1296, 1296, 1296, 1355, 1296, 1296, 1296, 1296, + /* 60 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 70 */ 1296, 1353, 1498, 1296, 1658, 1296, 1296, 1296, 1296, 1296, + /* 80 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 90 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 100 */ 1355, 1296, 1296, 1669, 1669, 1669, 1353, 1296, 1296, 1296, + /* 110 */ 1296, 1296, 1296, 1296, 1450, 1296, 1296, 1296, 1296, 1296, + /* 120 */ 1296, 1296, 1296, 1536, 1296, 1296, 1734, 1296, 1403, 1542, + /* 130 */ 1693, 1296, 1685, 1661, 1675, 1662, 1296, 1719, 1678, 1296, + /* 140 */ 1296, 1296, 1296, 1528, 1296, 1296, 1503, 1500, 1500, 1296, + /* 150 */ 1296, 1355, 1296, 1296, 1355, 1296, 1296, 1355, 1355, 1296, + /* 160 */ 1355, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 170 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1353, 1538, 1296, + /* 180 */ 1353, 1296, 1353, 1296, 1296, 1353, 1296, 1700, 1698, 1296, + /* 190 */ 1700, 1698, 1296, 1296, 1712, 1708, 1691, 1689, 1675, 1296, + /* 200 */ 1296, 1296, 1737, 1725, 1721, 1296, 1296, 1698, 1296, 1296, + /* 210 */ 1698, 1296, 1511, 1296, 1296, 1353, 1296, 1353, 1296, 1419, + /* 220 */ 1296, 1296, 1353, 1296, 1530, 1544, 1520, 1453, 1453, 1356, + /* 230 */ 1301, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 240 */ 1296, 1296, 1605, 1711, 1710, 1634, 1633, 1632, 1630, 1604, + /* 250 */ 1296, 1296, 1296, 1296, 1296, 1598, 1599, 1597, 1596, 1296, + /* 260 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 270 */ 1296, 1296, 1296, 1296, 1296, 1659, 1296, 1722, 1726, 1296, + /* 280 */ 1296, 1296, 1582, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 290 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 300 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 310 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 320 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 330 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 340 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 350 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 360 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 370 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 380 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 390 */ 1466, 1465, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1383, + /* 400 */ 1382, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 410 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 420 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 430 */ 1682, 1692, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 440 */ 1296, 1582, 1296, 1709, 1296, 1668, 1664, 1296, 1296, 1660, + /* 450 */ 1296, 1296, 1720, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 460 */ 1654, 1296, 1627, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 470 */ 1296, 1296, 1296, 1592, 1296, 1296, 1296, 1296, 1296, 1296, + /* 480 */ 1296, 1296, 1296, 1296, 1296, 1296, 1581, 1296, 1296, 1296, + /* 490 */ 1296, 1296, 1296, 1296, 1447, 1296, 1296, 1296, 1296, 1296, + /* 500 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1432, 1430, 1429, + /* 510 */ 1428, 1296, 1425, 1296, 1296, 1296, 1296, 1296, 1296, 1456, + /* 520 */ 1455, 1296, 1296, 1296, 1296, 1296, 1296, 1376, 1296, 1296, + /* 530 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1367, 1296, 1366, + /* 540 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 550 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 560 */ 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, + /* 570 */ 1296, 1296, 1296, 1296, }; /********** End of lemon-generated parsing tables *****************************/ @@ -775,6 +767,237 @@ static const YYACTIONTYPE yy_default[] = { */ #ifdef YYFALLBACK static const YYCODETYPE yyFallback[] = { + 0, /* $ => nothing */ + 0, /* OR => nothing */ + 0, /* AND => nothing */ + 0, /* UNION => nothing */ + 0, /* ALL => nothing */ + 0, /* MINUS => nothing */ + 0, /* EXCEPT => nothing */ + 0, /* INTERSECT => nothing */ + 0, /* NK_BITAND => nothing */ + 0, /* NK_BITOR => nothing */ + 0, /* NK_LSHIFT => nothing */ + 0, /* NK_RSHIFT => nothing */ + 0, /* NK_PLUS => nothing */ + 0, /* NK_MINUS => nothing */ + 0, /* NK_STAR => nothing */ + 0, /* NK_SLASH => nothing */ + 0, /* NK_REM => nothing */ + 0, /* NK_CONCAT => nothing */ + 0, /* CREATE => nothing */ + 0, /* ACCOUNT => nothing */ + 0, /* NK_ID => nothing */ + 0, /* PASS => nothing */ + 0, /* NK_STRING => nothing */ + 0, /* ALTER => nothing */ + 0, /* PPS => nothing */ + 0, /* TSERIES => nothing */ + 0, /* STORAGE => nothing */ + 0, /* STREAMS => nothing */ + 0, /* QTIME => nothing */ + 0, /* DBS => nothing */ + 0, /* USERS => nothing */ + 0, /* CONNS => nothing */ + 0, /* STATE => nothing */ + 0, /* USER => nothing */ + 0, /* PRIVILEGE => nothing */ + 0, /* DROP => nothing */ + 0, /* DNODE => nothing */ + 0, /* PORT => nothing */ + 0, /* NK_INTEGER => nothing */ + 0, /* DNODES => nothing */ + 0, /* NK_IPTOKEN => nothing */ + 0, /* LOCAL => nothing */ + 0, /* QNODE => nothing */ + 0, /* ON => nothing */ + 0, /* BNODE => nothing */ + 0, /* SNODE => nothing */ + 0, /* MNODE => nothing */ + 0, /* DATABASE => nothing */ + 0, /* USE => nothing */ + 0, /* IF => nothing */ + 0, /* NOT => nothing */ + 0, /* EXISTS => nothing */ + 0, /* BLOCKS => nothing */ + 0, /* CACHE => nothing */ + 0, /* CACHELAST => nothing */ + 0, /* COMP => nothing */ + 0, /* DAYS => nothing */ + 0, /* NK_VARIABLE => nothing */ + 0, /* FSYNC => nothing */ + 0, /* MAXROWS => nothing */ + 0, /* MINROWS => nothing */ + 0, /* KEEP => nothing */ + 0, /* PRECISION => nothing */ + 0, /* QUORUM => nothing */ + 0, /* REPLICA => nothing */ + 0, /* TTL => nothing */ + 0, /* WAL => nothing */ + 0, /* VGROUPS => nothing */ + 0, /* SINGLE_STABLE => nothing */ + 0, /* STREAM_MODE => nothing */ + 0, /* RETENTIONS => nothing */ + 0, /* STRICT => nothing */ + 0, /* NK_COMMA => nothing */ + 0, /* NK_COLON => nothing */ + 0, /* TABLE => nothing */ + 0, /* NK_LP => nothing */ + 0, /* NK_RP => nothing */ + 0, /* STABLE => nothing */ + 0, /* ADD => nothing */ + 0, /* COLUMN => nothing */ + 0, /* MODIFY => nothing */ + 0, /* RENAME => nothing */ + 0, /* TAG => nothing */ + 0, /* SET => nothing */ + 0, /* NK_EQ => nothing */ + 0, /* USING => nothing */ + 0, /* TAGS => nothing */ + 0, /* NK_DOT => nothing */ + 0, /* COMMENT => nothing */ + 0, /* BOOL => nothing */ + 0, /* TINYINT => nothing */ + 0, /* SMALLINT => nothing */ + 0, /* INT => nothing */ + 0, /* INTEGER => nothing */ + 0, /* BIGINT => nothing */ + 0, /* FLOAT => nothing */ + 0, /* DOUBLE => nothing */ + 0, /* BINARY => nothing */ + 0, /* TIMESTAMP => nothing */ + 0, /* NCHAR => nothing */ + 0, /* UNSIGNED => nothing */ + 0, /* JSON => nothing */ + 0, /* VARCHAR => nothing */ + 0, /* MEDIUMBLOB => nothing */ + 0, /* BLOB => nothing */ + 0, /* VARBINARY => nothing */ + 0, /* DECIMAL => nothing */ + 0, /* SMA => nothing */ + 0, /* ROLLUP => nothing */ + 0, /* FILE_FACTOR => nothing */ + 0, /* NK_FLOAT => nothing */ + 0, /* DELAY => nothing */ + 0, /* SHOW => nothing */ + 0, /* DATABASES => nothing */ + 0, /* TABLES => nothing */ + 0, /* STABLES => nothing */ + 0, /* MNODES => nothing */ + 0, /* MODULES => nothing */ + 0, /* QNODES => nothing */ + 0, /* FUNCTIONS => nothing */ + 0, /* INDEXES => nothing */ + 0, /* FROM => nothing */ + 0, /* ACCOUNTS => nothing */ + 0, /* APPS => nothing */ + 0, /* CONNECTIONS => nothing */ + 0, /* LICENCE => nothing */ + 0, /* GRANTS => nothing */ + 0, /* QUERIES => nothing */ + 0, /* SCORES => nothing */ + 0, /* TOPICS => nothing */ + 0, /* VARIABLES => nothing */ + 0, /* BNODES => nothing */ + 0, /* SNODES => nothing */ + 0, /* CLUSTER => nothing */ + 0, /* LIKE => nothing */ + 0, /* INDEX => nothing */ + 0, /* FULLTEXT => nothing */ + 0, /* FUNCTION => nothing */ + 0, /* INTERVAL => nothing */ + 0, /* TOPIC => nothing */ + 0, /* AS => nothing */ + 0, /* WITH => nothing */ + 0, /* SCHEMA => nothing */ + 0, /* DESC => nothing */ + 0, /* DESCRIBE => nothing */ + 0, /* RESET => nothing */ + 0, /* QUERY => nothing */ + 0, /* EXPLAIN => nothing */ + 0, /* ANALYZE => nothing */ + 0, /* VERBOSE => nothing */ + 0, /* NK_BOOL => nothing */ + 0, /* RATIO => nothing */ + 0, /* COMPACT => nothing */ + 0, /* VNODES => nothing */ + 0, /* IN => nothing */ + 0, /* OUTPUTTYPE => nothing */ + 0, /* AGGREGATE => nothing */ + 0, /* BUFSIZE => nothing */ + 0, /* STREAM => nothing */ + 0, /* INTO => nothing */ + 0, /* TRIGGER => nothing */ + 0, /* AT_ONCE => nothing */ + 0, /* WINDOW_CLOSE => nothing */ + 0, /* WATERMARK => nothing */ + 0, /* KILL => nothing */ + 0, /* CONNECTION => nothing */ + 0, /* MERGE => nothing */ + 0, /* VGROUP => nothing */ + 0, /* REDISTRIBUTE => nothing */ + 0, /* SPLIT => nothing */ + 0, /* SYNCDB => nothing */ + 0, /* NULL => nothing */ + 0, /* NK_QUESTION => nothing */ + 0, /* NK_ARROW => nothing */ + 0, /* ROWTS => nothing */ + 0, /* TBNAME => nothing */ + 0, /* QSTARTTS => nothing */ + 0, /* QENDTS => nothing */ + 0, /* WSTARTTS => nothing */ + 0, /* WENDTS => nothing */ + 0, /* WDURATION => nothing */ + 0, /* CAST => nothing */ + 0, /* NOW => nothing */ + 0, /* TODAY => nothing */ + 0, /* TIMEZONE => nothing */ + 0, /* COUNT => nothing */ + 0, /* FIRST => nothing */ + 0, /* LAST => nothing */ + 0, /* LAST_ROW => nothing */ + 0, /* BETWEEN => nothing */ + 0, /* IS => nothing */ + 0, /* NK_LT => nothing */ + 0, /* NK_GT => nothing */ + 0, /* NK_LE => nothing */ + 0, /* NK_GE => nothing */ + 0, /* NK_NE => nothing */ + 0, /* MATCH => nothing */ + 0, /* NMATCH => nothing */ + 0, /* CONTAINS => nothing */ + 0, /* JOIN => nothing */ + 0, /* INNER => nothing */ + 0, /* SELECT => nothing */ + 0, /* DISTINCT => nothing */ + 0, /* WHERE => nothing */ + 0, /* PARTITION => nothing */ + 0, /* BY => nothing */ + 0, /* SESSION => nothing */ + 0, /* STATE_WINDOW => nothing */ + 0, /* SLIDING => nothing */ + 0, /* FILL => nothing */ + 0, /* VALUE => nothing */ + 0, /* NONE => nothing */ + 0, /* PREV => nothing */ + 0, /* LINEAR => nothing */ + 0, /* NEXT => nothing */ + 0, /* GROUP => nothing */ + 0, /* HAVING => nothing */ + 0, /* ORDER => nothing */ + 0, /* SLIMIT => nothing */ + 0, /* SOFFSET => nothing */ + 0, /* LIMIT => nothing */ + 0, /* OFFSET => nothing */ + 0, /* ASC => nothing */ + 0, /* NULLS => nothing */ + 0, /* ID => nothing */ + 224, /* NK_BITNOT => ID */ + 224, /* INSERT => ID */ + 224, /* VALUES => ID */ + 224, /* IMPORT => ID */ + 224, /* NK_SEMI => ID */ + 224, /* FILE => ID */ }; #endif /* YYFALLBACK */ @@ -1003,201 +1226,211 @@ static const char *const yyTokenName[] = { /* 138 */ "INTERVAL", /* 139 */ "TOPIC", /* 140 */ "AS", - /* 141 */ "DESC", - /* 142 */ "DESCRIBE", - /* 143 */ "RESET", - /* 144 */ "QUERY", - /* 145 */ "EXPLAIN", - /* 146 */ "ANALYZE", - /* 147 */ "VERBOSE", - /* 148 */ "NK_BOOL", - /* 149 */ "RATIO", - /* 150 */ "COMPACT", - /* 151 */ "VNODES", - /* 152 */ "IN", - /* 153 */ "OUTPUTTYPE", - /* 154 */ "AGGREGATE", - /* 155 */ "BUFSIZE", - /* 156 */ "STREAM", - /* 157 */ "INTO", - /* 158 */ "TRIGGER", - /* 159 */ "AT_ONCE", - /* 160 */ "WINDOW_CLOSE", - /* 161 */ "WATERMARK", - /* 162 */ "KILL", - /* 163 */ "CONNECTION", - /* 164 */ "MERGE", - /* 165 */ "VGROUP", - /* 166 */ "REDISTRIBUTE", - /* 167 */ "SPLIT", - /* 168 */ "SYNCDB", - /* 169 */ "NULL", - /* 170 */ "NK_QUESTION", - /* 171 */ "NK_ARROW", - /* 172 */ "ROWTS", - /* 173 */ "TBNAME", - /* 174 */ "QSTARTTS", - /* 175 */ "QENDTS", - /* 176 */ "WSTARTTS", - /* 177 */ "WENDTS", - /* 178 */ "WDURATION", - /* 179 */ "CAST", - /* 180 */ "NOW", - /* 181 */ "TODAY", - /* 182 */ "TIMEZONE", - /* 183 */ "COUNT", - /* 184 */ "FIRST", - /* 185 */ "LAST", - /* 186 */ "LAST_ROW", - /* 187 */ "BETWEEN", - /* 188 */ "IS", - /* 189 */ "NK_LT", - /* 190 */ "NK_GT", - /* 191 */ "NK_LE", - /* 192 */ "NK_GE", - /* 193 */ "NK_NE", - /* 194 */ "MATCH", - /* 195 */ "NMATCH", - /* 196 */ "CONTAINS", - /* 197 */ "JOIN", - /* 198 */ "INNER", - /* 199 */ "SELECT", - /* 200 */ "DISTINCT", - /* 201 */ "WHERE", - /* 202 */ "PARTITION", - /* 203 */ "BY", - /* 204 */ "SESSION", - /* 205 */ "STATE_WINDOW", - /* 206 */ "SLIDING", - /* 207 */ "FILL", - /* 208 */ "VALUE", - /* 209 */ "NONE", - /* 210 */ "PREV", - /* 211 */ "LINEAR", - /* 212 */ "NEXT", - /* 213 */ "GROUP", - /* 214 */ "HAVING", - /* 215 */ "ORDER", - /* 216 */ "SLIMIT", - /* 217 */ "SOFFSET", - /* 218 */ "LIMIT", - /* 219 */ "OFFSET", - /* 220 */ "ASC", - /* 221 */ "NULLS", - /* 222 */ "cmd", - /* 223 */ "account_options", - /* 224 */ "alter_account_options", - /* 225 */ "literal", - /* 226 */ "alter_account_option", - /* 227 */ "user_name", - /* 228 */ "dnode_endpoint", - /* 229 */ "dnode_host_name", - /* 230 */ "not_exists_opt", - /* 231 */ "db_name", - /* 232 */ "db_options", - /* 233 */ "exists_opt", - /* 234 */ "alter_db_options", - /* 235 */ "integer_list", - /* 236 */ "variable_list", - /* 237 */ "retention_list", - /* 238 */ "alter_db_option", - /* 239 */ "retention", - /* 240 */ "full_table_name", - /* 241 */ "column_def_list", - /* 242 */ "tags_def_opt", - /* 243 */ "table_options", - /* 244 */ "multi_create_clause", - /* 245 */ "tags_def", - /* 246 */ "multi_drop_clause", - /* 247 */ "alter_table_clause", - /* 248 */ "alter_table_options", - /* 249 */ "column_name", - /* 250 */ "type_name", - /* 251 */ "create_subtable_clause", - /* 252 */ "specific_tags_opt", - /* 253 */ "literal_list", - /* 254 */ "drop_table_clause", - /* 255 */ "col_name_list", - /* 256 */ "table_name", - /* 257 */ "column_def", - /* 258 */ "func_name_list", - /* 259 */ "alter_table_option", - /* 260 */ "col_name", - /* 261 */ "db_name_cond_opt", - /* 262 */ "like_pattern_opt", - /* 263 */ "table_name_cond", - /* 264 */ "from_db_opt", - /* 265 */ "func_name", - /* 266 */ "function_name", - /* 267 */ "index_name", - /* 268 */ "index_options", - /* 269 */ "func_list", - /* 270 */ "duration_literal", - /* 271 */ "sliding_opt", - /* 272 */ "func", - /* 273 */ "expression_list", - /* 274 */ "topic_name", - /* 275 */ "query_expression", - /* 276 */ "analyze_opt", - /* 277 */ "explain_options", - /* 278 */ "agg_func_opt", - /* 279 */ "bufsize_opt", - /* 280 */ "stream_name", - /* 281 */ "stream_options", - /* 282 */ "into_opt", - /* 283 */ "dnode_list", - /* 284 */ "signed", - /* 285 */ "signed_literal", - /* 286 */ "table_alias", - /* 287 */ "column_alias", - /* 288 */ "expression", - /* 289 */ "pseudo_column", - /* 290 */ "column_reference", - /* 291 */ "function_expression", - /* 292 */ "subquery", - /* 293 */ "star_func", - /* 294 */ "star_func_para_list", - /* 295 */ "noarg_func", - /* 296 */ "other_para_list", - /* 297 */ "star_func_para", - /* 298 */ "predicate", - /* 299 */ "compare_op", - /* 300 */ "in_op", - /* 301 */ "in_predicate_value", - /* 302 */ "boolean_value_expression", - /* 303 */ "boolean_primary", - /* 304 */ "common_expression", - /* 305 */ "from_clause", - /* 306 */ "table_reference_list", - /* 307 */ "table_reference", - /* 308 */ "table_primary", - /* 309 */ "joined_table", - /* 310 */ "alias_opt", - /* 311 */ "parenthesized_joined_table", - /* 312 */ "join_type", - /* 313 */ "search_condition", - /* 314 */ "query_specification", - /* 315 */ "set_quantifier_opt", - /* 316 */ "select_list", - /* 317 */ "where_clause_opt", - /* 318 */ "partition_by_clause_opt", - /* 319 */ "twindow_clause_opt", - /* 320 */ "group_by_clause_opt", - /* 321 */ "having_clause_opt", - /* 322 */ "select_sublist", - /* 323 */ "select_item", - /* 324 */ "fill_opt", - /* 325 */ "fill_mode", - /* 326 */ "group_by_list", - /* 327 */ "query_expression_body", - /* 328 */ "order_by_clause_opt", - /* 329 */ "slimit_clause_opt", - /* 330 */ "limit_clause_opt", - /* 331 */ "query_primary", - /* 332 */ "sort_specification_list", - /* 333 */ "sort_specification", - /* 334 */ "ordering_specification_opt", - /* 335 */ "null_ordering_opt", + /* 141 */ "WITH", + /* 142 */ "SCHEMA", + /* 143 */ "DESC", + /* 144 */ "DESCRIBE", + /* 145 */ "RESET", + /* 146 */ "QUERY", + /* 147 */ "EXPLAIN", + /* 148 */ "ANALYZE", + /* 149 */ "VERBOSE", + /* 150 */ "NK_BOOL", + /* 151 */ "RATIO", + /* 152 */ "COMPACT", + /* 153 */ "VNODES", + /* 154 */ "IN", + /* 155 */ "OUTPUTTYPE", + /* 156 */ "AGGREGATE", + /* 157 */ "BUFSIZE", + /* 158 */ "STREAM", + /* 159 */ "INTO", + /* 160 */ "TRIGGER", + /* 161 */ "AT_ONCE", + /* 162 */ "WINDOW_CLOSE", + /* 163 */ "WATERMARK", + /* 164 */ "KILL", + /* 165 */ "CONNECTION", + /* 166 */ "MERGE", + /* 167 */ "VGROUP", + /* 168 */ "REDISTRIBUTE", + /* 169 */ "SPLIT", + /* 170 */ "SYNCDB", + /* 171 */ "NULL", + /* 172 */ "NK_QUESTION", + /* 173 */ "NK_ARROW", + /* 174 */ "ROWTS", + /* 175 */ "TBNAME", + /* 176 */ "QSTARTTS", + /* 177 */ "QENDTS", + /* 178 */ "WSTARTTS", + /* 179 */ "WENDTS", + /* 180 */ "WDURATION", + /* 181 */ "CAST", + /* 182 */ "NOW", + /* 183 */ "TODAY", + /* 184 */ "TIMEZONE", + /* 185 */ "COUNT", + /* 186 */ "FIRST", + /* 187 */ "LAST", + /* 188 */ "LAST_ROW", + /* 189 */ "BETWEEN", + /* 190 */ "IS", + /* 191 */ "NK_LT", + /* 192 */ "NK_GT", + /* 193 */ "NK_LE", + /* 194 */ "NK_GE", + /* 195 */ "NK_NE", + /* 196 */ "MATCH", + /* 197 */ "NMATCH", + /* 198 */ "CONTAINS", + /* 199 */ "JOIN", + /* 200 */ "INNER", + /* 201 */ "SELECT", + /* 202 */ "DISTINCT", + /* 203 */ "WHERE", + /* 204 */ "PARTITION", + /* 205 */ "BY", + /* 206 */ "SESSION", + /* 207 */ "STATE_WINDOW", + /* 208 */ "SLIDING", + /* 209 */ "FILL", + /* 210 */ "VALUE", + /* 211 */ "NONE", + /* 212 */ "PREV", + /* 213 */ "LINEAR", + /* 214 */ "NEXT", + /* 215 */ "GROUP", + /* 216 */ "HAVING", + /* 217 */ "ORDER", + /* 218 */ "SLIMIT", + /* 219 */ "SOFFSET", + /* 220 */ "LIMIT", + /* 221 */ "OFFSET", + /* 222 */ "ASC", + /* 223 */ "NULLS", + /* 224 */ "ID", + /* 225 */ "NK_BITNOT", + /* 226 */ "INSERT", + /* 227 */ "VALUES", + /* 228 */ "IMPORT", + /* 229 */ "NK_SEMI", + /* 230 */ "FILE", + /* 231 */ "cmd", + /* 232 */ "account_options", + /* 233 */ "alter_account_options", + /* 234 */ "literal", + /* 235 */ "alter_account_option", + /* 236 */ "user_name", + /* 237 */ "dnode_endpoint", + /* 238 */ "dnode_host_name", + /* 239 */ "not_exists_opt", + /* 240 */ "db_name", + /* 241 */ "db_options", + /* 242 */ "exists_opt", + /* 243 */ "alter_db_options", + /* 244 */ "integer_list", + /* 245 */ "variable_list", + /* 246 */ "retention_list", + /* 247 */ "alter_db_option", + /* 248 */ "retention", + /* 249 */ "full_table_name", + /* 250 */ "column_def_list", + /* 251 */ "tags_def_opt", + /* 252 */ "table_options", + /* 253 */ "multi_create_clause", + /* 254 */ "tags_def", + /* 255 */ "multi_drop_clause", + /* 256 */ "alter_table_clause", + /* 257 */ "alter_table_options", + /* 258 */ "column_name", + /* 259 */ "type_name", + /* 260 */ "create_subtable_clause", + /* 261 */ "specific_tags_opt", + /* 262 */ "literal_list", + /* 263 */ "drop_table_clause", + /* 264 */ "col_name_list", + /* 265 */ "table_name", + /* 266 */ "column_def", + /* 267 */ "func_name_list", + /* 268 */ "alter_table_option", + /* 269 */ "col_name", + /* 270 */ "db_name_cond_opt", + /* 271 */ "like_pattern_opt", + /* 272 */ "table_name_cond", + /* 273 */ "from_db_opt", + /* 274 */ "func_name", + /* 275 */ "function_name", + /* 276 */ "index_name", + /* 277 */ "index_options", + /* 278 */ "func_list", + /* 279 */ "duration_literal", + /* 280 */ "sliding_opt", + /* 281 */ "func", + /* 282 */ "expression_list", + /* 283 */ "topic_name", + /* 284 */ "topic_options", + /* 285 */ "query_expression", + /* 286 */ "analyze_opt", + /* 287 */ "explain_options", + /* 288 */ "agg_func_opt", + /* 289 */ "bufsize_opt", + /* 290 */ "stream_name", + /* 291 */ "stream_options", + /* 292 */ "into_opt", + /* 293 */ "dnode_list", + /* 294 */ "signed", + /* 295 */ "signed_literal", + /* 296 */ "table_alias", + /* 297 */ "column_alias", + /* 298 */ "expression", + /* 299 */ "pseudo_column", + /* 300 */ "column_reference", + /* 301 */ "function_expression", + /* 302 */ "subquery", + /* 303 */ "star_func", + /* 304 */ "star_func_para_list", + /* 305 */ "noarg_func", + /* 306 */ "other_para_list", + /* 307 */ "star_func_para", + /* 308 */ "predicate", + /* 309 */ "compare_op", + /* 310 */ "in_op", + /* 311 */ "in_predicate_value", + /* 312 */ "boolean_value_expression", + /* 313 */ "boolean_primary", + /* 314 */ "common_expression", + /* 315 */ "from_clause", + /* 316 */ "table_reference_list", + /* 317 */ "table_reference", + /* 318 */ "table_primary", + /* 319 */ "joined_table", + /* 320 */ "alias_opt", + /* 321 */ "parenthesized_joined_table", + /* 322 */ "join_type", + /* 323 */ "search_condition", + /* 324 */ "query_specification", + /* 325 */ "set_quantifier_opt", + /* 326 */ "select_list", + /* 327 */ "where_clause_opt", + /* 328 */ "partition_by_clause_opt", + /* 329 */ "twindow_clause_opt", + /* 330 */ "group_by_clause_opt", + /* 331 */ "having_clause_opt", + /* 332 */ "select_sublist", + /* 333 */ "select_item", + /* 334 */ "fill_opt", + /* 335 */ "fill_mode", + /* 336 */ "group_by_list", + /* 337 */ "query_expression_body", + /* 338 */ "order_by_clause_opt", + /* 339 */ "slimit_clause_opt", + /* 340 */ "limit_clause_opt", + /* 341 */ "query_primary", + /* 342 */ "sort_specification_list", + /* 343 */ "sort_specification", + /* 344 */ "ordering_specification_opt", + /* 345 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1423,225 +1656,229 @@ static const char *const yyRuleName[] = { /* 215 */ "func_list ::= func", /* 216 */ "func_list ::= func_list NK_COMMA func", /* 217 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 218 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", - /* 219 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name", + /* 218 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression", + /* 219 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name", /* 220 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 221 */ "cmd ::= DESC full_table_name", - /* 222 */ "cmd ::= DESCRIBE full_table_name", - /* 223 */ "cmd ::= RESET QUERY CACHE", - /* 224 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", - /* 225 */ "analyze_opt ::=", - /* 226 */ "analyze_opt ::= ANALYZE", - /* 227 */ "explain_options ::=", - /* 228 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 229 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 230 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", - /* 231 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 232 */ "cmd ::= DROP FUNCTION function_name", - /* 233 */ "agg_func_opt ::=", - /* 234 */ "agg_func_opt ::= AGGREGATE", - /* 235 */ "bufsize_opt ::=", - /* 236 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 237 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", - /* 238 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 239 */ "into_opt ::=", - /* 240 */ "into_opt ::= INTO full_table_name", - /* 241 */ "stream_options ::=", - /* 242 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 243 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 244 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 245 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 246 */ "cmd ::= KILL QUERY NK_INTEGER", - /* 247 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 248 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 249 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 250 */ "dnode_list ::= DNODE NK_INTEGER", - /* 251 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 252 */ "cmd ::= SYNCDB db_name REPLICA", - /* 253 */ "cmd ::= query_expression", - /* 254 */ "literal ::= NK_INTEGER", - /* 255 */ "literal ::= NK_FLOAT", - /* 256 */ "literal ::= NK_STRING", - /* 257 */ "literal ::= NK_BOOL", - /* 258 */ "literal ::= TIMESTAMP NK_STRING", - /* 259 */ "literal ::= duration_literal", - /* 260 */ "literal ::= NULL", - /* 261 */ "literal ::= NK_QUESTION", - /* 262 */ "duration_literal ::= NK_VARIABLE", - /* 263 */ "signed ::= NK_INTEGER", - /* 264 */ "signed ::= NK_PLUS NK_INTEGER", - /* 265 */ "signed ::= NK_MINUS NK_INTEGER", - /* 266 */ "signed ::= NK_FLOAT", - /* 267 */ "signed ::= NK_PLUS NK_FLOAT", - /* 268 */ "signed ::= NK_MINUS NK_FLOAT", - /* 269 */ "signed_literal ::= signed", - /* 270 */ "signed_literal ::= NK_STRING", - /* 271 */ "signed_literal ::= NK_BOOL", - /* 272 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 273 */ "signed_literal ::= duration_literal", - /* 274 */ "signed_literal ::= NULL", - /* 275 */ "literal_list ::= signed_literal", - /* 276 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 277 */ "db_name ::= NK_ID", - /* 278 */ "table_name ::= NK_ID", - /* 279 */ "column_name ::= NK_ID", - /* 280 */ "function_name ::= NK_ID", - /* 281 */ "table_alias ::= NK_ID", - /* 282 */ "column_alias ::= NK_ID", - /* 283 */ "user_name ::= NK_ID", - /* 284 */ "index_name ::= NK_ID", - /* 285 */ "topic_name ::= NK_ID", - /* 286 */ "stream_name ::= NK_ID", - /* 287 */ "expression ::= literal", - /* 288 */ "expression ::= pseudo_column", - /* 289 */ "expression ::= column_reference", - /* 290 */ "expression ::= function_expression", - /* 291 */ "expression ::= subquery", - /* 292 */ "expression ::= NK_LP expression NK_RP", - /* 293 */ "expression ::= NK_PLUS expression", - /* 294 */ "expression ::= NK_MINUS expression", - /* 295 */ "expression ::= expression NK_PLUS expression", - /* 296 */ "expression ::= expression NK_MINUS expression", - /* 297 */ "expression ::= expression NK_STAR expression", - /* 298 */ "expression ::= expression NK_SLASH expression", - /* 299 */ "expression ::= expression NK_REM expression", - /* 300 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 301 */ "expression_list ::= expression", - /* 302 */ "expression_list ::= expression_list NK_COMMA expression", - /* 303 */ "column_reference ::= column_name", - /* 304 */ "column_reference ::= table_name NK_DOT column_name", - /* 305 */ "pseudo_column ::= ROWTS", - /* 306 */ "pseudo_column ::= TBNAME", - /* 307 */ "pseudo_column ::= QSTARTTS", - /* 308 */ "pseudo_column ::= QENDTS", - /* 309 */ "pseudo_column ::= WSTARTTS", - /* 310 */ "pseudo_column ::= WENDTS", - /* 311 */ "pseudo_column ::= WDURATION", - /* 312 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 313 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 314 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", - /* 315 */ "function_expression ::= noarg_func NK_LP NK_RP", - /* 316 */ "noarg_func ::= NOW", - /* 317 */ "noarg_func ::= TODAY", - /* 318 */ "noarg_func ::= TIMEZONE", - /* 319 */ "star_func ::= COUNT", - /* 320 */ "star_func ::= FIRST", - /* 321 */ "star_func ::= LAST", - /* 322 */ "star_func ::= LAST_ROW", - /* 323 */ "star_func_para_list ::= NK_STAR", - /* 324 */ "star_func_para_list ::= other_para_list", - /* 325 */ "other_para_list ::= star_func_para", - /* 326 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 327 */ "star_func_para ::= expression", - /* 328 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 329 */ "predicate ::= expression compare_op expression", - /* 330 */ "predicate ::= expression BETWEEN expression AND expression", - /* 331 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 332 */ "predicate ::= expression IS NULL", - /* 333 */ "predicate ::= expression IS NOT NULL", - /* 334 */ "predicate ::= expression in_op in_predicate_value", - /* 335 */ "compare_op ::= NK_LT", - /* 336 */ "compare_op ::= NK_GT", - /* 337 */ "compare_op ::= NK_LE", - /* 338 */ "compare_op ::= NK_GE", - /* 339 */ "compare_op ::= NK_NE", - /* 340 */ "compare_op ::= NK_EQ", - /* 341 */ "compare_op ::= LIKE", - /* 342 */ "compare_op ::= NOT LIKE", - /* 343 */ "compare_op ::= MATCH", - /* 344 */ "compare_op ::= NMATCH", - /* 345 */ "compare_op ::= CONTAINS", - /* 346 */ "in_op ::= IN", - /* 347 */ "in_op ::= NOT IN", - /* 348 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 349 */ "boolean_value_expression ::= boolean_primary", - /* 350 */ "boolean_value_expression ::= NOT boolean_primary", - /* 351 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 352 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 353 */ "boolean_primary ::= predicate", - /* 354 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 355 */ "common_expression ::= expression", - /* 356 */ "common_expression ::= boolean_value_expression", - /* 357 */ "from_clause ::= FROM table_reference_list", - /* 358 */ "table_reference_list ::= table_reference", - /* 359 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 360 */ "table_reference ::= table_primary", - /* 361 */ "table_reference ::= joined_table", - /* 362 */ "table_primary ::= table_name alias_opt", - /* 363 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 364 */ "table_primary ::= subquery alias_opt", - /* 365 */ "table_primary ::= parenthesized_joined_table", - /* 366 */ "alias_opt ::=", - /* 367 */ "alias_opt ::= table_alias", - /* 368 */ "alias_opt ::= AS table_alias", - /* 369 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 370 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 371 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 372 */ "join_type ::=", - /* 373 */ "join_type ::= INNER", - /* 374 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 375 */ "set_quantifier_opt ::=", - /* 376 */ "set_quantifier_opt ::= DISTINCT", - /* 377 */ "set_quantifier_opt ::= ALL", - /* 378 */ "select_list ::= NK_STAR", - /* 379 */ "select_list ::= select_sublist", - /* 380 */ "select_sublist ::= select_item", - /* 381 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 382 */ "select_item ::= common_expression", - /* 383 */ "select_item ::= common_expression column_alias", - /* 384 */ "select_item ::= common_expression AS column_alias", - /* 385 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 386 */ "where_clause_opt ::=", - /* 387 */ "where_clause_opt ::= WHERE search_condition", - /* 388 */ "partition_by_clause_opt ::=", - /* 389 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 390 */ "twindow_clause_opt ::=", - /* 391 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 392 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", - /* 393 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 394 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 395 */ "sliding_opt ::=", - /* 396 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 397 */ "fill_opt ::=", - /* 398 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 399 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 400 */ "fill_mode ::= NONE", - /* 401 */ "fill_mode ::= PREV", - /* 402 */ "fill_mode ::= NULL", - /* 403 */ "fill_mode ::= LINEAR", - /* 404 */ "fill_mode ::= NEXT", - /* 405 */ "group_by_clause_opt ::=", - /* 406 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 407 */ "group_by_list ::= expression", - /* 408 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 409 */ "having_clause_opt ::=", - /* 410 */ "having_clause_opt ::= HAVING search_condition", - /* 411 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 412 */ "query_expression_body ::= query_primary", - /* 413 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 414 */ "query_expression_body ::= query_expression_body UNION query_expression_body", - /* 415 */ "query_primary ::= query_specification", - /* 416 */ "order_by_clause_opt ::=", - /* 417 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 418 */ "slimit_clause_opt ::=", - /* 419 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 420 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 421 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 422 */ "limit_clause_opt ::=", - /* 423 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 424 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 425 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 426 */ "subquery ::= NK_LP query_expression NK_RP", - /* 427 */ "search_condition ::= common_expression", - /* 428 */ "sort_specification_list ::= sort_specification", - /* 429 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 430 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 431 */ "ordering_specification_opt ::=", - /* 432 */ "ordering_specification_opt ::= ASC", - /* 433 */ "ordering_specification_opt ::= DESC", - /* 434 */ "null_ordering_opt ::=", - /* 435 */ "null_ordering_opt ::= NULLS FIRST", - /* 436 */ "null_ordering_opt ::= NULLS LAST", + /* 221 */ "topic_options ::=", + /* 222 */ "topic_options ::= topic_options WITH TABLE", + /* 223 */ "topic_options ::= topic_options WITH SCHEMA", + /* 224 */ "topic_options ::= topic_options WITH TAG", + /* 225 */ "cmd ::= DESC full_table_name", + /* 226 */ "cmd ::= DESCRIBE full_table_name", + /* 227 */ "cmd ::= RESET QUERY CACHE", + /* 228 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", + /* 229 */ "analyze_opt ::=", + /* 230 */ "analyze_opt ::= ANALYZE", + /* 231 */ "explain_options ::=", + /* 232 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 233 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 234 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", + /* 235 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 236 */ "cmd ::= DROP FUNCTION function_name", + /* 237 */ "agg_func_opt ::=", + /* 238 */ "agg_func_opt ::= AGGREGATE", + /* 239 */ "bufsize_opt ::=", + /* 240 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 241 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", + /* 242 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 243 */ "into_opt ::=", + /* 244 */ "into_opt ::= INTO full_table_name", + /* 245 */ "stream_options ::=", + /* 246 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 247 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 248 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 249 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 250 */ "cmd ::= KILL QUERY NK_INTEGER", + /* 251 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 252 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 253 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 254 */ "dnode_list ::= DNODE NK_INTEGER", + /* 255 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 256 */ "cmd ::= SYNCDB db_name REPLICA", + /* 257 */ "cmd ::= query_expression", + /* 258 */ "literal ::= NK_INTEGER", + /* 259 */ "literal ::= NK_FLOAT", + /* 260 */ "literal ::= NK_STRING", + /* 261 */ "literal ::= NK_BOOL", + /* 262 */ "literal ::= TIMESTAMP NK_STRING", + /* 263 */ "literal ::= duration_literal", + /* 264 */ "literal ::= NULL", + /* 265 */ "literal ::= NK_QUESTION", + /* 266 */ "duration_literal ::= NK_VARIABLE", + /* 267 */ "signed ::= NK_INTEGER", + /* 268 */ "signed ::= NK_PLUS NK_INTEGER", + /* 269 */ "signed ::= NK_MINUS NK_INTEGER", + /* 270 */ "signed ::= NK_FLOAT", + /* 271 */ "signed ::= NK_PLUS NK_FLOAT", + /* 272 */ "signed ::= NK_MINUS NK_FLOAT", + /* 273 */ "signed_literal ::= signed", + /* 274 */ "signed_literal ::= NK_STRING", + /* 275 */ "signed_literal ::= NK_BOOL", + /* 276 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 277 */ "signed_literal ::= duration_literal", + /* 278 */ "signed_literal ::= NULL", + /* 279 */ "literal_list ::= signed_literal", + /* 280 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 281 */ "db_name ::= NK_ID", + /* 282 */ "table_name ::= NK_ID", + /* 283 */ "column_name ::= NK_ID", + /* 284 */ "function_name ::= NK_ID", + /* 285 */ "table_alias ::= NK_ID", + /* 286 */ "column_alias ::= NK_ID", + /* 287 */ "user_name ::= NK_ID", + /* 288 */ "index_name ::= NK_ID", + /* 289 */ "topic_name ::= NK_ID", + /* 290 */ "stream_name ::= NK_ID", + /* 291 */ "expression ::= literal", + /* 292 */ "expression ::= pseudo_column", + /* 293 */ "expression ::= column_reference", + /* 294 */ "expression ::= function_expression", + /* 295 */ "expression ::= subquery", + /* 296 */ "expression ::= NK_LP expression NK_RP", + /* 297 */ "expression ::= NK_PLUS expression", + /* 298 */ "expression ::= NK_MINUS expression", + /* 299 */ "expression ::= expression NK_PLUS expression", + /* 300 */ "expression ::= expression NK_MINUS expression", + /* 301 */ "expression ::= expression NK_STAR expression", + /* 302 */ "expression ::= expression NK_SLASH expression", + /* 303 */ "expression ::= expression NK_REM expression", + /* 304 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 305 */ "expression_list ::= expression", + /* 306 */ "expression_list ::= expression_list NK_COMMA expression", + /* 307 */ "column_reference ::= column_name", + /* 308 */ "column_reference ::= table_name NK_DOT column_name", + /* 309 */ "pseudo_column ::= ROWTS", + /* 310 */ "pseudo_column ::= TBNAME", + /* 311 */ "pseudo_column ::= QSTARTTS", + /* 312 */ "pseudo_column ::= QENDTS", + /* 313 */ "pseudo_column ::= WSTARTTS", + /* 314 */ "pseudo_column ::= WENDTS", + /* 315 */ "pseudo_column ::= WDURATION", + /* 316 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 317 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 318 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", + /* 319 */ "function_expression ::= noarg_func NK_LP NK_RP", + /* 320 */ "noarg_func ::= NOW", + /* 321 */ "noarg_func ::= TODAY", + /* 322 */ "noarg_func ::= TIMEZONE", + /* 323 */ "star_func ::= COUNT", + /* 324 */ "star_func ::= FIRST", + /* 325 */ "star_func ::= LAST", + /* 326 */ "star_func ::= LAST_ROW", + /* 327 */ "star_func_para_list ::= NK_STAR", + /* 328 */ "star_func_para_list ::= other_para_list", + /* 329 */ "other_para_list ::= star_func_para", + /* 330 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 331 */ "star_func_para ::= expression", + /* 332 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 333 */ "predicate ::= expression compare_op expression", + /* 334 */ "predicate ::= expression BETWEEN expression AND expression", + /* 335 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 336 */ "predicate ::= expression IS NULL", + /* 337 */ "predicate ::= expression IS NOT NULL", + /* 338 */ "predicate ::= expression in_op in_predicate_value", + /* 339 */ "compare_op ::= NK_LT", + /* 340 */ "compare_op ::= NK_GT", + /* 341 */ "compare_op ::= NK_LE", + /* 342 */ "compare_op ::= NK_GE", + /* 343 */ "compare_op ::= NK_NE", + /* 344 */ "compare_op ::= NK_EQ", + /* 345 */ "compare_op ::= LIKE", + /* 346 */ "compare_op ::= NOT LIKE", + /* 347 */ "compare_op ::= MATCH", + /* 348 */ "compare_op ::= NMATCH", + /* 349 */ "compare_op ::= CONTAINS", + /* 350 */ "in_op ::= IN", + /* 351 */ "in_op ::= NOT IN", + /* 352 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 353 */ "boolean_value_expression ::= boolean_primary", + /* 354 */ "boolean_value_expression ::= NOT boolean_primary", + /* 355 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 356 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 357 */ "boolean_primary ::= predicate", + /* 358 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 359 */ "common_expression ::= expression", + /* 360 */ "common_expression ::= boolean_value_expression", + /* 361 */ "from_clause ::= FROM table_reference_list", + /* 362 */ "table_reference_list ::= table_reference", + /* 363 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 364 */ "table_reference ::= table_primary", + /* 365 */ "table_reference ::= joined_table", + /* 366 */ "table_primary ::= table_name alias_opt", + /* 367 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 368 */ "table_primary ::= subquery alias_opt", + /* 369 */ "table_primary ::= parenthesized_joined_table", + /* 370 */ "alias_opt ::=", + /* 371 */ "alias_opt ::= table_alias", + /* 372 */ "alias_opt ::= AS table_alias", + /* 373 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 374 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 375 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 376 */ "join_type ::=", + /* 377 */ "join_type ::= INNER", + /* 378 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 379 */ "set_quantifier_opt ::=", + /* 380 */ "set_quantifier_opt ::= DISTINCT", + /* 381 */ "set_quantifier_opt ::= ALL", + /* 382 */ "select_list ::= NK_STAR", + /* 383 */ "select_list ::= select_sublist", + /* 384 */ "select_sublist ::= select_item", + /* 385 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 386 */ "select_item ::= common_expression", + /* 387 */ "select_item ::= common_expression column_alias", + /* 388 */ "select_item ::= common_expression AS column_alias", + /* 389 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 390 */ "where_clause_opt ::=", + /* 391 */ "where_clause_opt ::= WHERE search_condition", + /* 392 */ "partition_by_clause_opt ::=", + /* 393 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 394 */ "twindow_clause_opt ::=", + /* 395 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 396 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", + /* 397 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 398 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 399 */ "sliding_opt ::=", + /* 400 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 401 */ "fill_opt ::=", + /* 402 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 403 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 404 */ "fill_mode ::= NONE", + /* 405 */ "fill_mode ::= PREV", + /* 406 */ "fill_mode ::= NULL", + /* 407 */ "fill_mode ::= LINEAR", + /* 408 */ "fill_mode ::= NEXT", + /* 409 */ "group_by_clause_opt ::=", + /* 410 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 411 */ "group_by_list ::= expression", + /* 412 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 413 */ "having_clause_opt ::=", + /* 414 */ "having_clause_opt ::= HAVING search_condition", + /* 415 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 416 */ "query_expression_body ::= query_primary", + /* 417 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 418 */ "query_expression_body ::= query_expression_body UNION query_expression_body", + /* 419 */ "query_primary ::= query_specification", + /* 420 */ "order_by_clause_opt ::=", + /* 421 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 422 */ "slimit_clause_opt ::=", + /* 423 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 424 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 425 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 426 */ "limit_clause_opt ::=", + /* 427 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 428 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 429 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 430 */ "subquery ::= NK_LP query_expression NK_RP", + /* 431 */ "search_condition ::= common_expression", + /* 432 */ "sort_specification_list ::= sort_specification", + /* 433 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 434 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 435 */ "ordering_specification_opt ::=", + /* 436 */ "ordering_specification_opt ::= ASC", + /* 437 */ "ordering_specification_opt ::= DESC", + /* 438 */ "null_ordering_opt ::=", + /* 439 */ "null_ordering_opt ::= NULLS FIRST", + /* 440 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -1768,164 +2005,165 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 222: /* cmd */ - case 225: /* literal */ - case 232: /* db_options */ - case 234: /* alter_db_options */ - case 239: /* retention */ - case 240: /* full_table_name */ - case 243: /* table_options */ - case 247: /* alter_table_clause */ - case 248: /* alter_table_options */ - case 251: /* create_subtable_clause */ - case 254: /* drop_table_clause */ - case 257: /* column_def */ - case 260: /* col_name */ - case 261: /* db_name_cond_opt */ - case 262: /* like_pattern_opt */ - case 263: /* table_name_cond */ - case 264: /* from_db_opt */ - case 265: /* func_name */ - case 268: /* index_options */ - case 270: /* duration_literal */ - case 271: /* sliding_opt */ - case 272: /* func */ - case 275: /* query_expression */ - case 277: /* explain_options */ - case 281: /* stream_options */ - case 282: /* into_opt */ - case 284: /* signed */ - case 285: /* signed_literal */ - case 288: /* expression */ - case 289: /* pseudo_column */ - case 290: /* column_reference */ - case 291: /* function_expression */ - case 292: /* subquery */ - case 297: /* star_func_para */ - case 298: /* predicate */ - case 301: /* in_predicate_value */ - case 302: /* boolean_value_expression */ - case 303: /* boolean_primary */ - case 304: /* common_expression */ - case 305: /* from_clause */ - case 306: /* table_reference_list */ - case 307: /* table_reference */ - case 308: /* table_primary */ - case 309: /* joined_table */ - case 311: /* parenthesized_joined_table */ - case 313: /* search_condition */ - case 314: /* query_specification */ - case 317: /* where_clause_opt */ - case 319: /* twindow_clause_opt */ - case 321: /* having_clause_opt */ - case 323: /* select_item */ - case 324: /* fill_opt */ - case 327: /* query_expression_body */ - case 329: /* slimit_clause_opt */ - case 330: /* limit_clause_opt */ - case 331: /* query_primary */ - case 333: /* sort_specification */ + case 231: /* cmd */ + case 234: /* literal */ + case 241: /* db_options */ + case 243: /* alter_db_options */ + case 248: /* retention */ + case 249: /* full_table_name */ + case 252: /* table_options */ + case 256: /* alter_table_clause */ + case 257: /* alter_table_options */ + case 260: /* create_subtable_clause */ + case 263: /* drop_table_clause */ + case 266: /* column_def */ + case 269: /* col_name */ + case 270: /* db_name_cond_opt */ + case 271: /* like_pattern_opt */ + case 272: /* table_name_cond */ + case 273: /* from_db_opt */ + case 274: /* func_name */ + case 277: /* index_options */ + case 279: /* duration_literal */ + case 280: /* sliding_opt */ + case 281: /* func */ + case 284: /* topic_options */ + case 285: /* query_expression */ + case 287: /* explain_options */ + case 291: /* stream_options */ + case 292: /* into_opt */ + case 294: /* signed */ + case 295: /* signed_literal */ + case 298: /* expression */ + case 299: /* pseudo_column */ + case 300: /* column_reference */ + case 301: /* function_expression */ + case 302: /* subquery */ + case 307: /* star_func_para */ + case 308: /* predicate */ + case 311: /* in_predicate_value */ + case 312: /* boolean_value_expression */ + case 313: /* boolean_primary */ + case 314: /* common_expression */ + case 315: /* from_clause */ + case 316: /* table_reference_list */ + case 317: /* table_reference */ + case 318: /* table_primary */ + case 319: /* joined_table */ + case 321: /* parenthesized_joined_table */ + case 323: /* search_condition */ + case 324: /* query_specification */ + case 327: /* where_clause_opt */ + case 329: /* twindow_clause_opt */ + case 331: /* having_clause_opt */ + case 333: /* select_item */ + case 334: /* fill_opt */ + case 337: /* query_expression_body */ + case 339: /* slimit_clause_opt */ + case 340: /* limit_clause_opt */ + case 341: /* query_primary */ + case 343: /* sort_specification */ { - nodesDestroyNode((yypminor->yy392)); + nodesDestroyNode((yypminor->yy456)); } break; - case 223: /* account_options */ - case 224: /* alter_account_options */ - case 226: /* alter_account_option */ - case 279: /* bufsize_opt */ + case 232: /* account_options */ + case 233: /* alter_account_options */ + case 235: /* alter_account_option */ + case 289: /* bufsize_opt */ { } break; - case 227: /* user_name */ - case 228: /* dnode_endpoint */ - case 229: /* dnode_host_name */ - case 231: /* db_name */ - case 249: /* column_name */ - case 256: /* table_name */ - case 266: /* function_name */ - case 267: /* index_name */ - case 274: /* topic_name */ - case 280: /* stream_name */ - case 286: /* table_alias */ - case 287: /* column_alias */ - case 293: /* star_func */ - case 295: /* noarg_func */ - case 310: /* alias_opt */ + case 236: /* user_name */ + case 237: /* dnode_endpoint */ + case 238: /* dnode_host_name */ + case 240: /* db_name */ + case 258: /* column_name */ + case 265: /* table_name */ + case 275: /* function_name */ + case 276: /* index_name */ + case 283: /* topic_name */ + case 290: /* stream_name */ + case 296: /* table_alias */ + case 297: /* column_alias */ + case 303: /* star_func */ + case 305: /* noarg_func */ + case 320: /* alias_opt */ { } break; - case 230: /* not_exists_opt */ - case 233: /* exists_opt */ - case 276: /* analyze_opt */ - case 278: /* agg_func_opt */ - case 315: /* set_quantifier_opt */ + case 239: /* not_exists_opt */ + case 242: /* exists_opt */ + case 286: /* analyze_opt */ + case 288: /* agg_func_opt */ + case 325: /* set_quantifier_opt */ { } break; - case 235: /* integer_list */ - case 236: /* variable_list */ - case 237: /* retention_list */ - case 241: /* column_def_list */ - case 242: /* tags_def_opt */ - case 244: /* multi_create_clause */ - case 245: /* tags_def */ - case 246: /* multi_drop_clause */ - case 252: /* specific_tags_opt */ - case 253: /* literal_list */ - case 255: /* col_name_list */ - case 258: /* func_name_list */ - case 269: /* func_list */ - case 273: /* expression_list */ - case 283: /* dnode_list */ - case 294: /* star_func_para_list */ - case 296: /* other_para_list */ - case 316: /* select_list */ - case 318: /* partition_by_clause_opt */ - case 320: /* group_by_clause_opt */ - case 322: /* select_sublist */ - case 326: /* group_by_list */ - case 328: /* order_by_clause_opt */ - case 332: /* sort_specification_list */ + case 244: /* integer_list */ + case 245: /* variable_list */ + case 246: /* retention_list */ + case 250: /* column_def_list */ + case 251: /* tags_def_opt */ + case 253: /* multi_create_clause */ + case 254: /* tags_def */ + case 255: /* multi_drop_clause */ + case 261: /* specific_tags_opt */ + case 262: /* literal_list */ + case 264: /* col_name_list */ + case 267: /* func_name_list */ + case 278: /* func_list */ + case 282: /* expression_list */ + case 293: /* dnode_list */ + case 304: /* star_func_para_list */ + case 306: /* other_para_list */ + case 326: /* select_list */ + case 328: /* partition_by_clause_opt */ + case 330: /* group_by_clause_opt */ + case 332: /* select_sublist */ + case 336: /* group_by_list */ + case 338: /* order_by_clause_opt */ + case 342: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy376)); + nodesDestroyList((yypminor->yy652)); } break; - case 238: /* alter_db_option */ - case 259: /* alter_table_option */ + case 247: /* alter_db_option */ + case 268: /* alter_table_option */ { } break; - case 250: /* type_name */ + case 259: /* type_name */ { } break; - case 299: /* compare_op */ - case 300: /* in_op */ + case 309: /* compare_op */ + case 310: /* in_op */ { } break; - case 312: /* join_type */ + case 322: /* join_type */ { } break; - case 325: /* fill_mode */ + case 335: /* fill_mode */ { } break; - case 334: /* ordering_specification_opt */ + case 344: /* ordering_specification_opt */ { } break; - case 335: /* null_ordering_opt */ + case 345: /* null_ordering_opt */ { } @@ -2224,443 +2462,447 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 222, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 222, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 223, 0 }, /* (2) account_options ::= */ - { 223, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 223, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 223, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 223, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 223, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 223, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 223, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 223, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 223, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 224, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 224, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 226, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 226, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 226, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 226, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 226, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 226, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 226, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 226, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 226, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 226, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 222, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ - { 222, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 222, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ - { 222, -3 }, /* (27) cmd ::= DROP USER user_name */ - { 222, -3 }, /* (28) cmd ::= CREATE DNODE dnode_endpoint */ - { 222, -5 }, /* (29) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ - { 222, -3 }, /* (30) cmd ::= DROP DNODE NK_INTEGER */ - { 222, -3 }, /* (31) cmd ::= DROP DNODE dnode_endpoint */ - { 222, -4 }, /* (32) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 222, -5 }, /* (33) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 222, -4 }, /* (34) cmd ::= ALTER ALL DNODES NK_STRING */ - { 222, -5 }, /* (35) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 228, -1 }, /* (36) dnode_endpoint ::= NK_STRING */ - { 229, -1 }, /* (37) dnode_host_name ::= NK_ID */ - { 229, -1 }, /* (38) dnode_host_name ::= NK_IPTOKEN */ - { 222, -3 }, /* (39) cmd ::= ALTER LOCAL NK_STRING */ - { 222, -4 }, /* (40) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 222, -5 }, /* (41) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (42) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (43) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (44) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (45) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (46) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (47) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (48) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 222, -5 }, /* (49) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 222, -4 }, /* (50) cmd ::= DROP DATABASE exists_opt db_name */ - { 222, -2 }, /* (51) cmd ::= USE db_name */ - { 222, -4 }, /* (52) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 230, -3 }, /* (53) not_exists_opt ::= IF NOT EXISTS */ - { 230, 0 }, /* (54) not_exists_opt ::= */ - { 233, -2 }, /* (55) exists_opt ::= IF EXISTS */ - { 233, 0 }, /* (56) exists_opt ::= */ - { 232, 0 }, /* (57) db_options ::= */ - { 232, -3 }, /* (58) db_options ::= db_options BLOCKS NK_INTEGER */ - { 232, -3 }, /* (59) db_options ::= db_options CACHE NK_INTEGER */ - { 232, -3 }, /* (60) db_options ::= db_options CACHELAST NK_INTEGER */ - { 232, -3 }, /* (61) db_options ::= db_options COMP NK_INTEGER */ - { 232, -3 }, /* (62) db_options ::= db_options DAYS NK_INTEGER */ - { 232, -3 }, /* (63) db_options ::= db_options DAYS NK_VARIABLE */ - { 232, -3 }, /* (64) db_options ::= db_options FSYNC NK_INTEGER */ - { 232, -3 }, /* (65) db_options ::= db_options MAXROWS NK_INTEGER */ - { 232, -3 }, /* (66) db_options ::= db_options MINROWS NK_INTEGER */ - { 232, -3 }, /* (67) db_options ::= db_options KEEP integer_list */ - { 232, -3 }, /* (68) db_options ::= db_options KEEP variable_list */ - { 232, -3 }, /* (69) db_options ::= db_options PRECISION NK_STRING */ - { 232, -3 }, /* (70) db_options ::= db_options QUORUM NK_INTEGER */ - { 232, -3 }, /* (71) db_options ::= db_options REPLICA NK_INTEGER */ - { 232, -3 }, /* (72) db_options ::= db_options TTL NK_INTEGER */ - { 232, -3 }, /* (73) db_options ::= db_options WAL NK_INTEGER */ - { 232, -3 }, /* (74) db_options ::= db_options VGROUPS NK_INTEGER */ - { 232, -3 }, /* (75) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 232, -3 }, /* (76) db_options ::= db_options STREAM_MODE NK_INTEGER */ - { 232, -3 }, /* (77) db_options ::= db_options RETENTIONS retention_list */ - { 232, -3 }, /* (78) db_options ::= db_options STRICT NK_INTEGER */ - { 234, -1 }, /* (79) alter_db_options ::= alter_db_option */ - { 234, -2 }, /* (80) alter_db_options ::= alter_db_options alter_db_option */ - { 238, -2 }, /* (81) alter_db_option ::= BLOCKS NK_INTEGER */ - { 238, -2 }, /* (82) alter_db_option ::= FSYNC NK_INTEGER */ - { 238, -2 }, /* (83) alter_db_option ::= KEEP integer_list */ - { 238, -2 }, /* (84) alter_db_option ::= KEEP variable_list */ - { 238, -2 }, /* (85) alter_db_option ::= WAL NK_INTEGER */ - { 238, -2 }, /* (86) alter_db_option ::= QUORUM NK_INTEGER */ - { 238, -2 }, /* (87) alter_db_option ::= CACHELAST NK_INTEGER */ - { 238, -2 }, /* (88) alter_db_option ::= REPLICA NK_INTEGER */ - { 238, -2 }, /* (89) alter_db_option ::= STRICT NK_INTEGER */ - { 235, -1 }, /* (90) integer_list ::= NK_INTEGER */ - { 235, -3 }, /* (91) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 236, -1 }, /* (92) variable_list ::= NK_VARIABLE */ - { 236, -3 }, /* (93) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 237, -1 }, /* (94) retention_list ::= retention */ - { 237, -3 }, /* (95) retention_list ::= retention_list NK_COMMA retention */ - { 239, -3 }, /* (96) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 222, -9 }, /* (97) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 222, -3 }, /* (98) cmd ::= CREATE TABLE multi_create_clause */ - { 222, -9 }, /* (99) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 222, -3 }, /* (100) cmd ::= DROP TABLE multi_drop_clause */ - { 222, -4 }, /* (101) cmd ::= DROP STABLE exists_opt full_table_name */ - { 222, -3 }, /* (102) cmd ::= ALTER TABLE alter_table_clause */ - { 222, -3 }, /* (103) cmd ::= ALTER STABLE alter_table_clause */ - { 247, -2 }, /* (104) alter_table_clause ::= full_table_name alter_table_options */ - { 247, -5 }, /* (105) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 247, -4 }, /* (106) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 247, -5 }, /* (107) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 247, -5 }, /* (108) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 247, -5 }, /* (109) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 247, -4 }, /* (110) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 247, -5 }, /* (111) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 247, -5 }, /* (112) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 247, -6 }, /* (113) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ - { 244, -1 }, /* (114) multi_create_clause ::= create_subtable_clause */ - { 244, -2 }, /* (115) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 251, -9 }, /* (116) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ - { 246, -1 }, /* (117) multi_drop_clause ::= drop_table_clause */ - { 246, -2 }, /* (118) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 254, -2 }, /* (119) drop_table_clause ::= exists_opt full_table_name */ - { 252, 0 }, /* (120) specific_tags_opt ::= */ - { 252, -3 }, /* (121) specific_tags_opt ::= NK_LP col_name_list NK_RP */ - { 240, -1 }, /* (122) full_table_name ::= table_name */ - { 240, -3 }, /* (123) full_table_name ::= db_name NK_DOT table_name */ - { 241, -1 }, /* (124) column_def_list ::= column_def */ - { 241, -3 }, /* (125) column_def_list ::= column_def_list NK_COMMA column_def */ - { 257, -2 }, /* (126) column_def ::= column_name type_name */ - { 257, -4 }, /* (127) column_def ::= column_name type_name COMMENT NK_STRING */ - { 250, -1 }, /* (128) type_name ::= BOOL */ - { 250, -1 }, /* (129) type_name ::= TINYINT */ - { 250, -1 }, /* (130) type_name ::= SMALLINT */ - { 250, -1 }, /* (131) type_name ::= INT */ - { 250, -1 }, /* (132) type_name ::= INTEGER */ - { 250, -1 }, /* (133) type_name ::= BIGINT */ - { 250, -1 }, /* (134) type_name ::= FLOAT */ - { 250, -1 }, /* (135) type_name ::= DOUBLE */ - { 250, -4 }, /* (136) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 250, -1 }, /* (137) type_name ::= TIMESTAMP */ - { 250, -4 }, /* (138) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 250, -2 }, /* (139) type_name ::= TINYINT UNSIGNED */ - { 250, -2 }, /* (140) type_name ::= SMALLINT UNSIGNED */ - { 250, -2 }, /* (141) type_name ::= INT UNSIGNED */ - { 250, -2 }, /* (142) type_name ::= BIGINT UNSIGNED */ - { 250, -1 }, /* (143) type_name ::= JSON */ - { 250, -4 }, /* (144) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 250, -1 }, /* (145) type_name ::= MEDIUMBLOB */ - { 250, -1 }, /* (146) type_name ::= BLOB */ - { 250, -4 }, /* (147) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 250, -1 }, /* (148) type_name ::= DECIMAL */ - { 250, -4 }, /* (149) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 250, -6 }, /* (150) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 242, 0 }, /* (151) tags_def_opt ::= */ - { 242, -1 }, /* (152) tags_def_opt ::= tags_def */ - { 245, -4 }, /* (153) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 243, 0 }, /* (154) table_options ::= */ - { 243, -3 }, /* (155) table_options ::= table_options COMMENT NK_STRING */ - { 243, -3 }, /* (156) table_options ::= table_options KEEP integer_list */ - { 243, -3 }, /* (157) table_options ::= table_options KEEP variable_list */ - { 243, -3 }, /* (158) table_options ::= table_options TTL NK_INTEGER */ - { 243, -5 }, /* (159) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 243, -5 }, /* (160) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ - { 243, -3 }, /* (161) table_options ::= table_options FILE_FACTOR NK_FLOAT */ - { 243, -3 }, /* (162) table_options ::= table_options DELAY NK_INTEGER */ - { 248, -1 }, /* (163) alter_table_options ::= alter_table_option */ - { 248, -2 }, /* (164) alter_table_options ::= alter_table_options alter_table_option */ - { 259, -2 }, /* (165) alter_table_option ::= COMMENT NK_STRING */ - { 259, -2 }, /* (166) alter_table_option ::= KEEP integer_list */ - { 259, -2 }, /* (167) alter_table_option ::= KEEP variable_list */ - { 259, -2 }, /* (168) alter_table_option ::= TTL NK_INTEGER */ - { 255, -1 }, /* (169) col_name_list ::= col_name */ - { 255, -3 }, /* (170) col_name_list ::= col_name_list NK_COMMA col_name */ - { 260, -1 }, /* (171) col_name ::= column_name */ - { 222, -2 }, /* (172) cmd ::= SHOW DNODES */ - { 222, -2 }, /* (173) cmd ::= SHOW USERS */ - { 222, -2 }, /* (174) cmd ::= SHOW DATABASES */ - { 222, -4 }, /* (175) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 222, -4 }, /* (176) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 222, -3 }, /* (177) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 222, -2 }, /* (178) cmd ::= SHOW MNODES */ - { 222, -2 }, /* (179) cmd ::= SHOW MODULES */ - { 222, -2 }, /* (180) cmd ::= SHOW QNODES */ - { 222, -2 }, /* (181) cmd ::= SHOW FUNCTIONS */ - { 222, -5 }, /* (182) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 222, -2 }, /* (183) cmd ::= SHOW STREAMS */ - { 222, -2 }, /* (184) cmd ::= SHOW ACCOUNTS */ - { 222, -2 }, /* (185) cmd ::= SHOW APPS */ - { 222, -2 }, /* (186) cmd ::= SHOW CONNECTIONS */ - { 222, -2 }, /* (187) cmd ::= SHOW LICENCE */ - { 222, -2 }, /* (188) cmd ::= SHOW GRANTS */ - { 222, -4 }, /* (189) cmd ::= SHOW CREATE DATABASE db_name */ - { 222, -4 }, /* (190) cmd ::= SHOW CREATE TABLE full_table_name */ - { 222, -4 }, /* (191) cmd ::= SHOW CREATE STABLE full_table_name */ - { 222, -2 }, /* (192) cmd ::= SHOW QUERIES */ - { 222, -2 }, /* (193) cmd ::= SHOW SCORES */ - { 222, -2 }, /* (194) cmd ::= SHOW TOPICS */ - { 222, -2 }, /* (195) cmd ::= SHOW VARIABLES */ - { 222, -2 }, /* (196) cmd ::= SHOW BNODES */ - { 222, -2 }, /* (197) cmd ::= SHOW SNODES */ - { 222, -2 }, /* (198) cmd ::= SHOW CLUSTER */ - { 261, 0 }, /* (199) db_name_cond_opt ::= */ - { 261, -2 }, /* (200) db_name_cond_opt ::= db_name NK_DOT */ - { 262, 0 }, /* (201) like_pattern_opt ::= */ - { 262, -2 }, /* (202) like_pattern_opt ::= LIKE NK_STRING */ - { 263, -1 }, /* (203) table_name_cond ::= table_name */ - { 264, 0 }, /* (204) from_db_opt ::= */ - { 264, -2 }, /* (205) from_db_opt ::= FROM db_name */ - { 258, -1 }, /* (206) func_name_list ::= func_name */ - { 258, -3 }, /* (207) func_name_list ::= func_name_list NK_COMMA func_name */ - { 265, -1 }, /* (208) func_name ::= function_name */ - { 222, -8 }, /* (209) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ - { 222, -10 }, /* (210) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ - { 222, -6 }, /* (211) cmd ::= DROP INDEX exists_opt index_name ON table_name */ - { 268, 0 }, /* (212) index_options ::= */ - { 268, -9 }, /* (213) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ - { 268, -11 }, /* (214) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ - { 269, -1 }, /* (215) func_list ::= func */ - { 269, -3 }, /* (216) func_list ::= func_list NK_COMMA func */ - { 272, -4 }, /* (217) func ::= function_name NK_LP expression_list NK_RP */ - { 222, -6 }, /* (218) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ - { 222, -6 }, /* (219) cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ - { 222, -4 }, /* (220) cmd ::= DROP TOPIC exists_opt topic_name */ - { 222, -2 }, /* (221) cmd ::= DESC full_table_name */ - { 222, -2 }, /* (222) cmd ::= DESCRIBE full_table_name */ - { 222, -3 }, /* (223) cmd ::= RESET QUERY CACHE */ - { 222, -4 }, /* (224) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 276, 0 }, /* (225) analyze_opt ::= */ - { 276, -1 }, /* (226) analyze_opt ::= ANALYZE */ - { 277, 0 }, /* (227) explain_options ::= */ - { 277, -3 }, /* (228) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 277, -3 }, /* (229) explain_options ::= explain_options RATIO NK_FLOAT */ - { 222, -6 }, /* (230) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ - { 222, -10 }, /* (231) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 222, -3 }, /* (232) cmd ::= DROP FUNCTION function_name */ - { 278, 0 }, /* (233) agg_func_opt ::= */ - { 278, -1 }, /* (234) agg_func_opt ::= AGGREGATE */ - { 279, 0 }, /* (235) bufsize_opt ::= */ - { 279, -2 }, /* (236) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 222, -8 }, /* (237) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - { 222, -4 }, /* (238) cmd ::= DROP STREAM exists_opt stream_name */ - { 282, 0 }, /* (239) into_opt ::= */ - { 282, -2 }, /* (240) into_opt ::= INTO full_table_name */ - { 281, 0 }, /* (241) stream_options ::= */ - { 281, -3 }, /* (242) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 281, -3 }, /* (243) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 281, -3 }, /* (244) stream_options ::= stream_options WATERMARK duration_literal */ - { 222, -3 }, /* (245) cmd ::= KILL CONNECTION NK_INTEGER */ - { 222, -3 }, /* (246) cmd ::= KILL QUERY NK_INTEGER */ - { 222, -4 }, /* (247) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 222, -4 }, /* (248) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 222, -3 }, /* (249) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 283, -2 }, /* (250) dnode_list ::= DNODE NK_INTEGER */ - { 283, -3 }, /* (251) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 222, -3 }, /* (252) cmd ::= SYNCDB db_name REPLICA */ - { 222, -1 }, /* (253) cmd ::= query_expression */ - { 225, -1 }, /* (254) literal ::= NK_INTEGER */ - { 225, -1 }, /* (255) literal ::= NK_FLOAT */ - { 225, -1 }, /* (256) literal ::= NK_STRING */ - { 225, -1 }, /* (257) literal ::= NK_BOOL */ - { 225, -2 }, /* (258) literal ::= TIMESTAMP NK_STRING */ - { 225, -1 }, /* (259) literal ::= duration_literal */ - { 225, -1 }, /* (260) literal ::= NULL */ - { 225, -1 }, /* (261) literal ::= NK_QUESTION */ - { 270, -1 }, /* (262) duration_literal ::= NK_VARIABLE */ - { 284, -1 }, /* (263) signed ::= NK_INTEGER */ - { 284, -2 }, /* (264) signed ::= NK_PLUS NK_INTEGER */ - { 284, -2 }, /* (265) signed ::= NK_MINUS NK_INTEGER */ - { 284, -1 }, /* (266) signed ::= NK_FLOAT */ - { 284, -2 }, /* (267) signed ::= NK_PLUS NK_FLOAT */ - { 284, -2 }, /* (268) signed ::= NK_MINUS NK_FLOAT */ - { 285, -1 }, /* (269) signed_literal ::= signed */ - { 285, -1 }, /* (270) signed_literal ::= NK_STRING */ - { 285, -1 }, /* (271) signed_literal ::= NK_BOOL */ - { 285, -2 }, /* (272) signed_literal ::= TIMESTAMP NK_STRING */ - { 285, -1 }, /* (273) signed_literal ::= duration_literal */ - { 285, -1 }, /* (274) signed_literal ::= NULL */ - { 253, -1 }, /* (275) literal_list ::= signed_literal */ - { 253, -3 }, /* (276) literal_list ::= literal_list NK_COMMA signed_literal */ - { 231, -1 }, /* (277) db_name ::= NK_ID */ - { 256, -1 }, /* (278) table_name ::= NK_ID */ - { 249, -1 }, /* (279) column_name ::= NK_ID */ - { 266, -1 }, /* (280) function_name ::= NK_ID */ - { 286, -1 }, /* (281) table_alias ::= NK_ID */ - { 287, -1 }, /* (282) column_alias ::= NK_ID */ - { 227, -1 }, /* (283) user_name ::= NK_ID */ - { 267, -1 }, /* (284) index_name ::= NK_ID */ - { 274, -1 }, /* (285) topic_name ::= NK_ID */ - { 280, -1 }, /* (286) stream_name ::= NK_ID */ - { 288, -1 }, /* (287) expression ::= literal */ - { 288, -1 }, /* (288) expression ::= pseudo_column */ - { 288, -1 }, /* (289) expression ::= column_reference */ - { 288, -1 }, /* (290) expression ::= function_expression */ - { 288, -1 }, /* (291) expression ::= subquery */ - { 288, -3 }, /* (292) expression ::= NK_LP expression NK_RP */ - { 288, -2 }, /* (293) expression ::= NK_PLUS expression */ - { 288, -2 }, /* (294) expression ::= NK_MINUS expression */ - { 288, -3 }, /* (295) expression ::= expression NK_PLUS expression */ - { 288, -3 }, /* (296) expression ::= expression NK_MINUS expression */ - { 288, -3 }, /* (297) expression ::= expression NK_STAR expression */ - { 288, -3 }, /* (298) expression ::= expression NK_SLASH expression */ - { 288, -3 }, /* (299) expression ::= expression NK_REM expression */ - { 288, -3 }, /* (300) expression ::= column_reference NK_ARROW NK_STRING */ - { 273, -1 }, /* (301) expression_list ::= expression */ - { 273, -3 }, /* (302) expression_list ::= expression_list NK_COMMA expression */ - { 290, -1 }, /* (303) column_reference ::= column_name */ - { 290, -3 }, /* (304) column_reference ::= table_name NK_DOT column_name */ - { 289, -1 }, /* (305) pseudo_column ::= ROWTS */ - { 289, -1 }, /* (306) pseudo_column ::= TBNAME */ - { 289, -1 }, /* (307) pseudo_column ::= QSTARTTS */ - { 289, -1 }, /* (308) pseudo_column ::= QENDTS */ - { 289, -1 }, /* (309) pseudo_column ::= WSTARTTS */ - { 289, -1 }, /* (310) pseudo_column ::= WENDTS */ - { 289, -1 }, /* (311) pseudo_column ::= WDURATION */ - { 291, -4 }, /* (312) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 291, -4 }, /* (313) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 291, -6 }, /* (314) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - { 291, -3 }, /* (315) function_expression ::= noarg_func NK_LP NK_RP */ - { 295, -1 }, /* (316) noarg_func ::= NOW */ - { 295, -1 }, /* (317) noarg_func ::= TODAY */ - { 295, -1 }, /* (318) noarg_func ::= TIMEZONE */ - { 293, -1 }, /* (319) star_func ::= COUNT */ - { 293, -1 }, /* (320) star_func ::= FIRST */ - { 293, -1 }, /* (321) star_func ::= LAST */ - { 293, -1 }, /* (322) star_func ::= LAST_ROW */ - { 294, -1 }, /* (323) star_func_para_list ::= NK_STAR */ - { 294, -1 }, /* (324) star_func_para_list ::= other_para_list */ - { 296, -1 }, /* (325) other_para_list ::= star_func_para */ - { 296, -3 }, /* (326) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 297, -1 }, /* (327) star_func_para ::= expression */ - { 297, -3 }, /* (328) star_func_para ::= table_name NK_DOT NK_STAR */ - { 298, -3 }, /* (329) predicate ::= expression compare_op expression */ - { 298, -5 }, /* (330) predicate ::= expression BETWEEN expression AND expression */ - { 298, -6 }, /* (331) predicate ::= expression NOT BETWEEN expression AND expression */ - { 298, -3 }, /* (332) predicate ::= expression IS NULL */ - { 298, -4 }, /* (333) predicate ::= expression IS NOT NULL */ - { 298, -3 }, /* (334) predicate ::= expression in_op in_predicate_value */ - { 299, -1 }, /* (335) compare_op ::= NK_LT */ - { 299, -1 }, /* (336) compare_op ::= NK_GT */ - { 299, -1 }, /* (337) compare_op ::= NK_LE */ - { 299, -1 }, /* (338) compare_op ::= NK_GE */ - { 299, -1 }, /* (339) compare_op ::= NK_NE */ - { 299, -1 }, /* (340) compare_op ::= NK_EQ */ - { 299, -1 }, /* (341) compare_op ::= LIKE */ - { 299, -2 }, /* (342) compare_op ::= NOT LIKE */ - { 299, -1 }, /* (343) compare_op ::= MATCH */ - { 299, -1 }, /* (344) compare_op ::= NMATCH */ - { 299, -1 }, /* (345) compare_op ::= CONTAINS */ - { 300, -1 }, /* (346) in_op ::= IN */ - { 300, -2 }, /* (347) in_op ::= NOT IN */ - { 301, -3 }, /* (348) in_predicate_value ::= NK_LP expression_list NK_RP */ - { 302, -1 }, /* (349) boolean_value_expression ::= boolean_primary */ - { 302, -2 }, /* (350) boolean_value_expression ::= NOT boolean_primary */ - { 302, -3 }, /* (351) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 302, -3 }, /* (352) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 303, -1 }, /* (353) boolean_primary ::= predicate */ - { 303, -3 }, /* (354) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 304, -1 }, /* (355) common_expression ::= expression */ - { 304, -1 }, /* (356) common_expression ::= boolean_value_expression */ - { 305, -2 }, /* (357) from_clause ::= FROM table_reference_list */ - { 306, -1 }, /* (358) table_reference_list ::= table_reference */ - { 306, -3 }, /* (359) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 307, -1 }, /* (360) table_reference ::= table_primary */ - { 307, -1 }, /* (361) table_reference ::= joined_table */ - { 308, -2 }, /* (362) table_primary ::= table_name alias_opt */ - { 308, -4 }, /* (363) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 308, -2 }, /* (364) table_primary ::= subquery alias_opt */ - { 308, -1 }, /* (365) table_primary ::= parenthesized_joined_table */ - { 310, 0 }, /* (366) alias_opt ::= */ - { 310, -1 }, /* (367) alias_opt ::= table_alias */ - { 310, -2 }, /* (368) alias_opt ::= AS table_alias */ - { 311, -3 }, /* (369) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 311, -3 }, /* (370) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 309, -6 }, /* (371) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 312, 0 }, /* (372) join_type ::= */ - { 312, -1 }, /* (373) join_type ::= INNER */ - { 314, -9 }, /* (374) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 315, 0 }, /* (375) set_quantifier_opt ::= */ - { 315, -1 }, /* (376) set_quantifier_opt ::= DISTINCT */ - { 315, -1 }, /* (377) set_quantifier_opt ::= ALL */ - { 316, -1 }, /* (378) select_list ::= NK_STAR */ - { 316, -1 }, /* (379) select_list ::= select_sublist */ - { 322, -1 }, /* (380) select_sublist ::= select_item */ - { 322, -3 }, /* (381) select_sublist ::= select_sublist NK_COMMA select_item */ - { 323, -1 }, /* (382) select_item ::= common_expression */ - { 323, -2 }, /* (383) select_item ::= common_expression column_alias */ - { 323, -3 }, /* (384) select_item ::= common_expression AS column_alias */ - { 323, -3 }, /* (385) select_item ::= table_name NK_DOT NK_STAR */ - { 317, 0 }, /* (386) where_clause_opt ::= */ - { 317, -2 }, /* (387) where_clause_opt ::= WHERE search_condition */ - { 318, 0 }, /* (388) partition_by_clause_opt ::= */ - { 318, -3 }, /* (389) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 319, 0 }, /* (390) twindow_clause_opt ::= */ - { 319, -6 }, /* (391) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 319, -4 }, /* (392) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - { 319, -6 }, /* (393) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 319, -8 }, /* (394) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 271, 0 }, /* (395) sliding_opt ::= */ - { 271, -4 }, /* (396) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 324, 0 }, /* (397) fill_opt ::= */ - { 324, -4 }, /* (398) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 324, -6 }, /* (399) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 325, -1 }, /* (400) fill_mode ::= NONE */ - { 325, -1 }, /* (401) fill_mode ::= PREV */ - { 325, -1 }, /* (402) fill_mode ::= NULL */ - { 325, -1 }, /* (403) fill_mode ::= LINEAR */ - { 325, -1 }, /* (404) fill_mode ::= NEXT */ - { 320, 0 }, /* (405) group_by_clause_opt ::= */ - { 320, -3 }, /* (406) group_by_clause_opt ::= GROUP BY group_by_list */ - { 326, -1 }, /* (407) group_by_list ::= expression */ - { 326, -3 }, /* (408) group_by_list ::= group_by_list NK_COMMA expression */ - { 321, 0 }, /* (409) having_clause_opt ::= */ - { 321, -2 }, /* (410) having_clause_opt ::= HAVING search_condition */ - { 275, -4 }, /* (411) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 327, -1 }, /* (412) query_expression_body ::= query_primary */ - { 327, -4 }, /* (413) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 327, -3 }, /* (414) query_expression_body ::= query_expression_body UNION query_expression_body */ - { 331, -1 }, /* (415) query_primary ::= query_specification */ - { 328, 0 }, /* (416) order_by_clause_opt ::= */ - { 328, -3 }, /* (417) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 329, 0 }, /* (418) slimit_clause_opt ::= */ - { 329, -2 }, /* (419) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 329, -4 }, /* (420) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 329, -4 }, /* (421) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 330, 0 }, /* (422) limit_clause_opt ::= */ - { 330, -2 }, /* (423) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 330, -4 }, /* (424) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 330, -4 }, /* (425) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 292, -3 }, /* (426) subquery ::= NK_LP query_expression NK_RP */ - { 313, -1 }, /* (427) search_condition ::= common_expression */ - { 332, -1 }, /* (428) sort_specification_list ::= sort_specification */ - { 332, -3 }, /* (429) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 333, -3 }, /* (430) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 334, 0 }, /* (431) ordering_specification_opt ::= */ - { 334, -1 }, /* (432) ordering_specification_opt ::= ASC */ - { 334, -1 }, /* (433) ordering_specification_opt ::= DESC */ - { 335, 0 }, /* (434) null_ordering_opt ::= */ - { 335, -2 }, /* (435) null_ordering_opt ::= NULLS FIRST */ - { 335, -2 }, /* (436) null_ordering_opt ::= NULLS LAST */ + { 231, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 231, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 232, 0 }, /* (2) account_options ::= */ + { 232, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 232, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 232, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 232, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 232, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 232, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 232, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 232, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 232, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 233, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 233, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 235, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 235, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 235, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 235, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 235, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 235, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 235, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 235, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 235, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 235, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 231, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ + { 231, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 231, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ + { 231, -3 }, /* (27) cmd ::= DROP USER user_name */ + { 231, -3 }, /* (28) cmd ::= CREATE DNODE dnode_endpoint */ + { 231, -5 }, /* (29) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ + { 231, -3 }, /* (30) cmd ::= DROP DNODE NK_INTEGER */ + { 231, -3 }, /* (31) cmd ::= DROP DNODE dnode_endpoint */ + { 231, -4 }, /* (32) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 231, -5 }, /* (33) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 231, -4 }, /* (34) cmd ::= ALTER ALL DNODES NK_STRING */ + { 231, -5 }, /* (35) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 237, -1 }, /* (36) dnode_endpoint ::= NK_STRING */ + { 238, -1 }, /* (37) dnode_host_name ::= NK_ID */ + { 238, -1 }, /* (38) dnode_host_name ::= NK_IPTOKEN */ + { 231, -3 }, /* (39) cmd ::= ALTER LOCAL NK_STRING */ + { 231, -4 }, /* (40) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 231, -5 }, /* (41) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (42) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (43) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (44) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (45) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (46) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (47) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (48) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 231, -5 }, /* (49) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 231, -4 }, /* (50) cmd ::= DROP DATABASE exists_opt db_name */ + { 231, -2 }, /* (51) cmd ::= USE db_name */ + { 231, -4 }, /* (52) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 239, -3 }, /* (53) not_exists_opt ::= IF NOT EXISTS */ + { 239, 0 }, /* (54) not_exists_opt ::= */ + { 242, -2 }, /* (55) exists_opt ::= IF EXISTS */ + { 242, 0 }, /* (56) exists_opt ::= */ + { 241, 0 }, /* (57) db_options ::= */ + { 241, -3 }, /* (58) db_options ::= db_options BLOCKS NK_INTEGER */ + { 241, -3 }, /* (59) db_options ::= db_options CACHE NK_INTEGER */ + { 241, -3 }, /* (60) db_options ::= db_options CACHELAST NK_INTEGER */ + { 241, -3 }, /* (61) db_options ::= db_options COMP NK_INTEGER */ + { 241, -3 }, /* (62) db_options ::= db_options DAYS NK_INTEGER */ + { 241, -3 }, /* (63) db_options ::= db_options DAYS NK_VARIABLE */ + { 241, -3 }, /* (64) db_options ::= db_options FSYNC NK_INTEGER */ + { 241, -3 }, /* (65) db_options ::= db_options MAXROWS NK_INTEGER */ + { 241, -3 }, /* (66) db_options ::= db_options MINROWS NK_INTEGER */ + { 241, -3 }, /* (67) db_options ::= db_options KEEP integer_list */ + { 241, -3 }, /* (68) db_options ::= db_options KEEP variable_list */ + { 241, -3 }, /* (69) db_options ::= db_options PRECISION NK_STRING */ + { 241, -3 }, /* (70) db_options ::= db_options QUORUM NK_INTEGER */ + { 241, -3 }, /* (71) db_options ::= db_options REPLICA NK_INTEGER */ + { 241, -3 }, /* (72) db_options ::= db_options TTL NK_INTEGER */ + { 241, -3 }, /* (73) db_options ::= db_options WAL NK_INTEGER */ + { 241, -3 }, /* (74) db_options ::= db_options VGROUPS NK_INTEGER */ + { 241, -3 }, /* (75) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 241, -3 }, /* (76) db_options ::= db_options STREAM_MODE NK_INTEGER */ + { 241, -3 }, /* (77) db_options ::= db_options RETENTIONS retention_list */ + { 241, -3 }, /* (78) db_options ::= db_options STRICT NK_INTEGER */ + { 243, -1 }, /* (79) alter_db_options ::= alter_db_option */ + { 243, -2 }, /* (80) alter_db_options ::= alter_db_options alter_db_option */ + { 247, -2 }, /* (81) alter_db_option ::= BLOCKS NK_INTEGER */ + { 247, -2 }, /* (82) alter_db_option ::= FSYNC NK_INTEGER */ + { 247, -2 }, /* (83) alter_db_option ::= KEEP integer_list */ + { 247, -2 }, /* (84) alter_db_option ::= KEEP variable_list */ + { 247, -2 }, /* (85) alter_db_option ::= WAL NK_INTEGER */ + { 247, -2 }, /* (86) alter_db_option ::= QUORUM NK_INTEGER */ + { 247, -2 }, /* (87) alter_db_option ::= CACHELAST NK_INTEGER */ + { 247, -2 }, /* (88) alter_db_option ::= REPLICA NK_INTEGER */ + { 247, -2 }, /* (89) alter_db_option ::= STRICT NK_INTEGER */ + { 244, -1 }, /* (90) integer_list ::= NK_INTEGER */ + { 244, -3 }, /* (91) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 245, -1 }, /* (92) variable_list ::= NK_VARIABLE */ + { 245, -3 }, /* (93) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 246, -1 }, /* (94) retention_list ::= retention */ + { 246, -3 }, /* (95) retention_list ::= retention_list NK_COMMA retention */ + { 248, -3 }, /* (96) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 231, -9 }, /* (97) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 231, -3 }, /* (98) cmd ::= CREATE TABLE multi_create_clause */ + { 231, -9 }, /* (99) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 231, -3 }, /* (100) cmd ::= DROP TABLE multi_drop_clause */ + { 231, -4 }, /* (101) cmd ::= DROP STABLE exists_opt full_table_name */ + { 231, -3 }, /* (102) cmd ::= ALTER TABLE alter_table_clause */ + { 231, -3 }, /* (103) cmd ::= ALTER STABLE alter_table_clause */ + { 256, -2 }, /* (104) alter_table_clause ::= full_table_name alter_table_options */ + { 256, -5 }, /* (105) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 256, -4 }, /* (106) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 256, -5 }, /* (107) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 256, -5 }, /* (108) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 256, -5 }, /* (109) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 256, -4 }, /* (110) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 256, -5 }, /* (111) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 256, -5 }, /* (112) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 256, -6 }, /* (113) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ + { 253, -1 }, /* (114) multi_create_clause ::= create_subtable_clause */ + { 253, -2 }, /* (115) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 260, -9 }, /* (116) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ + { 255, -1 }, /* (117) multi_drop_clause ::= drop_table_clause */ + { 255, -2 }, /* (118) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 263, -2 }, /* (119) drop_table_clause ::= exists_opt full_table_name */ + { 261, 0 }, /* (120) specific_tags_opt ::= */ + { 261, -3 }, /* (121) specific_tags_opt ::= NK_LP col_name_list NK_RP */ + { 249, -1 }, /* (122) full_table_name ::= table_name */ + { 249, -3 }, /* (123) full_table_name ::= db_name NK_DOT table_name */ + { 250, -1 }, /* (124) column_def_list ::= column_def */ + { 250, -3 }, /* (125) column_def_list ::= column_def_list NK_COMMA column_def */ + { 266, -2 }, /* (126) column_def ::= column_name type_name */ + { 266, -4 }, /* (127) column_def ::= column_name type_name COMMENT NK_STRING */ + { 259, -1 }, /* (128) type_name ::= BOOL */ + { 259, -1 }, /* (129) type_name ::= TINYINT */ + { 259, -1 }, /* (130) type_name ::= SMALLINT */ + { 259, -1 }, /* (131) type_name ::= INT */ + { 259, -1 }, /* (132) type_name ::= INTEGER */ + { 259, -1 }, /* (133) type_name ::= BIGINT */ + { 259, -1 }, /* (134) type_name ::= FLOAT */ + { 259, -1 }, /* (135) type_name ::= DOUBLE */ + { 259, -4 }, /* (136) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 259, -1 }, /* (137) type_name ::= TIMESTAMP */ + { 259, -4 }, /* (138) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 259, -2 }, /* (139) type_name ::= TINYINT UNSIGNED */ + { 259, -2 }, /* (140) type_name ::= SMALLINT UNSIGNED */ + { 259, -2 }, /* (141) type_name ::= INT UNSIGNED */ + { 259, -2 }, /* (142) type_name ::= BIGINT UNSIGNED */ + { 259, -1 }, /* (143) type_name ::= JSON */ + { 259, -4 }, /* (144) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 259, -1 }, /* (145) type_name ::= MEDIUMBLOB */ + { 259, -1 }, /* (146) type_name ::= BLOB */ + { 259, -4 }, /* (147) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 259, -1 }, /* (148) type_name ::= DECIMAL */ + { 259, -4 }, /* (149) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 259, -6 }, /* (150) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 251, 0 }, /* (151) tags_def_opt ::= */ + { 251, -1 }, /* (152) tags_def_opt ::= tags_def */ + { 254, -4 }, /* (153) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 252, 0 }, /* (154) table_options ::= */ + { 252, -3 }, /* (155) table_options ::= table_options COMMENT NK_STRING */ + { 252, -3 }, /* (156) table_options ::= table_options KEEP integer_list */ + { 252, -3 }, /* (157) table_options ::= table_options KEEP variable_list */ + { 252, -3 }, /* (158) table_options ::= table_options TTL NK_INTEGER */ + { 252, -5 }, /* (159) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 252, -5 }, /* (160) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ + { 252, -3 }, /* (161) table_options ::= table_options FILE_FACTOR NK_FLOAT */ + { 252, -3 }, /* (162) table_options ::= table_options DELAY NK_INTEGER */ + { 257, -1 }, /* (163) alter_table_options ::= alter_table_option */ + { 257, -2 }, /* (164) alter_table_options ::= alter_table_options alter_table_option */ + { 268, -2 }, /* (165) alter_table_option ::= COMMENT NK_STRING */ + { 268, -2 }, /* (166) alter_table_option ::= KEEP integer_list */ + { 268, -2 }, /* (167) alter_table_option ::= KEEP variable_list */ + { 268, -2 }, /* (168) alter_table_option ::= TTL NK_INTEGER */ + { 264, -1 }, /* (169) col_name_list ::= col_name */ + { 264, -3 }, /* (170) col_name_list ::= col_name_list NK_COMMA col_name */ + { 269, -1 }, /* (171) col_name ::= column_name */ + { 231, -2 }, /* (172) cmd ::= SHOW DNODES */ + { 231, -2 }, /* (173) cmd ::= SHOW USERS */ + { 231, -2 }, /* (174) cmd ::= SHOW DATABASES */ + { 231, -4 }, /* (175) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 231, -4 }, /* (176) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 231, -3 }, /* (177) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 231, -2 }, /* (178) cmd ::= SHOW MNODES */ + { 231, -2 }, /* (179) cmd ::= SHOW MODULES */ + { 231, -2 }, /* (180) cmd ::= SHOW QNODES */ + { 231, -2 }, /* (181) cmd ::= SHOW FUNCTIONS */ + { 231, -5 }, /* (182) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 231, -2 }, /* (183) cmd ::= SHOW STREAMS */ + { 231, -2 }, /* (184) cmd ::= SHOW ACCOUNTS */ + { 231, -2 }, /* (185) cmd ::= SHOW APPS */ + { 231, -2 }, /* (186) cmd ::= SHOW CONNECTIONS */ + { 231, -2 }, /* (187) cmd ::= SHOW LICENCE */ + { 231, -2 }, /* (188) cmd ::= SHOW GRANTS */ + { 231, -4 }, /* (189) cmd ::= SHOW CREATE DATABASE db_name */ + { 231, -4 }, /* (190) cmd ::= SHOW CREATE TABLE full_table_name */ + { 231, -4 }, /* (191) cmd ::= SHOW CREATE STABLE full_table_name */ + { 231, -2 }, /* (192) cmd ::= SHOW QUERIES */ + { 231, -2 }, /* (193) cmd ::= SHOW SCORES */ + { 231, -2 }, /* (194) cmd ::= SHOW TOPICS */ + { 231, -2 }, /* (195) cmd ::= SHOW VARIABLES */ + { 231, -2 }, /* (196) cmd ::= SHOW BNODES */ + { 231, -2 }, /* (197) cmd ::= SHOW SNODES */ + { 231, -2 }, /* (198) cmd ::= SHOW CLUSTER */ + { 270, 0 }, /* (199) db_name_cond_opt ::= */ + { 270, -2 }, /* (200) db_name_cond_opt ::= db_name NK_DOT */ + { 271, 0 }, /* (201) like_pattern_opt ::= */ + { 271, -2 }, /* (202) like_pattern_opt ::= LIKE NK_STRING */ + { 272, -1 }, /* (203) table_name_cond ::= table_name */ + { 273, 0 }, /* (204) from_db_opt ::= */ + { 273, -2 }, /* (205) from_db_opt ::= FROM db_name */ + { 267, -1 }, /* (206) func_name_list ::= func_name */ + { 267, -3 }, /* (207) func_name_list ::= func_name_list NK_COMMA func_name */ + { 274, -1 }, /* (208) func_name ::= function_name */ + { 231, -8 }, /* (209) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ + { 231, -10 }, /* (210) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ + { 231, -6 }, /* (211) cmd ::= DROP INDEX exists_opt index_name ON table_name */ + { 277, 0 }, /* (212) index_options ::= */ + { 277, -9 }, /* (213) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ + { 277, -11 }, /* (214) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ + { 278, -1 }, /* (215) func_list ::= func */ + { 278, -3 }, /* (216) func_list ::= func_list NK_COMMA func */ + { 281, -4 }, /* (217) func ::= function_name NK_LP expression_list NK_RP */ + { 231, -7 }, /* (218) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ + { 231, -7 }, /* (219) cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ + { 231, -4 }, /* (220) cmd ::= DROP TOPIC exists_opt topic_name */ + { 284, 0 }, /* (221) topic_options ::= */ + { 284, -3 }, /* (222) topic_options ::= topic_options WITH TABLE */ + { 284, -3 }, /* (223) topic_options ::= topic_options WITH SCHEMA */ + { 284, -3 }, /* (224) topic_options ::= topic_options WITH TAG */ + { 231, -2 }, /* (225) cmd ::= DESC full_table_name */ + { 231, -2 }, /* (226) cmd ::= DESCRIBE full_table_name */ + { 231, -3 }, /* (227) cmd ::= RESET QUERY CACHE */ + { 231, -4 }, /* (228) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 286, 0 }, /* (229) analyze_opt ::= */ + { 286, -1 }, /* (230) analyze_opt ::= ANALYZE */ + { 287, 0 }, /* (231) explain_options ::= */ + { 287, -3 }, /* (232) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 287, -3 }, /* (233) explain_options ::= explain_options RATIO NK_FLOAT */ + { 231, -6 }, /* (234) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ + { 231, -10 }, /* (235) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 231, -3 }, /* (236) cmd ::= DROP FUNCTION function_name */ + { 288, 0 }, /* (237) agg_func_opt ::= */ + { 288, -1 }, /* (238) agg_func_opt ::= AGGREGATE */ + { 289, 0 }, /* (239) bufsize_opt ::= */ + { 289, -2 }, /* (240) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 231, -8 }, /* (241) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + { 231, -4 }, /* (242) cmd ::= DROP STREAM exists_opt stream_name */ + { 292, 0 }, /* (243) into_opt ::= */ + { 292, -2 }, /* (244) into_opt ::= INTO full_table_name */ + { 291, 0 }, /* (245) stream_options ::= */ + { 291, -3 }, /* (246) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 291, -3 }, /* (247) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 291, -3 }, /* (248) stream_options ::= stream_options WATERMARK duration_literal */ + { 231, -3 }, /* (249) cmd ::= KILL CONNECTION NK_INTEGER */ + { 231, -3 }, /* (250) cmd ::= KILL QUERY NK_INTEGER */ + { 231, -4 }, /* (251) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 231, -4 }, /* (252) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 231, -3 }, /* (253) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 293, -2 }, /* (254) dnode_list ::= DNODE NK_INTEGER */ + { 293, -3 }, /* (255) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 231, -3 }, /* (256) cmd ::= SYNCDB db_name REPLICA */ + { 231, -1 }, /* (257) cmd ::= query_expression */ + { 234, -1 }, /* (258) literal ::= NK_INTEGER */ + { 234, -1 }, /* (259) literal ::= NK_FLOAT */ + { 234, -1 }, /* (260) literal ::= NK_STRING */ + { 234, -1 }, /* (261) literal ::= NK_BOOL */ + { 234, -2 }, /* (262) literal ::= TIMESTAMP NK_STRING */ + { 234, -1 }, /* (263) literal ::= duration_literal */ + { 234, -1 }, /* (264) literal ::= NULL */ + { 234, -1 }, /* (265) literal ::= NK_QUESTION */ + { 279, -1 }, /* (266) duration_literal ::= NK_VARIABLE */ + { 294, -1 }, /* (267) signed ::= NK_INTEGER */ + { 294, -2 }, /* (268) signed ::= NK_PLUS NK_INTEGER */ + { 294, -2 }, /* (269) signed ::= NK_MINUS NK_INTEGER */ + { 294, -1 }, /* (270) signed ::= NK_FLOAT */ + { 294, -2 }, /* (271) signed ::= NK_PLUS NK_FLOAT */ + { 294, -2 }, /* (272) signed ::= NK_MINUS NK_FLOAT */ + { 295, -1 }, /* (273) signed_literal ::= signed */ + { 295, -1 }, /* (274) signed_literal ::= NK_STRING */ + { 295, -1 }, /* (275) signed_literal ::= NK_BOOL */ + { 295, -2 }, /* (276) signed_literal ::= TIMESTAMP NK_STRING */ + { 295, -1 }, /* (277) signed_literal ::= duration_literal */ + { 295, -1 }, /* (278) signed_literal ::= NULL */ + { 262, -1 }, /* (279) literal_list ::= signed_literal */ + { 262, -3 }, /* (280) literal_list ::= literal_list NK_COMMA signed_literal */ + { 240, -1 }, /* (281) db_name ::= NK_ID */ + { 265, -1 }, /* (282) table_name ::= NK_ID */ + { 258, -1 }, /* (283) column_name ::= NK_ID */ + { 275, -1 }, /* (284) function_name ::= NK_ID */ + { 296, -1 }, /* (285) table_alias ::= NK_ID */ + { 297, -1 }, /* (286) column_alias ::= NK_ID */ + { 236, -1 }, /* (287) user_name ::= NK_ID */ + { 276, -1 }, /* (288) index_name ::= NK_ID */ + { 283, -1 }, /* (289) topic_name ::= NK_ID */ + { 290, -1 }, /* (290) stream_name ::= NK_ID */ + { 298, -1 }, /* (291) expression ::= literal */ + { 298, -1 }, /* (292) expression ::= pseudo_column */ + { 298, -1 }, /* (293) expression ::= column_reference */ + { 298, -1 }, /* (294) expression ::= function_expression */ + { 298, -1 }, /* (295) expression ::= subquery */ + { 298, -3 }, /* (296) expression ::= NK_LP expression NK_RP */ + { 298, -2 }, /* (297) expression ::= NK_PLUS expression */ + { 298, -2 }, /* (298) expression ::= NK_MINUS expression */ + { 298, -3 }, /* (299) expression ::= expression NK_PLUS expression */ + { 298, -3 }, /* (300) expression ::= expression NK_MINUS expression */ + { 298, -3 }, /* (301) expression ::= expression NK_STAR expression */ + { 298, -3 }, /* (302) expression ::= expression NK_SLASH expression */ + { 298, -3 }, /* (303) expression ::= expression NK_REM expression */ + { 298, -3 }, /* (304) expression ::= column_reference NK_ARROW NK_STRING */ + { 282, -1 }, /* (305) expression_list ::= expression */ + { 282, -3 }, /* (306) expression_list ::= expression_list NK_COMMA expression */ + { 300, -1 }, /* (307) column_reference ::= column_name */ + { 300, -3 }, /* (308) column_reference ::= table_name NK_DOT column_name */ + { 299, -1 }, /* (309) pseudo_column ::= ROWTS */ + { 299, -1 }, /* (310) pseudo_column ::= TBNAME */ + { 299, -1 }, /* (311) pseudo_column ::= QSTARTTS */ + { 299, -1 }, /* (312) pseudo_column ::= QENDTS */ + { 299, -1 }, /* (313) pseudo_column ::= WSTARTTS */ + { 299, -1 }, /* (314) pseudo_column ::= WENDTS */ + { 299, -1 }, /* (315) pseudo_column ::= WDURATION */ + { 301, -4 }, /* (316) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 301, -4 }, /* (317) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 301, -6 }, /* (318) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + { 301, -3 }, /* (319) function_expression ::= noarg_func NK_LP NK_RP */ + { 305, -1 }, /* (320) noarg_func ::= NOW */ + { 305, -1 }, /* (321) noarg_func ::= TODAY */ + { 305, -1 }, /* (322) noarg_func ::= TIMEZONE */ + { 303, -1 }, /* (323) star_func ::= COUNT */ + { 303, -1 }, /* (324) star_func ::= FIRST */ + { 303, -1 }, /* (325) star_func ::= LAST */ + { 303, -1 }, /* (326) star_func ::= LAST_ROW */ + { 304, -1 }, /* (327) star_func_para_list ::= NK_STAR */ + { 304, -1 }, /* (328) star_func_para_list ::= other_para_list */ + { 306, -1 }, /* (329) other_para_list ::= star_func_para */ + { 306, -3 }, /* (330) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 307, -1 }, /* (331) star_func_para ::= expression */ + { 307, -3 }, /* (332) star_func_para ::= table_name NK_DOT NK_STAR */ + { 308, -3 }, /* (333) predicate ::= expression compare_op expression */ + { 308, -5 }, /* (334) predicate ::= expression BETWEEN expression AND expression */ + { 308, -6 }, /* (335) predicate ::= expression NOT BETWEEN expression AND expression */ + { 308, -3 }, /* (336) predicate ::= expression IS NULL */ + { 308, -4 }, /* (337) predicate ::= expression IS NOT NULL */ + { 308, -3 }, /* (338) predicate ::= expression in_op in_predicate_value */ + { 309, -1 }, /* (339) compare_op ::= NK_LT */ + { 309, -1 }, /* (340) compare_op ::= NK_GT */ + { 309, -1 }, /* (341) compare_op ::= NK_LE */ + { 309, -1 }, /* (342) compare_op ::= NK_GE */ + { 309, -1 }, /* (343) compare_op ::= NK_NE */ + { 309, -1 }, /* (344) compare_op ::= NK_EQ */ + { 309, -1 }, /* (345) compare_op ::= LIKE */ + { 309, -2 }, /* (346) compare_op ::= NOT LIKE */ + { 309, -1 }, /* (347) compare_op ::= MATCH */ + { 309, -1 }, /* (348) compare_op ::= NMATCH */ + { 309, -1 }, /* (349) compare_op ::= CONTAINS */ + { 310, -1 }, /* (350) in_op ::= IN */ + { 310, -2 }, /* (351) in_op ::= NOT IN */ + { 311, -3 }, /* (352) in_predicate_value ::= NK_LP expression_list NK_RP */ + { 312, -1 }, /* (353) boolean_value_expression ::= boolean_primary */ + { 312, -2 }, /* (354) boolean_value_expression ::= NOT boolean_primary */ + { 312, -3 }, /* (355) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 312, -3 }, /* (356) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 313, -1 }, /* (357) boolean_primary ::= predicate */ + { 313, -3 }, /* (358) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 314, -1 }, /* (359) common_expression ::= expression */ + { 314, -1 }, /* (360) common_expression ::= boolean_value_expression */ + { 315, -2 }, /* (361) from_clause ::= FROM table_reference_list */ + { 316, -1 }, /* (362) table_reference_list ::= table_reference */ + { 316, -3 }, /* (363) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 317, -1 }, /* (364) table_reference ::= table_primary */ + { 317, -1 }, /* (365) table_reference ::= joined_table */ + { 318, -2 }, /* (366) table_primary ::= table_name alias_opt */ + { 318, -4 }, /* (367) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 318, -2 }, /* (368) table_primary ::= subquery alias_opt */ + { 318, -1 }, /* (369) table_primary ::= parenthesized_joined_table */ + { 320, 0 }, /* (370) alias_opt ::= */ + { 320, -1 }, /* (371) alias_opt ::= table_alias */ + { 320, -2 }, /* (372) alias_opt ::= AS table_alias */ + { 321, -3 }, /* (373) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 321, -3 }, /* (374) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 319, -6 }, /* (375) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 322, 0 }, /* (376) join_type ::= */ + { 322, -1 }, /* (377) join_type ::= INNER */ + { 324, -9 }, /* (378) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 325, 0 }, /* (379) set_quantifier_opt ::= */ + { 325, -1 }, /* (380) set_quantifier_opt ::= DISTINCT */ + { 325, -1 }, /* (381) set_quantifier_opt ::= ALL */ + { 326, -1 }, /* (382) select_list ::= NK_STAR */ + { 326, -1 }, /* (383) select_list ::= select_sublist */ + { 332, -1 }, /* (384) select_sublist ::= select_item */ + { 332, -3 }, /* (385) select_sublist ::= select_sublist NK_COMMA select_item */ + { 333, -1 }, /* (386) select_item ::= common_expression */ + { 333, -2 }, /* (387) select_item ::= common_expression column_alias */ + { 333, -3 }, /* (388) select_item ::= common_expression AS column_alias */ + { 333, -3 }, /* (389) select_item ::= table_name NK_DOT NK_STAR */ + { 327, 0 }, /* (390) where_clause_opt ::= */ + { 327, -2 }, /* (391) where_clause_opt ::= WHERE search_condition */ + { 328, 0 }, /* (392) partition_by_clause_opt ::= */ + { 328, -3 }, /* (393) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 329, 0 }, /* (394) twindow_clause_opt ::= */ + { 329, -6 }, /* (395) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 329, -4 }, /* (396) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + { 329, -6 }, /* (397) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 329, -8 }, /* (398) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 280, 0 }, /* (399) sliding_opt ::= */ + { 280, -4 }, /* (400) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 334, 0 }, /* (401) fill_opt ::= */ + { 334, -4 }, /* (402) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 334, -6 }, /* (403) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 335, -1 }, /* (404) fill_mode ::= NONE */ + { 335, -1 }, /* (405) fill_mode ::= PREV */ + { 335, -1 }, /* (406) fill_mode ::= NULL */ + { 335, -1 }, /* (407) fill_mode ::= LINEAR */ + { 335, -1 }, /* (408) fill_mode ::= NEXT */ + { 330, 0 }, /* (409) group_by_clause_opt ::= */ + { 330, -3 }, /* (410) group_by_clause_opt ::= GROUP BY group_by_list */ + { 336, -1 }, /* (411) group_by_list ::= expression */ + { 336, -3 }, /* (412) group_by_list ::= group_by_list NK_COMMA expression */ + { 331, 0 }, /* (413) having_clause_opt ::= */ + { 331, -2 }, /* (414) having_clause_opt ::= HAVING search_condition */ + { 285, -4 }, /* (415) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 337, -1 }, /* (416) query_expression_body ::= query_primary */ + { 337, -4 }, /* (417) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 337, -3 }, /* (418) query_expression_body ::= query_expression_body UNION query_expression_body */ + { 341, -1 }, /* (419) query_primary ::= query_specification */ + { 338, 0 }, /* (420) order_by_clause_opt ::= */ + { 338, -3 }, /* (421) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 339, 0 }, /* (422) slimit_clause_opt ::= */ + { 339, -2 }, /* (423) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 339, -4 }, /* (424) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 339, -4 }, /* (425) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 340, 0 }, /* (426) limit_clause_opt ::= */ + { 340, -2 }, /* (427) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 340, -4 }, /* (428) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 340, -4 }, /* (429) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 302, -3 }, /* (430) subquery ::= NK_LP query_expression NK_RP */ + { 323, -1 }, /* (431) search_condition ::= common_expression */ + { 342, -1 }, /* (432) sort_specification_list ::= sort_specification */ + { 342, -3 }, /* (433) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 343, -3 }, /* (434) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 344, 0 }, /* (435) ordering_specification_opt ::= */ + { 344, -1 }, /* (436) ordering_specification_opt ::= ASC */ + { 344, -1 }, /* (437) ordering_specification_opt ::= DESC */ + { 345, 0 }, /* (438) null_ordering_opt ::= */ + { 345, -2 }, /* (439) null_ordering_opt ::= NULLS FIRST */ + { 345, -2 }, /* (440) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2749,11 +2991,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,223,&yymsp[0].minor); + yy_destructor(yypParser,232,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,224,&yymsp[0].minor); + yy_destructor(yypParser,233,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -2767,20 +3009,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,223,&yymsp[-2].minor); +{ yy_destructor(yypParser,232,&yymsp[-2].minor); { } - yy_destructor(yypParser,225,&yymsp[0].minor); + yy_destructor(yypParser,234,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,226,&yymsp[0].minor); +{ yy_destructor(yypParser,235,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,224,&yymsp[-1].minor); +{ yy_destructor(yypParser,233,&yymsp[-1].minor); { } - yy_destructor(yypParser,226,&yymsp[0].minor); + yy_destructor(yypParser,235,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -2794,31 +3036,31 @@ 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,225,&yymsp[0].minor); + yy_destructor(yypParser,234,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy449, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy517, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy449, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy517, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy517); } break; case 28: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy449, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy517, NULL); } break; case 29: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy0); } break; case 30: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy517); } break; case 32: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -2835,25 +3077,25 @@ static YYACTIONTYPE yy_reduce( case 36: /* dnode_endpoint ::= NK_STRING */ case 37: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==37); case 38: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==38); - case 277: /* db_name ::= NK_ID */ yytestcase(yyruleno==277); - case 278: /* table_name ::= NK_ID */ yytestcase(yyruleno==278); - case 279: /* column_name ::= NK_ID */ yytestcase(yyruleno==279); - case 280: /* function_name ::= NK_ID */ yytestcase(yyruleno==280); - case 281: /* table_alias ::= NK_ID */ yytestcase(yyruleno==281); - case 282: /* column_alias ::= NK_ID */ yytestcase(yyruleno==282); - case 283: /* user_name ::= NK_ID */ yytestcase(yyruleno==283); - case 284: /* index_name ::= NK_ID */ yytestcase(yyruleno==284); - case 285: /* topic_name ::= NK_ID */ yytestcase(yyruleno==285); - case 286: /* stream_name ::= NK_ID */ yytestcase(yyruleno==286); - case 316: /* noarg_func ::= NOW */ yytestcase(yyruleno==316); - case 317: /* noarg_func ::= TODAY */ yytestcase(yyruleno==317); - case 318: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==318); - case 319: /* star_func ::= COUNT */ yytestcase(yyruleno==319); - case 320: /* star_func ::= FIRST */ yytestcase(yyruleno==320); - case 321: /* star_func ::= LAST */ yytestcase(yyruleno==321); - case 322: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==322); -{ yylhsminor.yy449 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy449 = yylhsminor.yy449; + case 281: /* db_name ::= NK_ID */ yytestcase(yyruleno==281); + case 282: /* table_name ::= NK_ID */ yytestcase(yyruleno==282); + case 283: /* column_name ::= NK_ID */ yytestcase(yyruleno==283); + case 284: /* function_name ::= NK_ID */ yytestcase(yyruleno==284); + case 285: /* table_alias ::= NK_ID */ yytestcase(yyruleno==285); + case 286: /* column_alias ::= NK_ID */ yytestcase(yyruleno==286); + case 287: /* user_name ::= NK_ID */ yytestcase(yyruleno==287); + case 288: /* index_name ::= NK_ID */ yytestcase(yyruleno==288); + case 289: /* topic_name ::= NK_ID */ yytestcase(yyruleno==289); + case 290: /* stream_name ::= NK_ID */ yytestcase(yyruleno==290); + case 320: /* noarg_func ::= NOW */ yytestcase(yyruleno==320); + case 321: /* noarg_func ::= TODAY */ yytestcase(yyruleno==321); + case 322: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==322); + case 323: /* star_func ::= COUNT */ yytestcase(yyruleno==323); + case 324: /* star_func ::= FIRST */ yytestcase(yyruleno==324); + case 325: /* star_func ::= LAST */ yytestcase(yyruleno==325); + case 326: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==326); +{ yylhsminor.yy517 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy517 = yylhsminor.yy517; break; case 39: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -2886,163 +3128,163 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 49: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy89, &yymsp[-1].minor.yy449, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy673, &yymsp[-1].minor.yy517, yymsp[0].minor.yy456); } break; case 50: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy673, &yymsp[0].minor.yy517); } break; case 51: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy517); } break; case 52: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy449, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy517, yymsp[0].minor.yy456); } break; case 53: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy89 = true; } +{ yymsp[-2].minor.yy673 = true; } break; case 54: /* not_exists_opt ::= */ case 56: /* exists_opt ::= */ yytestcase(yyruleno==56); - case 225: /* analyze_opt ::= */ yytestcase(yyruleno==225); - case 233: /* agg_func_opt ::= */ yytestcase(yyruleno==233); - case 375: /* set_quantifier_opt ::= */ yytestcase(yyruleno==375); -{ yymsp[1].minor.yy89 = false; } + case 229: /* analyze_opt ::= */ yytestcase(yyruleno==229); + case 237: /* agg_func_opt ::= */ yytestcase(yyruleno==237); + case 379: /* set_quantifier_opt ::= */ yytestcase(yyruleno==379); +{ yymsp[1].minor.yy673 = false; } break; case 55: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy89 = true; } +{ yymsp[-1].minor.yy673 = true; } break; case 57: /* db_options ::= */ -{ yymsp[1].minor.yy392 = createDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy456 = createDatabaseOptions(pCxt); } break; case 58: /* db_options ::= db_options BLOCKS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pNumOfBlocks = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pNumOfBlocks = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 59: /* db_options ::= db_options CACHE NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pCacheBlockSize = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pCacheBlockSize = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 60: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pCachelast = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pCachelast = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 61: /* db_options ::= db_options COMP NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pCompressionLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pCompressionLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 62: /* db_options ::= db_options DAYS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pDaysPerFile = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pDaysPerFile = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 63: /* db_options ::= db_options DAYS NK_VARIABLE */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pDaysPerFile = (SValueNode*)createDurationValueNode(pCxt, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pDaysPerFile = (SValueNode*)createDurationValueNode(pCxt, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 64: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pFsyncPeriod = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pFsyncPeriod = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 65: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pMaxRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pMaxRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 66: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pMinRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pMinRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 67: /* db_options ::= db_options KEEP integer_list */ case 68: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==68); -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pKeep = yymsp[0].minor.yy376; yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pKeep = yymsp[0].minor.yy652; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 69: /* db_options ::= db_options PRECISION NK_STRING */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pPrecision = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pPrecision = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 70: /* db_options ::= db_options QUORUM NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pQuorum = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pQuorum = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 71: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pReplica = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pReplica = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 72: /* db_options ::= db_options TTL NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 73: /* db_options ::= db_options WAL NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pWalLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pWalLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 74: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pNumOfVgroups = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pNumOfVgroups = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 75: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pSingleStable = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pSingleStable = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 76: /* db_options ::= db_options STREAM_MODE NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pStreamMode = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pStreamMode = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 77: /* db_options ::= db_options RETENTIONS retention_list */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pRetentions = yymsp[0].minor.yy376; yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pRetentions = yymsp[0].minor.yy652; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 78: /* db_options ::= db_options STRICT NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy392)->pStrict = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pStrict = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 79: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy392 = createDatabaseOptions(pCxt); yylhsminor.yy392 = setDatabaseAlterOption(pCxt, yylhsminor.yy392, &yymsp[0].minor.yy221); } - yymsp[0].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createDatabaseOptions(pCxt); yylhsminor.yy456 = setDatabaseAlterOption(pCxt, yylhsminor.yy456, &yymsp[0].minor.yy145); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 80: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy392 = setDatabaseAlterOption(pCxt, yymsp[-1].minor.yy392, &yymsp[0].minor.yy221); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = setDatabaseAlterOption(pCxt, yymsp[-1].minor.yy456, &yymsp[0].minor.yy145); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 81: /* alter_db_option ::= BLOCKS NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = DB_OPTION_BLOCKS; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = DB_OPTION_BLOCKS; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 82: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 83: /* alter_db_option ::= KEEP integer_list */ case 84: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==84); -{ yymsp[-1].minor.yy221.type = DB_OPTION_KEEP; yymsp[-1].minor.yy221.pList = yymsp[0].minor.yy376; } +{ yymsp[-1].minor.yy145.type = DB_OPTION_KEEP; yymsp[-1].minor.yy145.pList = yymsp[0].minor.yy652; } break; case 85: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = DB_OPTION_WAL; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = DB_OPTION_WAL; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 86: /* alter_db_option ::= QUORUM NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = DB_OPTION_QUORUM; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = DB_OPTION_QUORUM; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 87: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 88: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 89: /* alter_db_option ::= STRICT NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = DB_OPTION_STRICT; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = DB_OPTION_STRICT; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 90: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy376 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy376 = yylhsminor.yy376; +{ yylhsminor.yy652 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy652 = yylhsminor.yy652; break; case 91: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 251: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==251); -{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy376 = yylhsminor.yy376; + case 255: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==255); +{ yylhsminor.yy652 = addNodeToList(pCxt, yymsp[-2].minor.yy652, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy652 = yylhsminor.yy652; break; case 92: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy376 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy376 = yylhsminor.yy376; +{ yylhsminor.yy652 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy652 = yylhsminor.yy652; break; case 93: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy376 = yylhsminor.yy376; +{ yylhsminor.yy652 = addNodeToList(pCxt, yymsp[-2].minor.yy652, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy652 = yylhsminor.yy652; break; case 94: /* retention_list ::= retention */ case 114: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==114); @@ -3051,255 +3293,255 @@ static YYACTIONTYPE yy_reduce( case 169: /* col_name_list ::= col_name */ yytestcase(yyruleno==169); case 206: /* func_name_list ::= func_name */ yytestcase(yyruleno==206); case 215: /* func_list ::= func */ yytestcase(yyruleno==215); - case 275: /* literal_list ::= signed_literal */ yytestcase(yyruleno==275); - case 325: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==325); - case 380: /* select_sublist ::= select_item */ yytestcase(yyruleno==380); - case 428: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==428); -{ yylhsminor.yy376 = createNodeList(pCxt, yymsp[0].minor.yy392); } - yymsp[0].minor.yy376 = yylhsminor.yy376; + case 279: /* literal_list ::= signed_literal */ yytestcase(yyruleno==279); + case 329: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==329); + case 384: /* select_sublist ::= select_item */ yytestcase(yyruleno==384); + case 432: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==432); +{ yylhsminor.yy652 = createNodeList(pCxt, yymsp[0].minor.yy456); } + yymsp[0].minor.yy652 = yylhsminor.yy652; break; case 95: /* retention_list ::= retention_list NK_COMMA retention */ case 125: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==125); case 170: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==170); case 207: /* func_name_list ::= func_name_list NK_COMMA func_name */ yytestcase(yyruleno==207); case 216: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==216); - case 276: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==276); - case 326: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==326); - case 381: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==381); - case 429: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==429); -{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, yymsp[0].minor.yy392); } - yymsp[-2].minor.yy376 = yylhsminor.yy376; + case 280: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==280); + case 330: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==330); + case 385: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==385); + case 433: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==433); +{ yylhsminor.yy652 = addNodeToList(pCxt, yymsp[-2].minor.yy652, yymsp[0].minor.yy456); } + yymsp[-2].minor.yy652 = yylhsminor.yy652; break; case 96: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy392 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 97: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 99: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==99); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-5].minor.yy392, yymsp[-3].minor.yy376, yymsp[-1].minor.yy376, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy673, yymsp[-5].minor.yy456, yymsp[-3].minor.yy652, yymsp[-1].minor.yy652, yymsp[0].minor.yy456); } break; case 98: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy376); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy652); } break; case 100: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy376); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy652); } break; case 101: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy673, yymsp[0].minor.yy456); } break; case 102: /* cmd ::= ALTER TABLE alter_table_clause */ case 103: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==103); - case 253: /* cmd ::= query_expression */ yytestcase(yyruleno==253); -{ pCxt->pRootNode = yymsp[0].minor.yy392; } + case 257: /* cmd ::= query_expression */ yytestcase(yyruleno==257); +{ pCxt->pRootNode = yymsp[0].minor.yy456; } break; case 104: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy392 = createAlterTableOption(pCxt, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableOption(pCxt, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 105: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy449, yymsp[0].minor.yy112); } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy517, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 106: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy392 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy392, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy449); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy456, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy517); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 107: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy449, yymsp[0].minor.yy112); } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy517, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 108: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy392 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy449, &yymsp[0].minor.yy449); } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy517, &yymsp[0].minor.yy517); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 109: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy449, yymsp[0].minor.yy112); } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy517, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 110: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy392 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy392, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy449); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy456, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy517); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 111: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy392 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy449, yymsp[0].minor.yy112); } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy517, yymsp[0].minor.yy380); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 112: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy392 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy392, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy449, &yymsp[0].minor.yy449); } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy517, &yymsp[0].minor.yy517); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 113: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ -{ yylhsminor.yy392 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy392, &yymsp[-2].minor.yy449, yymsp[0].minor.yy392); } - yymsp[-5].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy456, &yymsp[-2].minor.yy517, yymsp[0].minor.yy456); } + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; case 115: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 118: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==118); -{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-1].minor.yy376, yymsp[0].minor.yy392); } - yymsp[-1].minor.yy376 = yylhsminor.yy376; +{ yylhsminor.yy652 = addNodeToList(pCxt, yymsp[-1].minor.yy652, yymsp[0].minor.yy456); } + yymsp[-1].minor.yy652 = yylhsminor.yy652; break; case 116: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ -{ yylhsminor.yy392 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy89, yymsp[-7].minor.yy392, yymsp[-5].minor.yy392, yymsp[-4].minor.yy376, yymsp[-1].minor.yy376); } - yymsp[-8].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy673, yymsp[-7].minor.yy456, yymsp[-5].minor.yy456, yymsp[-4].minor.yy652, yymsp[-1].minor.yy652); } + yymsp[-8].minor.yy456 = yylhsminor.yy456; break; case 119: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy392 = createDropTableClause(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy392); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createDropTableClause(pCxt, yymsp[-1].minor.yy673, yymsp[0].minor.yy456); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 120: /* specific_tags_opt ::= */ case 151: /* tags_def_opt ::= */ yytestcase(yyruleno==151); - case 388: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==388); - case 405: /* group_by_clause_opt ::= */ yytestcase(yyruleno==405); - case 416: /* order_by_clause_opt ::= */ yytestcase(yyruleno==416); -{ yymsp[1].minor.yy376 = NULL; } + case 392: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==392); + case 409: /* group_by_clause_opt ::= */ yytestcase(yyruleno==409); + case 420: /* order_by_clause_opt ::= */ yytestcase(yyruleno==420); +{ yymsp[1].minor.yy652 = NULL; } break; case 121: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy376 = yymsp[-1].minor.yy376; } +{ yymsp[-2].minor.yy652 = yymsp[-1].minor.yy652; } break; case 122: /* full_table_name ::= table_name */ -{ yylhsminor.yy392 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy449, NULL); } - yymsp[0].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy517, NULL); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 123: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy392 = createRealTableNode(pCxt, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy449, NULL); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createRealTableNode(pCxt, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy517, NULL); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 126: /* column_def ::= column_name type_name */ -{ yylhsminor.yy392 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy449, yymsp[0].minor.yy112, NULL); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy517, yymsp[0].minor.yy380, NULL); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 127: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy392 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy449, yymsp[-2].minor.yy112, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy517, yymsp[-2].minor.yy380, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 128: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 129: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 130: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 131: /* type_name ::= INT */ case 132: /* type_name ::= INTEGER */ yytestcase(yyruleno==132); -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_INT); } break; case 133: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 134: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 135: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 136: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy112 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 137: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 138: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy112 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 139: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy112 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 140: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy112 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 141: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy112 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 142: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy112 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy380 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 143: /* type_name ::= JSON */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 144: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy112 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 145: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 146: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 147: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy112 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy380 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 148: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy112 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy380 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 149: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy112 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy380 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 150: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy112 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy380 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 152: /* tags_def_opt ::= tags_def */ - case 324: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==324); - case 379: /* select_list ::= select_sublist */ yytestcase(yyruleno==379); -{ yylhsminor.yy376 = yymsp[0].minor.yy376; } - yymsp[0].minor.yy376 = yylhsminor.yy376; + case 328: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==328); + case 383: /* select_list ::= select_sublist */ yytestcase(yyruleno==383); +{ yylhsminor.yy652 = yymsp[0].minor.yy652; } + yymsp[0].minor.yy652 = yylhsminor.yy652; break; case 153: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy376 = yymsp[-1].minor.yy376; } +{ yymsp[-3].minor.yy652 = yymsp[-1].minor.yy652; } break; case 154: /* table_options ::= */ -{ yymsp[1].minor.yy392 = createTableOptions(pCxt); } +{ yymsp[1].minor.yy456 = createTableOptions(pCxt); } break; case 155: /* table_options ::= table_options COMMENT NK_STRING */ -{ ((STableOptions*)yymsp[-2].minor.yy392)->pComments = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pComments = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 156: /* table_options ::= table_options KEEP integer_list */ case 157: /* table_options ::= table_options KEEP variable_list */ yytestcase(yyruleno==157); -{ ((STableOptions*)yymsp[-2].minor.yy392)->pKeep = yymsp[0].minor.yy376; yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pKeep = yymsp[0].minor.yy652; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 158: /* table_options ::= table_options TTL NK_INTEGER */ -{ ((STableOptions*)yymsp[-2].minor.yy392)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 159: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ ((STableOptions*)yymsp[-4].minor.yy392)->pSma = yymsp[-1].minor.yy376; yylhsminor.yy392 = yymsp[-4].minor.yy392; } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ ((STableOptions*)yymsp[-4].minor.yy456)->pSma = yymsp[-1].minor.yy652; yylhsminor.yy456 = yymsp[-4].minor.yy456; } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 160: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ -{ ((STableOptions*)yymsp[-4].minor.yy392)->pFuncs = yymsp[-1].minor.yy376; yylhsminor.yy392 = yymsp[-4].minor.yy392; } - yymsp[-4].minor.yy392 = yylhsminor.yy392; +{ ((STableOptions*)yymsp[-4].minor.yy456)->pFuncs = yymsp[-1].minor.yy652; yylhsminor.yy456 = yymsp[-4].minor.yy456; } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 161: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ -{ ((STableOptions*)yymsp[-2].minor.yy392)->pFilesFactor = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pFilesFactor = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 162: /* table_options ::= table_options DELAY NK_INTEGER */ -{ ((STableOptions*)yymsp[-2].minor.yy392)->pDelay = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pDelay = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 163: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy392 = createTableOptions(pCxt); yylhsminor.yy392 = setTableAlterOption(pCxt, yylhsminor.yy392, &yymsp[0].minor.yy221); } - yymsp[0].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createTableOptions(pCxt); yylhsminor.yy456 = setTableAlterOption(pCxt, yylhsminor.yy456, &yymsp[0].minor.yy145); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 164: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy392 = setTableAlterOption(pCxt, yymsp[-1].minor.yy392, &yymsp[0].minor.yy221); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = setTableAlterOption(pCxt, yymsp[-1].minor.yy456, &yymsp[0].minor.yy145); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 165: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy221.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 166: /* alter_table_option ::= KEEP integer_list */ case 167: /* alter_table_option ::= KEEP variable_list */ yytestcase(yyruleno==167); -{ yymsp[-1].minor.yy221.type = TABLE_OPTION_KEEP; yymsp[-1].minor.yy221.pList = yymsp[0].minor.yy376; } +{ yymsp[-1].minor.yy145.type = TABLE_OPTION_KEEP; yymsp[-1].minor.yy145.pList = yymsp[0].minor.yy652; } break; case 168: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy221.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy221.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy145.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy145.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 171: /* col_name ::= column_name */ -{ yylhsminor.yy392 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy449); } - yymsp[0].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy517); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 172: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } @@ -3311,13 +3553,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; case 175: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy456, yymsp[0].minor.yy456); } break; case 176: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy456, yymsp[0].minor.yy456); } break; case 177: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy392, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy456, NULL); } break; case 178: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } @@ -3332,7 +3574,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; case 182: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; case 183: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } @@ -3351,13 +3593,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; case 189: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy517); } break; case 190: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy456); } break; case 191: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy456); } break; case 192: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } @@ -3382,643 +3624,658 @@ static YYACTIONTYPE yy_reduce( break; case 199: /* db_name_cond_opt ::= */ case 204: /* from_db_opt ::= */ yytestcase(yyruleno==204); -{ yymsp[1].minor.yy392 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy456 = createDefaultDatabaseCondValue(pCxt); } break; case 200: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy449); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy517); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 201: /* like_pattern_opt ::= */ case 212: /* index_options ::= */ yytestcase(yyruleno==212); - case 239: /* into_opt ::= */ yytestcase(yyruleno==239); - case 386: /* where_clause_opt ::= */ yytestcase(yyruleno==386); - case 390: /* twindow_clause_opt ::= */ yytestcase(yyruleno==390); - case 395: /* sliding_opt ::= */ yytestcase(yyruleno==395); - case 397: /* fill_opt ::= */ yytestcase(yyruleno==397); - case 409: /* having_clause_opt ::= */ yytestcase(yyruleno==409); - case 418: /* slimit_clause_opt ::= */ yytestcase(yyruleno==418); - case 422: /* limit_clause_opt ::= */ yytestcase(yyruleno==422); -{ yymsp[1].minor.yy392 = NULL; } + case 243: /* into_opt ::= */ yytestcase(yyruleno==243); + case 390: /* where_clause_opt ::= */ yytestcase(yyruleno==390); + case 394: /* twindow_clause_opt ::= */ yytestcase(yyruleno==394); + case 399: /* sliding_opt ::= */ yytestcase(yyruleno==399); + case 401: /* fill_opt ::= */ yytestcase(yyruleno==401); + case 413: /* having_clause_opt ::= */ yytestcase(yyruleno==413); + case 422: /* slimit_clause_opt ::= */ yytestcase(yyruleno==422); + case 426: /* limit_clause_opt ::= */ yytestcase(yyruleno==426); +{ yymsp[1].minor.yy456 = NULL; } break; case 202: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 203: /* table_name_cond ::= table_name */ -{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy449); } - yymsp[0].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy517); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 205: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy449); } +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy517); } break; case 208: /* func_name ::= function_name */ -{ yylhsminor.yy392 = createFunctionNode(pCxt, &yymsp[0].minor.yy449, NULL); } - yymsp[0].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createFunctionNode(pCxt, &yymsp[0].minor.yy517, NULL); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 209: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy449, &yymsp[-1].minor.yy449, NULL, yymsp[0].minor.yy392); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy673, &yymsp[-3].minor.yy517, &yymsp[-1].minor.yy517, NULL, yymsp[0].minor.yy456); } break; case 210: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy89, &yymsp[-5].minor.yy449, &yymsp[-3].minor.yy449, yymsp[-1].minor.yy376, NULL); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy673, &yymsp[-5].minor.yy517, &yymsp[-3].minor.yy517, yymsp[-1].minor.yy652, NULL); } break; case 211: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy673, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy517); } break; case 213: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy392 = createIndexOption(pCxt, yymsp[-6].minor.yy376, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), NULL, yymsp[0].minor.yy392); } +{ yymsp[-8].minor.yy456 = createIndexOption(pCxt, yymsp[-6].minor.yy652, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), NULL, yymsp[0].minor.yy456); } break; case 214: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ -{ yymsp[-10].minor.yy392 = createIndexOption(pCxt, yymsp[-8].minor.yy376, releaseRawExprNode(pCxt, yymsp[-4].minor.yy392), releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), yymsp[0].minor.yy392); } +{ yymsp[-10].minor.yy456 = createIndexOption(pCxt, yymsp[-8].minor.yy652, releaseRawExprNode(pCxt, yymsp[-4].minor.yy456), releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), yymsp[0].minor.yy456); } break; case 217: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy392 = createFunctionNode(pCxt, &yymsp[-3].minor.yy449, yymsp[-1].minor.yy376); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; +{ yylhsminor.yy456 = createFunctionNode(pCxt, &yymsp[-3].minor.yy517, yymsp[-1].minor.yy652); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 218: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy449, yymsp[0].minor.yy392, NULL); } + case 218: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS query_expression */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy673, &yymsp[-3].minor.yy517, yymsp[0].minor.yy456, NULL, yymsp[-2].minor.yy456); } break; - case 219: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy449, NULL, &yymsp[0].minor.yy449); } + case 219: /* cmd ::= CREATE TOPIC not_exists_opt topic_name topic_options AS db_name */ +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy673, &yymsp[-3].minor.yy517, NULL, &yymsp[0].minor.yy517, yymsp[-2].minor.yy456); } break; case 220: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy673, &yymsp[0].minor.yy517); } break; - case 221: /* cmd ::= DESC full_table_name */ - case 222: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==222); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy392); } + case 221: /* topic_options ::= */ +{ yymsp[1].minor.yy456 = createTopicOptions(pCxt); } break; - case 223: /* cmd ::= RESET QUERY CACHE */ + case 222: /* topic_options ::= topic_options WITH TABLE */ +{ ((STopicOptions*)yymsp[-2].minor.yy456)->withTable = true; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; + break; + case 223: /* topic_options ::= topic_options WITH SCHEMA */ +{ ((STopicOptions*)yymsp[-2].minor.yy456)->withSchema = true; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; + break; + case 224: /* topic_options ::= topic_options WITH TAG */ +{ ((STopicOptions*)yymsp[-2].minor.yy456)->withTag = true; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; + break; + case 225: /* cmd ::= DESC full_table_name */ + case 226: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==226); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy456); } + break; + case 227: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 224: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy89, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); } + case 228: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy673, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; - case 226: /* analyze_opt ::= ANALYZE */ - case 234: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==234); - case 376: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==376); -{ yymsp[0].minor.yy89 = true; } + case 230: /* analyze_opt ::= ANALYZE */ + case 238: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==238); + case 380: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==380); +{ yymsp[0].minor.yy673 = true; } break; - case 227: /* explain_options ::= */ -{ yymsp[1].minor.yy392 = createDefaultExplainOptions(pCxt); } + case 231: /* explain_options ::= */ +{ yymsp[1].minor.yy456 = createDefaultExplainOptions(pCxt); } break; - case 228: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy392 = setExplainVerbose(pCxt, yymsp[-2].minor.yy392, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 232: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy456 = setExplainVerbose(pCxt, yymsp[-2].minor.yy456, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 229: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy392 = setExplainRatio(pCxt, yymsp[-2].minor.yy392, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 233: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy456 = setExplainRatio(pCxt, yymsp[-2].minor.yy456, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 230: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ -{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy376); } + case 234: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ +{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy652); } break; - case 231: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-8].minor.yy89, &yymsp[-5].minor.yy449, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy112, yymsp[0].minor.yy4); } + case 235: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy673, yymsp[-8].minor.yy673, &yymsp[-5].minor.yy517, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy380, yymsp[0].minor.yy376); } break; - case 232: /* cmd ::= DROP FUNCTION function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, &yymsp[0].minor.yy449); } + case 236: /* cmd ::= DROP FUNCTION function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, &yymsp[0].minor.yy517); } break; - case 235: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy4 = 0; } + case 239: /* bufsize_opt ::= */ +{ yymsp[1].minor.yy376 = 0; } break; - case 236: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy4 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + case 240: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ +{ yymsp[-1].minor.yy376 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 237: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy89, &yymsp[-4].minor.yy449, yymsp[-2].minor.yy392, yymsp[-3].minor.yy392, yymsp[0].minor.yy392); } + case 241: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy673, &yymsp[-4].minor.yy517, yymsp[-2].minor.yy456, yymsp[-3].minor.yy456, yymsp[0].minor.yy456); } break; - case 238: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy449); } + case 242: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy673, &yymsp[0].minor.yy517); } break; - case 240: /* into_opt ::= INTO full_table_name */ - case 357: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==357); - case 387: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==387); - case 410: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==410); -{ yymsp[-1].minor.yy392 = yymsp[0].minor.yy392; } + case 244: /* into_opt ::= INTO full_table_name */ + case 361: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==361); + case 391: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==391); + case 414: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==414); +{ yymsp[-1].minor.yy456 = yymsp[0].minor.yy456; } break; - case 241: /* stream_options ::= */ -{ yymsp[1].minor.yy392 = createStreamOptions(pCxt); } + case 245: /* stream_options ::= */ +{ yymsp[1].minor.yy456 = createStreamOptions(pCxt); } break; - case 242: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy392)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 246: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy456)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 243: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy392)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 247: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy456)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 244: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy392)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); yylhsminor.yy392 = yymsp[-2].minor.yy392; } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 248: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy456)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy456); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 245: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 249: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 246: /* cmd ::= KILL QUERY NK_INTEGER */ + case 250: /* cmd ::= KILL QUERY NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_QUERY_STMT, &yymsp[0].minor.yy0); } break; - case 247: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 251: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 248: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy376); } + case 252: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy652); } break; - case 249: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 253: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 250: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy376 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 254: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy652 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 252: /* cmd ::= SYNCDB db_name REPLICA */ -{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy449); } + case 256: /* cmd ::= SYNCDB db_name REPLICA */ +{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy517); } break; - case 254: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 258: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 255: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 259: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 256: /* literal ::= NK_STRING */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 260: /* literal ::= NK_STRING */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 257: /* literal ::= NK_BOOL */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 261: /* literal ::= NK_BOOL */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 258: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + case 262: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 259: /* literal ::= duration_literal */ - case 269: /* signed_literal ::= signed */ yytestcase(yyruleno==269); - case 287: /* expression ::= literal */ yytestcase(yyruleno==287); - case 288: /* expression ::= pseudo_column */ yytestcase(yyruleno==288); - case 289: /* expression ::= column_reference */ yytestcase(yyruleno==289); - case 290: /* expression ::= function_expression */ yytestcase(yyruleno==290); - case 291: /* expression ::= subquery */ yytestcase(yyruleno==291); - case 349: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==349); - case 353: /* boolean_primary ::= predicate */ yytestcase(yyruleno==353); - case 355: /* common_expression ::= expression */ yytestcase(yyruleno==355); - case 356: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==356); - case 358: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==358); - case 360: /* table_reference ::= table_primary */ yytestcase(yyruleno==360); - case 361: /* table_reference ::= joined_table */ yytestcase(yyruleno==361); - case 365: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==365); - case 412: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==412); - case 415: /* query_primary ::= query_specification */ yytestcase(yyruleno==415); -{ yylhsminor.yy392 = yymsp[0].minor.yy392; } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 263: /* literal ::= duration_literal */ + case 273: /* signed_literal ::= signed */ yytestcase(yyruleno==273); + case 291: /* expression ::= literal */ yytestcase(yyruleno==291); + case 292: /* expression ::= pseudo_column */ yytestcase(yyruleno==292); + case 293: /* expression ::= column_reference */ yytestcase(yyruleno==293); + case 294: /* expression ::= function_expression */ yytestcase(yyruleno==294); + case 295: /* expression ::= subquery */ yytestcase(yyruleno==295); + case 353: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==353); + case 357: /* boolean_primary ::= predicate */ yytestcase(yyruleno==357); + case 359: /* common_expression ::= expression */ yytestcase(yyruleno==359); + case 360: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==360); + case 362: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==362); + case 364: /* table_reference ::= table_primary */ yytestcase(yyruleno==364); + case 365: /* table_reference ::= joined_table */ yytestcase(yyruleno==365); + case 369: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==369); + case 416: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==416); + case 419: /* query_primary ::= query_specification */ yytestcase(yyruleno==419); +{ yylhsminor.yy456 = yymsp[0].minor.yy456; } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 260: /* literal ::= NULL */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 264: /* literal ::= NULL */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 261: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 265: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 262: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 266: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 263: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 267: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 264: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + case 268: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; - case 265: /* signed ::= NK_MINUS NK_INTEGER */ + case 269: /* 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.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 266: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 270: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 267: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 271: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 268: /* signed ::= NK_MINUS NK_FLOAT */ + case 272: /* 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.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 270: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 274: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 271: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 275: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 272: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 276: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 273: /* signed_literal ::= duration_literal */ - case 327: /* star_func_para ::= expression */ yytestcase(yyruleno==327); - case 382: /* select_item ::= common_expression */ yytestcase(yyruleno==382); - case 427: /* search_condition ::= common_expression */ yytestcase(yyruleno==427); -{ yylhsminor.yy392 = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 277: /* signed_literal ::= duration_literal */ + case 331: /* star_func_para ::= expression */ yytestcase(yyruleno==331); + case 386: /* select_item ::= common_expression */ yytestcase(yyruleno==386); + case 431: /* search_condition ::= common_expression */ yytestcase(yyruleno==431); +{ yylhsminor.yy456 = releaseRawExprNode(pCxt, yymsp[0].minor.yy456); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 274: /* signed_literal ::= NULL */ -{ yymsp[0].minor.yy392 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL); } + case 278: /* signed_literal ::= NULL */ +{ yymsp[0].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL); } break; - case 292: /* expression ::= NK_LP expression NK_RP */ - case 354: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==354); -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 296: /* expression ::= NK_LP expression NK_RP */ + case 358: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==358); +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 293: /* expression ::= NK_PLUS expression */ + case 297: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy456)); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 294: /* expression ::= NK_MINUS expression */ + case 298: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy392), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy456), NULL)); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 295: /* expression ::= expression NK_PLUS expression */ + case 299: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 296: /* expression ::= expression NK_MINUS expression */ + case 300: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 297: /* expression ::= expression NK_STAR expression */ + case 301: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 298: /* expression ::= expression NK_SLASH expression */ + case 302: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 299: /* expression ::= expression NK_REM expression */ + case 303: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 300: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 304: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 301: /* expression_list ::= expression */ -{ yylhsminor.yy376 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); } - yymsp[0].minor.yy376 = yylhsminor.yy376; + case 305: /* expression_list ::= expression */ +{ yylhsminor.yy652 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy456)); } + yymsp[0].minor.yy652 = yylhsminor.yy652; break; - case 302: /* expression_list ::= expression_list NK_COMMA expression */ -{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); } - yymsp[-2].minor.yy376 = yylhsminor.yy376; + case 306: /* expression_list ::= expression_list NK_COMMA expression */ +{ yylhsminor.yy652 = addNodeToList(pCxt, yymsp[-2].minor.yy652, releaseRawExprNode(pCxt, yymsp[0].minor.yy456)); } + yymsp[-2].minor.yy652 = yylhsminor.yy652; break; - case 303: /* column_reference ::= column_name */ -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy449, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy449)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 307: /* column_reference ::= column_name */ +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy517, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy517)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 304: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy449, createColumnNode(pCxt, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy449)); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 308: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy517, createColumnNode(pCxt, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy517)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 305: /* pseudo_column ::= ROWTS */ - case 306: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==306); - case 307: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==307); - case 308: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==308); - case 309: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==309); - case 310: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==310); - case 311: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==311); -{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy392 = yylhsminor.yy392; + case 309: /* pseudo_column ::= ROWTS */ + case 310: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==310); + case 311: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==311); + case 312: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==312); + case 313: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==313); + case 314: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==314); + case 315: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==315); +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 312: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 313: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==313); -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy449, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy449, yymsp[-1].minor.yy376)); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; + case 316: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 317: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==317); +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy517, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy517, yymsp[-1].minor.yy652)); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 314: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), yymsp[-1].minor.yy112)); } - yymsp[-5].minor.yy392 = yylhsminor.yy392; + case 318: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), yymsp[-1].minor.yy380)); } + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; - case 315: /* function_expression ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy0, createFunctionNodeNoArg(pCxt, &yymsp[-2].minor.yy449)); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 319: /* function_expression ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy0, createFunctionNodeNoArg(pCxt, &yymsp[-2].minor.yy517)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 323: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy376 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy376 = yylhsminor.yy376; + case 327: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy652 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy652 = yylhsminor.yy652; break; - case 328: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 385: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==385); -{ yylhsminor.yy392 = createColumnNode(pCxt, &yymsp[-2].minor.yy449, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 332: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 389: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==389); +{ yylhsminor.yy456 = createColumnNode(pCxt, &yymsp[-2].minor.yy517, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 329: /* predicate ::= expression compare_op expression */ - case 334: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==334); + case 333: /* predicate ::= expression compare_op expression */ + case 338: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==338); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy380, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy348, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 330: /* predicate ::= expression BETWEEN expression AND expression */ + case 334: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy392), releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy456), releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-4].minor.yy392 = yylhsminor.yy392; + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; - case 331: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 335: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy392), releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy456), releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-5].minor.yy392 = yylhsminor.yy392; + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; - case 332: /* predicate ::= expression IS NULL */ + case 336: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), NULL)); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 333: /* predicate ::= expression IS NOT NULL */ + case 337: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), NULL)); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 335: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_THAN; } + case 339: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy348 = OP_TYPE_LOWER_THAN; } break; - case 336: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_THAN; } + case 340: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy348 = OP_TYPE_GREATER_THAN; } break; - case 337: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy380 = OP_TYPE_LOWER_EQUAL; } + case 341: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy348 = OP_TYPE_LOWER_EQUAL; } break; - case 338: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy380 = OP_TYPE_GREATER_EQUAL; } + case 342: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy348 = OP_TYPE_GREATER_EQUAL; } break; - case 339: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy380 = OP_TYPE_NOT_EQUAL; } + case 343: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy348 = OP_TYPE_NOT_EQUAL; } break; - case 340: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy380 = OP_TYPE_EQUAL; } + case 344: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy348 = OP_TYPE_EQUAL; } break; - case 341: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy380 = OP_TYPE_LIKE; } + case 345: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy348 = OP_TYPE_LIKE; } break; - case 342: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_LIKE; } + case 346: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy348 = OP_TYPE_NOT_LIKE; } break; - case 343: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy380 = OP_TYPE_MATCH; } + case 347: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy348 = OP_TYPE_MATCH; } break; - case 344: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy380 = OP_TYPE_NMATCH; } + case 348: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy348 = OP_TYPE_NMATCH; } break; - case 345: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy380 = OP_TYPE_JSON_CONTAINS; } + case 349: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy348 = OP_TYPE_JSON_CONTAINS; } break; - case 346: /* in_op ::= IN */ -{ yymsp[0].minor.yy380 = OP_TYPE_IN; } + case 350: /* in_op ::= IN */ +{ yymsp[0].minor.yy348 = OP_TYPE_IN; } break; - case 347: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy380 = OP_TYPE_NOT_IN; } + case 351: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy348 = OP_TYPE_NOT_IN; } break; - case 348: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy376)); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 352: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy652)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 350: /* boolean_value_expression ::= NOT boolean_primary */ + case 354: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy392), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy456), NULL)); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 351: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 355: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 352: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 356: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); - yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 359: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy392 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy392, yymsp[0].minor.yy392, NULL); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 363: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy456 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy456, yymsp[0].minor.yy456, NULL); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 362: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy392 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy449, &yymsp[0].minor.yy449); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + case 366: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy456 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy517, &yymsp[0].minor.yy517); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 363: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy392 = createRealTableNode(pCxt, &yymsp[-3].minor.yy449, &yymsp[-1].minor.yy449, &yymsp[0].minor.yy449); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; + case 367: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy456 = createRealTableNode(pCxt, &yymsp[-3].minor.yy517, &yymsp[-1].minor.yy517, &yymsp[0].minor.yy517); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 364: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy392 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392), &yymsp[0].minor.yy449); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + case 368: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy456 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456), &yymsp[0].minor.yy517); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 366: /* alias_opt ::= */ -{ yymsp[1].minor.yy449 = nil_token; } + case 370: /* alias_opt ::= */ +{ yymsp[1].minor.yy517 = nil_token; } break; - case 367: /* alias_opt ::= table_alias */ -{ yylhsminor.yy449 = yymsp[0].minor.yy449; } - yymsp[0].minor.yy449 = yylhsminor.yy449; + case 371: /* alias_opt ::= table_alias */ +{ yylhsminor.yy517 = yymsp[0].minor.yy517; } + yymsp[0].minor.yy517 = yylhsminor.yy517; break; - case 368: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy449 = yymsp[0].minor.yy449; } + case 372: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy517 = yymsp[0].minor.yy517; } break; - case 369: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 370: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==370); -{ yymsp[-2].minor.yy392 = yymsp[-1].minor.yy392; } + case 373: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 374: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==374); +{ yymsp[-2].minor.yy456 = yymsp[-1].minor.yy456; } break; - case 371: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy392 = createJoinTableNode(pCxt, yymsp[-4].minor.yy372, yymsp[-5].minor.yy392, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); } - yymsp[-5].minor.yy392 = yylhsminor.yy392; + case 375: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy456 = createJoinTableNode(pCxt, yymsp[-4].minor.yy684, yymsp[-5].minor.yy456, yymsp[-2].minor.yy456, yymsp[0].minor.yy456); } + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; - case 372: /* join_type ::= */ -{ yymsp[1].minor.yy372 = JOIN_TYPE_INNER; } + case 376: /* join_type ::= */ +{ yymsp[1].minor.yy684 = JOIN_TYPE_INNER; } break; - case 373: /* join_type ::= INNER */ -{ yymsp[0].minor.yy372 = JOIN_TYPE_INNER; } + case 377: /* join_type ::= INNER */ +{ yymsp[0].minor.yy684 = JOIN_TYPE_INNER; } break; - case 374: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 378: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-8].minor.yy392 = createSelectStmt(pCxt, yymsp[-7].minor.yy89, yymsp[-6].minor.yy376, yymsp[-5].minor.yy392); - yymsp[-8].minor.yy392 = addWhereClause(pCxt, yymsp[-8].minor.yy392, yymsp[-4].minor.yy392); - yymsp[-8].minor.yy392 = addPartitionByClause(pCxt, yymsp[-8].minor.yy392, yymsp[-3].minor.yy376); - yymsp[-8].minor.yy392 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy392, yymsp[-2].minor.yy392); - yymsp[-8].minor.yy392 = addGroupByClause(pCxt, yymsp[-8].minor.yy392, yymsp[-1].minor.yy376); - yymsp[-8].minor.yy392 = addHavingClause(pCxt, yymsp[-8].minor.yy392, yymsp[0].minor.yy392); + yymsp[-8].minor.yy456 = createSelectStmt(pCxt, yymsp[-7].minor.yy673, yymsp[-6].minor.yy652, yymsp[-5].minor.yy456); + yymsp[-8].minor.yy456 = addWhereClause(pCxt, yymsp[-8].minor.yy456, yymsp[-4].minor.yy456); + yymsp[-8].minor.yy456 = addPartitionByClause(pCxt, yymsp[-8].minor.yy456, yymsp[-3].minor.yy652); + yymsp[-8].minor.yy456 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy456, yymsp[-2].minor.yy456); + yymsp[-8].minor.yy456 = addGroupByClause(pCxt, yymsp[-8].minor.yy456, yymsp[-1].minor.yy652); + yymsp[-8].minor.yy456 = addHavingClause(pCxt, yymsp[-8].minor.yy456, yymsp[0].minor.yy456); } break; - case 377: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy89 = false; } + case 381: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy673 = false; } break; - case 378: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy376 = NULL; } + case 382: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy652 = NULL; } break; - case 383: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy392 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392), &yymsp[0].minor.yy449); } - yymsp[-1].minor.yy392 = yylhsminor.yy392; + case 387: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy456 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456), &yymsp[0].minor.yy517); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 384: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy392 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), &yymsp[0].minor.yy449); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 388: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy456 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), &yymsp[0].minor.yy517); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 389: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 406: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==406); - case 417: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==417); -{ yymsp[-2].minor.yy376 = yymsp[0].minor.yy376; } + case 393: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 410: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==410); + case 421: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==421); +{ yymsp[-2].minor.yy652 = yymsp[0].minor.yy652; } break; - case 391: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy392 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); } + case 395: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy456 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), releaseRawExprNode(pCxt, yymsp[-1].minor.yy456)); } break; - case 392: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy392 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); } + case 396: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ +{ yymsp[-3].minor.yy456 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456)); } break; - case 393: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy392 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), NULL, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); } + case 397: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy456 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), NULL, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; - case 394: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy392 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy392), releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), yymsp[-1].minor.yy392, yymsp[0].minor.yy392); } + case 398: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy456 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy456), releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; - case 396: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy392 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy392); } + case 400: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy456 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy456); } break; - case 398: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy392 = createFillNode(pCxt, yymsp[-1].minor.yy102, NULL); } + case 402: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy456 = createFillNode(pCxt, yymsp[-1].minor.yy534, NULL); } break; - case 399: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy392 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy376)); } + case 403: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy456 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy652)); } break; - case 400: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy102 = FILL_MODE_NONE; } + case 404: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy534 = FILL_MODE_NONE; } break; - case 401: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy102 = FILL_MODE_PREV; } + case 405: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy534 = FILL_MODE_PREV; } break; - case 402: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy102 = FILL_MODE_NULL; } + case 406: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy534 = FILL_MODE_NULL; } break; - case 403: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy102 = FILL_MODE_LINEAR; } + case 407: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy534 = FILL_MODE_LINEAR; } break; - case 404: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy102 = FILL_MODE_NEXT; } + case 408: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy534 = FILL_MODE_NEXT; } break; - case 407: /* group_by_list ::= expression */ -{ yylhsminor.yy376 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); } - yymsp[0].minor.yy376 = yylhsminor.yy376; + case 411: /* group_by_list ::= expression */ +{ yylhsminor.yy652 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } + yymsp[0].minor.yy652 = yylhsminor.yy652; break; - case 408: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy376 = addNodeToList(pCxt, yymsp[-2].minor.yy376, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); } - yymsp[-2].minor.yy376 = yylhsminor.yy376; + case 412: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy652 = addNodeToList(pCxt, yymsp[-2].minor.yy652, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } + yymsp[-2].minor.yy652 = yylhsminor.yy652; break; - case 411: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 415: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy392 = addOrderByClause(pCxt, yymsp[-3].minor.yy392, yymsp[-2].minor.yy376); - yylhsminor.yy392 = addSlimitClause(pCxt, yylhsminor.yy392, yymsp[-1].minor.yy392); - yylhsminor.yy392 = addLimitClause(pCxt, yylhsminor.yy392, yymsp[0].minor.yy392); + yylhsminor.yy456 = addOrderByClause(pCxt, yymsp[-3].minor.yy456, yymsp[-2].minor.yy652); + yylhsminor.yy456 = addSlimitClause(pCxt, yylhsminor.yy456, yymsp[-1].minor.yy456); + yylhsminor.yy456 = addLimitClause(pCxt, yylhsminor.yy456, yymsp[0].minor.yy456); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 413: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy392 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy392, yymsp[0].minor.yy392); } - yymsp[-3].minor.yy392 = yylhsminor.yy392; + case 417: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy456 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy456, yymsp[0].minor.yy456); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 414: /* query_expression_body ::= query_expression_body UNION query_expression_body */ -{ yylhsminor.yy392 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 418: /* query_expression_body ::= query_expression_body UNION query_expression_body */ +{ yylhsminor.yy456 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy456, yymsp[0].minor.yy456); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 419: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 423: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==423); -{ yymsp[-1].minor.yy392 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 423: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 427: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==427); +{ yymsp[-1].minor.yy456 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 420: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 424: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==424); -{ yymsp[-3].minor.yy392 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 424: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 428: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==428); +{ yymsp[-3].minor.yy456 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 421: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 425: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==425); -{ yymsp[-3].minor.yy392 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 425: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 429: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==429); +{ yymsp[-3].minor.yy456 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 426: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy392); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 430: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy456); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 430: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy392 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), yymsp[-1].minor.yy386, yymsp[0].minor.yy361); } - yymsp[-2].minor.yy392 = yylhsminor.yy392; + case 434: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy456 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), yymsp[-1].minor.yy250, yymsp[0].minor.yy645); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 431: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy386 = ORDER_ASC; } + case 435: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy250 = ORDER_ASC; } break; - case 432: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy386 = ORDER_ASC; } + case 436: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy250 = ORDER_ASC; } break; - case 433: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy386 = ORDER_DESC; } + case 437: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy250 = ORDER_DESC; } break; - case 434: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy361 = NULL_ORDER_DEFAULT; } + case 438: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy645 = NULL_ORDER_DEFAULT; } break; - case 435: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy361 = NULL_ORDER_FIRST; } + case 439: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy645 = NULL_ORDER_FIRST; } break; - case 436: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy361 = NULL_ORDER_LAST; } + case 440: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy645 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/planner/inc/planInt.h b/source/libs/planner/inc/planInt.h index 144254b042..7f8bf14499 100644 --- a/source/libs/planner/inc/planInt.h +++ b/source/libs/planner/inc/planInt.h @@ -22,6 +22,10 @@ extern "C" { #include "planner.h" +#define QUERY_POLICY_VNODE 1 +#define QUERY_POLICY_HYBRID 2 +#define QUERY_POLICY_QNODE 3 + #define planFatal(param, ...) qFatal("PLAN: " param, __VA_ARGS__) #define planError(param, ...) qError("PLAN: " param, __VA_ARGS__) #define planWarn(param, ...) qWarn("PLAN: " param, __VA_ARGS__) diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index b13c0a8888..2c7ad27927 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -639,8 +639,8 @@ static int32_t createProjectLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSel } if (NULL != pSelect->pLimit) { - pProject->limit = ((SLimitNode*)pSelect->pLimit)->limit; - pProject->offset = ((SLimitNode*)pSelect->pLimit)->offset; + pProject->limit = pSelect->pLimit->limit; + pProject->offset = pSelect->pLimit->offset; } else { pProject->limit = -1; pProject->offset = -1; diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index 745029730f..d5e12608ac 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -16,6 +16,8 @@ #include "planInt.h" #include "functionMgt.h" +#include "tglobal.h" +#include "catalog.h" typedef struct SSlotIdInfo { int16_t slotId; @@ -1233,7 +1235,13 @@ int32_t createPhysiPlan(SPlanContext* pCxt, SQueryLogicPlan* pLogicPlan, SQueryP return TSDB_CODE_OUT_OF_MEMORY; } - int32_t code = doCreatePhysiPlan(&cxt, pLogicPlan, pPlan); + int32_t code = TSDB_CODE_SUCCESS; + if (tsQueryPolicy > QUERY_POLICY_VNODE) { + code = catalogGetQnodeList(pCxt->pCatalog, pCxt->pTransporter, &pCxt->mgmtEpSet, pExecNodeList); + } + if (TSDB_CODE_SUCCESS == code) { + code = doCreatePhysiPlan(&cxt, pLogicPlan, pPlan); + } if (TSDB_CODE_SUCCESS == code) { setExplainInfo(pCxt, *pPlan); } From 395ba3dc5fe1891991df8d4ad26a3e537be7fb5e Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Fri, 22 Apr 2022 18:38:38 +0800 Subject: [PATCH 11/15] fix: some syntax parsing problems --- tests/script/tsim/db/alter_option.sim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/script/tsim/db/alter_option.sim b/tests/script/tsim/db/alter_option.sim index 2b230c3c45..57324367b5 100644 --- a/tests/script/tsim/db/alter_option.sim +++ b/tests/script/tsim/db/alter_option.sim @@ -183,10 +183,10 @@ sql_error alter database db days 0 sql_error alter database db days 14400 # set over than keep print ============== modify keep -sql alter database db keep 2000 +sql alter database db keep 3456000 sql show databases print keep $data7_db -if $data7_db != 2000,2000,2000 then +if $data7_db != 3456000,3456000,3456000 then return -1 endi From 60c9ec38ace2da6af22ddda858fe9bed827a49e7 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 18:47:00 +0800 Subject: [PATCH 12/15] [test: add sleep for elect leader] --- tests/system-test/2-query/cast.py | 2 ++ tests/system-test/2-query/distinct.py | 2 ++ tests/system-test/2-query/varchar.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/system-test/2-query/cast.py b/tests/system-test/2-query/cast.py index f09e7d1f63..86319ae25d 100644 --- a/tests/system-test/2-query/cast.py +++ b/tests/system-test/2-query/cast.py @@ -2,6 +2,7 @@ import taos import sys import datetime import inspect +import time from util.log import * from util.sql import * @@ -19,6 +20,7 @@ class TDTestCase: tdSql.prepare() tdLog.printNoPrefix("==========step1:create table") + time.sleep(2) tdSql.execute( '''create table stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) diff --git a/tests/system-test/2-query/distinct.py b/tests/system-test/2-query/distinct.py index a82f3a6f59..43d48a19cb 100644 --- a/tests/system-test/2-query/distinct.py +++ b/tests/system-test/2-query/distinct.py @@ -1,5 +1,6 @@ import taos import sys +import time from util.log import * from util.sql import * @@ -15,6 +16,7 @@ class TDTestCase: def run(self): # sourcery skip: extract-duplicate-method, remove-redundant-fstring tdSql.prepare() + time.sleep(2) tdLog.printNoPrefix("==========step1:create table") tdSql.execute("create stable db.stb1 (ts timestamp, c1 int, c2 int) tags(t0 tinyint, t1 int, t2 int)") diff --git a/tests/system-test/2-query/varchar.py b/tests/system-test/2-query/varchar.py index 5cc6c8e399..f0e3d36ffd 100644 --- a/tests/system-test/2-query/varchar.py +++ b/tests/system-test/2-query/varchar.py @@ -1,5 +1,6 @@ import taos import sys +import time from util.log import * from util.sql import * @@ -17,6 +18,7 @@ class TDTestCase: tdSql.prepare() tdLog.printNoPrefix("==========step1:create table") + time.sleep(2) tdSql.execute( '''create table stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 varchar(16),c9 nchar(32), c10 timestamp) From 09efd7817663745a4c9e3ff25a195419b05fe529 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 18:48:22 +0800 Subject: [PATCH 13/15] [test: add sleep for elect leader] --- tests/system-test/2-query/cast.py | 2 -- tests/system-test/2-query/distinct.py | 2 -- tests/system-test/2-query/varchar.py | 2 -- 3 files changed, 6 deletions(-) diff --git a/tests/system-test/2-query/cast.py b/tests/system-test/2-query/cast.py index 86319ae25d..f09e7d1f63 100644 --- a/tests/system-test/2-query/cast.py +++ b/tests/system-test/2-query/cast.py @@ -2,7 +2,6 @@ import taos import sys import datetime import inspect -import time from util.log import * from util.sql import * @@ -20,7 +19,6 @@ class TDTestCase: tdSql.prepare() tdLog.printNoPrefix("==========step1:create table") - time.sleep(2) tdSql.execute( '''create table stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) diff --git a/tests/system-test/2-query/distinct.py b/tests/system-test/2-query/distinct.py index 43d48a19cb..a82f3a6f59 100644 --- a/tests/system-test/2-query/distinct.py +++ b/tests/system-test/2-query/distinct.py @@ -1,6 +1,5 @@ import taos import sys -import time from util.log import * from util.sql import * @@ -16,7 +15,6 @@ class TDTestCase: def run(self): # sourcery skip: extract-duplicate-method, remove-redundant-fstring tdSql.prepare() - time.sleep(2) tdLog.printNoPrefix("==========step1:create table") tdSql.execute("create stable db.stb1 (ts timestamp, c1 int, c2 int) tags(t0 tinyint, t1 int, t2 int)") diff --git a/tests/system-test/2-query/varchar.py b/tests/system-test/2-query/varchar.py index f0e3d36ffd..5cc6c8e399 100644 --- a/tests/system-test/2-query/varchar.py +++ b/tests/system-test/2-query/varchar.py @@ -1,6 +1,5 @@ import taos import sys -import time from util.log import * from util.sql import * @@ -18,7 +17,6 @@ class TDTestCase: tdSql.prepare() tdLog.printNoPrefix("==========step1:create table") - time.sleep(2) tdSql.execute( '''create table stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 varchar(16),c9 nchar(32), c10 timestamp) From b790102ffd32bb2924bf5efa1573c042ecb50946 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 18:50:21 +0800 Subject: [PATCH 14/15] [test: add sleep for elect leader] --- tests/pytest/util/sql.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 9fe4ffa0d4..4a3ccff08a 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -60,6 +60,7 @@ class TDSql: self.cursor.execute(s) s = 'use db' self.cursor.execute(s) + time.sleep(2) def error(self, sql): expectErrNotOccured = True From 51fab8059520a98a96d16b65fbf1b31855766556 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Fri, 22 Apr 2022 19:10:28 +0800 Subject: [PATCH 15/15] [test: modify valgrind error check] --- tests/script/jenkins/basic.txt | 2 +- tests/script/sh/checkValgrind.sh | 3 ++- tests/script/tsim/valgrind/checkError.sim | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index a226e90094..51b188c8db 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -6,7 +6,7 @@ # ---- db ./test.sh -f tsim/db/create_all_options.sim -./test.sh -f tsim/db/alter_option.sim +#./test.sh -f tsim/db/alter_option.sim ./test.sh -f tsim/db/basic1.sim ./test.sh -f tsim/db/basic2.sim ./test.sh -f tsim/db/basic3.sim diff --git a/tests/script/sh/checkValgrind.sh b/tests/script/sh/checkValgrind.sh index 17d7ce1aff..e3afb10752 100755 --- a/tests/script/sh/checkValgrind.sh +++ b/tests/script/sh/checkValgrind.sh @@ -34,5 +34,6 @@ LOG_DIR=$TAOS_DIR/sim/$NODE_NAME/log #echo ---- $LOG_DIR -errors=`grep "ERROR SUMMARY:" ${LOG_DIR}/valgrind-taosd-*.log | cut -d ' ' -f 2,3,4,5 | tr -d "\n"` +#errors=`grep "ERROR SUMMARY:" ${LOG_DIR}/valgrind-taosd-*.log | cut -d ' ' -f 2,3,4,5 | tr -d "\n"` +errors=`cat ${LOG_DIR}/valgrind-taosd-*.log | grep "ERROR SUMMARY:" | awk '{print $4}' | awk '{sum+=$1}END{print sum}'` echo $errors diff --git a/tests/script/tsim/valgrind/checkError.sim b/tests/script/tsim/valgrind/checkError.sim index 80700dcbce..38f45d405c 100644 --- a/tests/script/tsim/valgrind/checkError.sim +++ b/tests/script/tsim/valgrind/checkError.sim @@ -71,7 +71,7 @@ print ====> start to check if there are ERRORS in vagrind log file for each dnod # -n : dnode[x] be check system_content sh/checkValgrind.sh -n dnode1 print cmd return result----> [ $system_content ] -if $system_content == @ERROR SUMMARY: 0 errors@ then +if $system_content == 0 then return 0 endi @@ -80,4 +80,4 @@ if $system_content == $null then return 0 endi -return -1 \ No newline at end of file +return -1