diff --git a/cmake/cmake.version b/cmake/cmake.version index 42de285c8eefb58f61ac4fc77fe9fd309ca4d926..5150ee3b75e2ac429961850995d06b5b2fd40cc9 100644 --- a/cmake/cmake.version +++ b/cmake/cmake.version @@ -2,7 +2,7 @@ IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "3.0.3.1") + SET(TD_VER_NUMBER "3.0.3.2") ENDIF () IF (DEFINED VERCOMPATIBLE) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 2de3881dd289ebf247aa0b70d514b97527af039a..8be698e9c9e38a13aad2d06e5b303055d5fdbb04 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 273a3fe + GIT_TAG 01195d6 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/include/common/tcommon.h b/include/common/tcommon.h index 51a714c7921c4d3d3bebddc8e5a76b6f075bcba4..a97c68be4920333f6a08f02fdb6753724db035a3 100644 --- a/include/common/tcommon.h +++ b/include/common/tcommon.h @@ -208,15 +208,12 @@ typedef struct SSDataBlock { } SSDataBlock; enum { - FETCH_TYPE__DATA = 1, - FETCH_TYPE__META, - FETCH_TYPE__SEP, + FETCH_TYPE__DATA = 0, FETCH_TYPE__NONE, }; typedef struct { int8_t fetchType; - STqOffsetVal offset; union { SSDataBlock data; void* meta; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index a0593e7d4b725e0eb5d128ae216ef1c6e9eb0b74..f9419227114dd9fbd50a4f0b28b6f18809bdad7d 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -127,24 +127,24 @@ #define TK_NK_EQ 109 #define TK_USING 110 #define TK_TAGS 111 -#define TK_COMMENT 112 -#define TK_BOOL 113 -#define TK_TINYINT 114 -#define TK_SMALLINT 115 -#define TK_INT 116 -#define TK_INTEGER 117 -#define TK_BIGINT 118 -#define TK_FLOAT 119 -#define TK_DOUBLE 120 -#define TK_BINARY 121 -#define TK_NCHAR 122 -#define TK_UNSIGNED 123 -#define TK_JSON 124 -#define TK_VARCHAR 125 -#define TK_MEDIUMBLOB 126 -#define TK_BLOB 127 -#define TK_VARBINARY 128 -#define TK_DECIMAL 129 +#define TK_BOOL 112 +#define TK_TINYINT 113 +#define TK_SMALLINT 114 +#define TK_INT 115 +#define TK_INTEGER 116 +#define TK_BIGINT 117 +#define TK_FLOAT 118 +#define TK_DOUBLE 119 +#define TK_BINARY 120 +#define TK_NCHAR 121 +#define TK_UNSIGNED 122 +#define TK_JSON 123 +#define TK_VARCHAR 124 +#define TK_MEDIUMBLOB 125 +#define TK_BLOB 126 +#define TK_VARBINARY 127 +#define TK_DECIMAL 128 +#define TK_COMMENT 129 #define TK_MAX_DELAY 130 #define TK_WATERMARK 131 #define TK_ROLLUP 132 diff --git a/include/libs/executor/executor.h b/include/libs/executor/executor.h index 8d63306a881b306c061606569ec3c02aee1548b0..33172a4f868210063f8995099e51b58d04dbd501 100644 --- a/include/libs/executor/executor.h +++ b/include/libs/executor/executor.h @@ -198,11 +198,11 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT // int32_t qStreamSetScanMemData(qTaskInfo_t tinfo, SPackedData submit); -int32_t qStreamExtractOffset(qTaskInfo_t tinfo, STqOffsetVal* pOffset); +void qStreamSetOpen(qTaskInfo_t tinfo); -SMqMetaRsp* qStreamExtractMetaMsg(qTaskInfo_t tinfo); +void qStreamExtractOffset(qTaskInfo_t tinfo, STqOffsetVal* pOffset); -int64_t qStreamExtractPrepareUid(qTaskInfo_t tinfo); +SMqMetaRsp* qStreamExtractMetaMsg(qTaskInfo_t tinfo); const SSchemaWrapper* qExtractSchemaFromTask(qTaskInfo_t tinfo); diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index cdcf54bc61fb80dabcbef14da5cae403acf8cd9a..5b1d1fa1bcd5619e04cf23351c872714aaca31e1 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -223,27 +223,12 @@ static FORCE_INLINE void* streamQueueCurItem(SStreamQueue* queue) { return queue->qItem; } -static FORCE_INLINE void* streamQueueNextItem(SStreamQueue* queue) { - int8_t dequeueFlag = atomic_exchange_8(&queue->status, STREAM_QUEUE__PROCESSING); - if (dequeueFlag == STREAM_QUEUE__FAILED) { - ASSERT(queue->qItem != NULL); - return streamQueueCurItem(queue); - } else { - queue->qItem = NULL; - taosGetQitem(queue->qall, &queue->qItem); - if (queue->qItem == NULL) { - taosReadAllQitems(queue->queue, queue->qall); - taosGetQitem(queue->qall, &queue->qItem); - } - return streamQueueCurItem(queue); - } -} +void* streamQueueNextItem(SStreamQueue* queue); SStreamDataSubmit2* streamDataSubmitNew(SPackedData submit); +void streamDataSubmitDestroy(SStreamDataSubmit2* pDataSubmit); -void streamDataSubmitRefDec(SStreamDataSubmit2* pDataSubmit); - -SStreamDataSubmit2* streamSubmitRefClone(SStreamDataSubmit2* pSubmit); +SStreamDataSubmit2* streamSubmitBlockClone(SStreamDataSubmit2* pSubmit); typedef struct { char* qmsg; @@ -371,43 +356,7 @@ SStreamTask* tNewSStreamTask(int64_t streamId); int32_t tEncodeSStreamTask(SEncoder* pEncoder, const SStreamTask* pTask); int32_t tDecodeSStreamTask(SDecoder* pDecoder, SStreamTask* pTask); void tFreeSStreamTask(SStreamTask* pTask); - -static FORCE_INLINE int32_t streamTaskInput(SStreamTask* pTask, SStreamQueueItem* pItem) { - int8_t type = pItem->type; - if (type == STREAM_INPUT__DATA_SUBMIT) { - SStreamDataSubmit2* pSubmitClone = streamSubmitRefClone((SStreamDataSubmit2*)pItem); - if (pSubmitClone == NULL) { - qDebug("task %d %p submit enqueue failed since out of memory", pTask->taskId, pTask); - terrno = TSDB_CODE_OUT_OF_MEMORY; - atomic_store_8(&pTask->inputStatus, TASK_INPUT_STATUS__FAILED); - return -1; - } - qDebug("task %d %p submit enqueue %p %p %p %d %" PRId64, pTask->taskId, pTask, pItem, pSubmitClone, - pSubmitClone->submit.msgStr, pSubmitClone->submit.msgLen, pSubmitClone->submit.ver); - taosWriteQitem(pTask->inputQueue->queue, pSubmitClone); - // qStreamInput(pTask->exec.executor, pSubmitClone); - } else if (type == STREAM_INPUT__DATA_BLOCK || type == STREAM_INPUT__DATA_RETRIEVE || - type == STREAM_INPUT__REF_DATA_BLOCK) { - taosWriteQitem(pTask->inputQueue->queue, pItem); - // qStreamInput(pTask->exec.executor, pItem); - } else if (type == STREAM_INPUT__CHECKPOINT) { - taosWriteQitem(pTask->inputQueue->queue, pItem); - // qStreamInput(pTask->exec.executor, pItem); - } else if (type == STREAM_INPUT__GET_RES) { - taosWriteQitem(pTask->inputQueue->queue, pItem); - // qStreamInput(pTask->exec.executor, pItem); - } - - if (type != STREAM_INPUT__GET_RES && type != STREAM_INPUT__CHECKPOINT && pTask->triggerParam != 0) { - atomic_val_compare_exchange_8(&pTask->triggerStatus, TASK_TRIGGER_STATUS__INACTIVE, TASK_TRIGGER_STATUS__ACTIVE); - } - -#if 0 - // TODO: back pressure - atomic_store_8(&pTask->inputStatus, TASK_INPUT_STATUS__NORMAL); -#endif - return 0; -} +int32_t tAppendDataForStream(SStreamTask* pTask, SStreamQueueItem* pItem); static FORCE_INLINE void streamTaskInputFail(SStreamTask* pTask) { atomic_store_8(&pTask->inputStatus, TASK_INPUT_STATUS__FAILED); diff --git a/include/libs/wal/wal.h b/include/libs/wal/wal.h index 014ed518a397e97424f189527ac4ac2304288bc2..ccbc53fa5d06d2b55cf69f4efbbaa5f0186a0cc3 100644 --- a/include/libs/wal/wal.h +++ b/include/libs/wal/wal.h @@ -146,8 +146,8 @@ typedef struct { int64_t curFileFirstVer; int64_t curVersion; int64_t capacity; - int8_t curInvalid; - int8_t curStopped; +// int8_t curInvalid; +// int8_t curStopped; TdThreadMutex mutex; SWalFilterCond cond; // TODO remove it diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 6489304bdaf1bdac3fc4f6a74d63fc35e8dc1a2c..0937961f03ceb140201206c5b206d55a25219b39 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -758,6 +758,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_TMQ_INVALID_MSG TAOS_DEF_ERROR_CODE(0, 0x4000) #define TSDB_CODE_TMQ_CONSUMER_MISMATCH TAOS_DEF_ERROR_CODE(0, 0x4001) #define TSDB_CODE_TMQ_CONSUMER_CLOSED TAOS_DEF_ERROR_CODE(0, 0x4002) +#define TSDB_CODE_TMQ_CONSUMER_ERROR TAOS_DEF_ERROR_CODE(0, 0x4003) // stream #define TSDB_CODE_STREAM_TASK_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x4100) diff --git a/include/util/tqueue.h b/include/util/tqueue.h index 1f6b205cdf8a2faa045a7a08b9008cb271a741a1..d05b5418b37d1506d52f7b211c3c92db53dabc85 100644 --- a/include/util/tqueue.h +++ b/include/util/tqueue.h @@ -61,7 +61,7 @@ typedef void (*FItems)(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfItems); typedef struct STaosQnode STaosQnode; -typedef struct STaosQnode { +struct STaosQnode { STaosQnode *next; STaosQueue *queue; int64_t timestamp; @@ -70,9 +70,9 @@ typedef struct STaosQnode { int8_t itype; int8_t reserved[3]; char item[]; -} STaosQnode; +}; -typedef struct STaosQueue { +struct STaosQueue { STaosQnode *head; STaosQnode *tail; STaosQueue *next; // for queue set @@ -84,22 +84,22 @@ typedef struct STaosQueue { int64_t memOfItems; int32_t numOfItems; int64_t threadId; -} STaosQueue; +}; -typedef struct STaosQset { +struct STaosQset { STaosQueue *head; STaosQueue *current; TdThreadMutex mutex; tsem_t sem; int32_t numOfQueues; int32_t numOfItems; -} STaosQset; +}; -typedef struct STaosQall { +struct STaosQall { STaosQnode *current; STaosQnode *start; int32_t numOfItems; -} STaosQall; +}; STaosQueue *taosOpenQueue(); void taosCloseQueue(STaosQueue *queue); diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index a4ecc3c3df8ab358b3be9b958932ee2bdfd439de..40a685faf53bdb0f162896e6d40bd5f362438b0d 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -533,8 +533,7 @@ static int32_t smlGenerateSchemaAction(SSchema *colField, SHashObj *colHash, SSm uint16_t *index = colHash ? (uint16_t *)taosHashGet(colHash, kv->key, kv->keyLen) : NULL; if (index) { if (colField[*index].type != kv->type) { - uError("SML:0x%" PRIx64 " point type and db type mismatch. key: %s. point type: %d, db type: %d", info->id, - kv->key, colField[*index].type, kv->type); + uError("SML:0x%" PRIx64 " point type and db type mismatch. point type: %d, db type: %d, key: %s", info->id, colField[*index].type, kv->type, kv->key); return TSDB_CODE_TSC_INVALID_VALUE; } diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 59a407656d47d2016fe00afb350851b89ae4e3fb..e295ec93af7bf18bde178cec6f80afb6bb8d5f8c 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -107,7 +107,6 @@ struct tmq_t { STaosQueue* mqueue; // queue of rsp STaosQall* qall; STaosQueue* delayedTask; // delayed task queue for heartbeat and auto commit - TdThreadMutex lock; // used to protect the operation on each topic, when updating the epsets. tsem_t rspSem; }; @@ -188,7 +187,6 @@ typedef struct { SMqClientVg* pVg; SMqClientTopic* pTopic; int32_t vgId; - tsem_t rspSem; uint64_t requestId; // request id for debug purpose } SMqPollCbParam; @@ -979,7 +977,6 @@ void tmqFreeImpl(void* handle) { taosFreeQall(tmq->qall); tsem_destroy(&tmq->rspSem); - taosThreadMutexDestroy(&tmq->lock); taosArrayDestroyEx(tmq->clientTopics, freeClientVgImpl); taos_close_internal(tmq->pTscObj); @@ -1024,7 +1021,6 @@ tmq_t* tmq_consumer_new(tmq_conf_t* conf, char* errstr, int32_t errstrLen) { pTmq->delayedTask = taosOpenQueue(); pTmq->qall = taosAllocateQall(); - taosThreadMutexInit(&pTmq->lock, NULL); if (pTmq->clientTopics == NULL || pTmq->mqueue == NULL || pTmq->qall == NULL || pTmq->delayedTask == NULL || conf->groupId[0] == 0) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -1233,7 +1229,6 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId); if (tmq == NULL) { - tsem_destroy(&pParam->rspSem); taosMemoryFree(pParam); taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); @@ -1269,6 +1264,8 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { pRspWrapper->tmqRspType = TMQ_MSG_TYPE__END_RSP; taosWriteQitem(tmq->mqueue, pRspWrapper); + }else if(code == TSDB_CODE_WAL_LOG_NOT_EXIST){ //poll data while insert + taosMsleep(500); } goto CREATE_MSG_FAIL; @@ -1343,8 +1340,9 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { taosMemoryFree(pMsg->pData); taosWriteQitem(tmq->mqueue, pRspWrapper); + int32_t total = taosQueueItemSize(tmq->mqueue); tscDebug("consumer:0x%" PRIx64 " put poll res into mqueue, type:%d, vgId:%d, total in queue:%d, reqId:0x%" PRIx64, - tmq->consumerId, rspType, vgId, tmq->mqueue->numOfItems, requestId); + tmq->consumerId, rspType, vgId, total, requestId); tsem_post(&tmq->rspSem); taosReleaseRef(tmqMgmt.rsetId, refId); @@ -1419,7 +1417,7 @@ static void freeClientVgInfo(void* param) { taosArrayDestroy(pTopic->vgs); } -static bool tmqUpdateEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp) { +static bool doUpdateLocalEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp) { bool set = false; int32_t topicNumCur = taosArrayGetSize(tmq->clientTopics); @@ -1471,14 +1469,11 @@ static bool tmqUpdateEp(tmq_t* tmq, int32_t epoch, const SMqAskEpRsp* pRsp) { taosHashCleanup(pVgOffsetHashMap); - taosThreadMutexLock(&tmq->lock); // destroy current buffered existed topics info if (tmq->clientTopics) { taosArrayDestroyEx(tmq->clientTopics, freeClientVgInfo); } - tmq->clientTopics = newTopics; - taosThreadMutexUnlock(&tmq->lock); int8_t flag = (topicNumGet == 0)? TMQ_CONSUMER_STATUS__NO_TOPIC:TMQ_CONSUMER_STATUS__READY; atomic_store_8(&tmq->status, flag); @@ -1742,7 +1737,7 @@ static int32_t tmqHandleNoPollRsp(tmq_t* tmq, SMqRspWrapper* rspWrapper, bool* p if (rspWrapper->epoch > atomic_load_32(&tmq->epoch)) { SMqAskEpRspWrapper* pEpRspWrapper = (SMqAskEpRspWrapper*)rspWrapper; SMqAskEpRsp* rspMsg = &pEpRspWrapper->msg; - tmqUpdateEp(tmq, rspWrapper->epoch, rspMsg); + doUpdateLocalEp(tmq, rspWrapper->epoch, rspMsg); /*tmqClearUnhandleMsg(tmq);*/ tDeleteSMqAskEpRsp(rspMsg); *pReset = true; @@ -2163,7 +2158,7 @@ void updateEpCallbackFn(tmq_t* pTmq, int32_t code, SDataBuf* pDataBuf, void* par SMqAskEpRsp rsp; tDecodeSMqAskEpRsp(POINTER_SHIFT(pDataBuf->pData, sizeof(SMqRspHead)), &rsp); - tmqUpdateEp(pTmq, head->epoch, &rsp); + doUpdateLocalEp(pTmq, head->epoch, &rsp); tDeleteSMqAskEpRsp(&rsp); } diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index 6cb89c13ecce538c0b6cf0c342bb0b5866ad9c37..84e3424264875ea11c49f5350deca0daa9e8018d 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -161,10 +161,10 @@ void *queryThread(void *arg) { return NULL; } -static int32_t numOfThreads = 1; +int32_t numOfThreads = 1; void tmq_commit_cb_print(tmq_t *pTmq, int32_t code, void *param) { - printf("success, code:%d\n", code); + printf("auto commit success, code:%d\n\n\n\n", code); } void* doConsumeData(void* param) { @@ -173,7 +173,7 @@ void* doConsumeData(void* param) { tmq_conf_t* conf = tmq_conf_new(); tmq_conf_set(conf, "enable.auto.commit", "true"); tmq_conf_set(conf, "auto.commit.interval.ms", "1000"); - tmq_conf_set(conf, "group.id", "cgrpName12"); + tmq_conf_set(conf, "group.id", "cgrpName41"); tmq_conf_set(conf, "td.connect.user", "root"); tmq_conf_set(conf, "td.connect.pass", "taosdata"); tmq_conf_set(conf, "auto.offset.reset", "earliest"); @@ -1060,7 +1060,7 @@ TEST(clientCase, sub_tb_test) { tmq_conf_t* conf = tmq_conf_new(); tmq_conf_set(conf, "enable.auto.commit", "true"); tmq_conf_set(conf, "auto.commit.interval.ms", "1000"); - tmq_conf_set(conf, "group.id", "cgrpName27"); + tmq_conf_set(conf, "group.id", "cgrpName45"); tmq_conf_set(conf, "td.connect.user", "root"); tmq_conf_set(conf, "td.connect.pass", "taosdata"); tmq_conf_set(conf, "auto.offset.reset", "earliest"); diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 7a238440a70e32fbc0084b2bf4f9fbb2c2396a26..371073ed762bafe53236b088c5a18109888aa187 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -7212,6 +7212,7 @@ void tDestroySSubmitReq2(SSubmitReq2 *pReq, int32_t flag) { tDestroySSubmitTbData(&aSubmitTbData[i], flag); } taosArrayDestroy(pReq->aSubmitTbData); + pReq->aSubmitTbData = NULL; } int32_t tEncodeSSubmitRsp2(SEncoder *pCoder, const SSubmitRsp2 *pRsp) { diff --git a/source/dnode/mnode/impl/inc/mndConsumer.h b/source/dnode/mnode/impl/inc/mndConsumer.h index 99b0d06936ec16b59b0abda4bad52748ff9a6e45..aa38b94fd7d6a6b0a5118d6aac2a760e7717cd94 100644 --- a/source/dnode/mnode/impl/inc/mndConsumer.h +++ b/source/dnode/mnode/impl/inc/mndConsumer.h @@ -24,10 +24,10 @@ extern "C" { enum { MQ_CONSUMER_STATUS__MODIFY = 1, - MQ_CONSUMER_STATUS__MODIFY_IN_REB, // this value is not used anymore +// MQ_CONSUMER_STATUS__MODIFY_IN_REB, // this value is not used anymore MQ_CONSUMER_STATUS__READY, MQ_CONSUMER_STATUS__LOST, - MQ_CONSUMER_STATUS__LOST_IN_REB, // this value is not used anymore +// MQ_CONSUMER_STATUS__LOST_IN_REB, // this value is not used anymore MQ_CONSUMER_STATUS__LOST_REBD, MQ_CONSUMER_STATUS__REMOVED, }; diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 68670eedfbd6ed9e1672af0dcdb999f51d13703e..0f3f862d6d60ca5d28a5bb5c994d766cd6c1fd03 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -337,7 +337,7 @@ static int32_t mndProcessMqTimerMsg(SRpcMsg *pMsg) { taosArrayPush(pRebSub->removedConsumers, &pConsumer->consumerId); } taosRUnLockLatch(&pConsumer->lock); - } else if (status == MQ_CONSUMER_STATUS__MODIFY || status == MQ_CONSUMER_STATUS__MODIFY_IN_REB) { + } else if (status == MQ_CONSUMER_STATUS__MODIFY) { taosRLockLatch(&pConsumer->lock); int32_t newTopicNum = taosArrayGetSize(pConsumer->rebNewTopics); @@ -876,17 +876,11 @@ static void updateConsumerStatus(SMqConsumerObj* pConsumer) { int32_t status = pConsumer->status; if (taosArrayGetSize(pConsumer->rebNewTopics) == 0 && taosArrayGetSize(pConsumer->rebRemovedTopics) == 0) { - if (status == MQ_CONSUMER_STATUS__MODIFY || status == MQ_CONSUMER_STATUS__MODIFY_IN_REB) { + if (status == MQ_CONSUMER_STATUS__MODIFY) { pConsumer->status = MQ_CONSUMER_STATUS__READY; - } else if (status == MQ_CONSUMER_STATUS__LOST_IN_REB || status == MQ_CONSUMER_STATUS__LOST) { + } else if (status == MQ_CONSUMER_STATUS__LOST) { pConsumer->status = MQ_CONSUMER_STATUS__LOST_REBD; } - } else { - if (status == MQ_CONSUMER_STATUS__MODIFY || status == MQ_CONSUMER_STATUS__MODIFY_IN_REB) { - pConsumer->status = MQ_CONSUMER_STATUS__MODIFY; - } else if (status == MQ_CONSUMER_STATUS__LOST || status == MQ_CONSUMER_STATUS__LOST_IN_REB) { - pConsumer->status = MQ_CONSUMER_STATUS__LOST; - } } } @@ -1195,10 +1189,8 @@ static const char *mndConsumerStatusName(int status) { return "ready"; case MQ_CONSUMER_STATUS__LOST: case MQ_CONSUMER_STATUS__LOST_REBD: - case MQ_CONSUMER_STATUS__LOST_IN_REB: return "lost"; case MQ_CONSUMER_STATUS__MODIFY: - case MQ_CONSUMER_STATUS__MODIFY_IN_REB: return "rebalancing"; default: return "unknown"; diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 9636dc2872c82c50a9e501e744a5b8712f5bb0fd..a9e5fe628bba066b7debeff42a4d6d2261f172c1 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -228,19 +228,12 @@ typedef struct SSnapContext { SArray *idList; int32_t index; bool withMeta; - bool queryMetaOrData; // true-get meta, false-get data + bool queryMeta; // true-get meta, false-get data } SSnapContext; typedef struct STqReader { - // const SSubmitReq *pMsg; - // SSubmitBlk *pBlock; - // SSubmitMsgIter msgIter; - // SSubmitBlkIter blkIter; - - int64_t ver; SPackedData msg2; - int8_t setMsg; SSubmitReq2 submit; int32_t nextBlk; @@ -267,7 +260,7 @@ int32_t tqReaderAddTbUidList(STqReader *pReader, const SArray *tbUidList); int32_t tqReaderRemoveTbUidList(STqReader *pReader, const SArray *tbUidList); int32_t tqSeekVer(STqReader *pReader, int64_t ver, const char *id); -int32_t tqNextBlock(STqReader *pReader, SFetchRet *ret); +void tqNextBlock(STqReader *pReader, SFetchRet *ret); int32_t tqReaderSetSubmitReq2(STqReader *pReader, void *msgStr, int32_t msgLen, int64_t ver); // int32_t tqReaderSetDataMsg(STqReader *pReader, const SSubmitReq *pMsg, int64_t ver); diff --git a/source/dnode/vnode/src/meta/metaSnapshot.c b/source/dnode/vnode/src/meta/metaSnapshot.c index 67ade45732865893d730f4920179bdc96a9b4925..0126d29cc93f3b2f69f3f12539c8cda62f1fa19a 100644 --- a/source/dnode/vnode/src/meta/metaSnapshot.c +++ b/source/dnode/vnode/src/meta/metaSnapshot.c @@ -268,7 +268,7 @@ int32_t buildSnapContext(SMeta* pMeta, int64_t snapVersion, int64_t suid, int8_t ctx->snapVersion = snapVersion; ctx->suid = suid; ctx->subType = subType; - ctx->queryMetaOrData = withMeta; + ctx->queryMeta = withMeta; ctx->withMeta = withMeta; ctx->idVersion = taosHashInit(100, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK); if (ctx->idVersion == NULL) { @@ -475,7 +475,7 @@ int32_t getMetafromSnapShot(SSnapContext* ctx, void** pBuf, int32_t* contLen, in if (ctx->index >= taosArrayGetSize(ctx->idList)) { metaDebug("tmqsnap get meta end"); ctx->index = 0; - ctx->queryMetaOrData = false; // change to get data + ctx->queryMeta = false; // change to get data return 0; } diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index d4bdd633e91b30d72e9c48422f3dc3fa92481fb3..66e6ac4cd8cc45fb1cd3017d871ee7ada54c6cc6 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -236,21 +236,6 @@ int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry) { } int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, const SMqDataRsp* pRsp, int32_t type) { -#if 0 - A(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); - A(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); - - A(!pRsp->withSchema); - A(taosArrayGetSize(pRsp->blockSchema) == 0); - - if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { - if (pRsp->blockNum > 0) { - A(pRsp->rspOffset.version > pRsp->reqOffset.version); - } else { - A(pRsp->rspOffset.version >= pRsp->reqOffset.version); - } - } -#endif doSendDataRsp(&pMsg->info, pRsp, pReq->epoch, pReq->consumerId, type); char buf1[80] = {0}; @@ -352,17 +337,6 @@ static int32_t tqInitDataRsp(SMqDataRsp* pRsp, const SMqPollReq* pReq, int8_t su } pRsp->withTbName = 0; -#if 0 - pRsp->withTbName = pReq->withTbName; - if (pRsp->withTbName) { - pRsp->blockTbName = taosArrayInit(0, sizeof(void*)); - if (pRsp->blockTbName == NULL) { - // TODO free - return -1; - } - } -#endif - pRsp->withSchema = false; return 0; } @@ -421,6 +395,7 @@ static int32_t extractResetOffsetVal(STqOffsetVal* pOffsetVal, STQ* pTq, STqHand return -1; } + // offset set to previous version when init tqOffsetResetToLog(pOffsetVal, pHandle->pRef->refVer - 1); } } else if (reqOffset.type == TMQ_OFFSET__RESET_LATEST) { @@ -461,7 +436,6 @@ static int32_t extractResetOffsetVal(STqOffsetVal* pOffsetVal, STQ* pTq, STqHand static int32_t extractDataAndRspForNormalSubscribe(STQ* pTq, STqHandle* pHandle, const SMqPollReq* pRequest, SRpcMsg* pMsg, STqOffsetVal* pOffset) { - int32_t code = 0; uint64_t consumerId = pRequest->consumerId; int32_t vgId = TD_VID(pTq->pVnode); @@ -472,10 +446,9 @@ static int32_t extractDataAndRspForNormalSubscribe(STQ* pTq, STqHandle* pHandle, taosWLockLatch(&pTq->lock); qSetTaskId(pHandle->execHandle.task, consumerId, pRequest->reqId); - code = tqScanData(pTq, pHandle, &dataRsp, pOffset); - if (code != TSDB_CODE_SUCCESS) { - taosWUnLockLatch(&pTq->lock); - return code; + int code = tqScanData(pTq, pHandle, &dataRsp, pOffset); + if(code != 0) { + goto end; } // till now, all data has been transferred to consumer, new data needs to push client once arrived. @@ -486,89 +459,60 @@ static int32_t extractDataAndRspForNormalSubscribe(STQ* pTq, STqHandle* pHandle, return code; } - taosWUnLockLatch(&pTq->lock); + code = tqSendDataRsp(pTq, pMsg, pRequest, (SMqDataRsp*)&dataRsp, TMQ_MSG_TYPE__POLL_RSP); // NOTE: this pHandle->consumerId may have been changed already. - tqDebug("tmq poll: consumer:0x%" PRIx64 ", subkey %s, vgId:%d, rsp block:%d, offset type:%d, uid/version:%" PRId64 - ", ts:%" PRId64 ", reqId:0x%" PRIx64, - consumerId, pHandle->subKey, vgId, dataRsp.blockNum, dataRsp.rspOffset.type, dataRsp.rspOffset.uid, - dataRsp.rspOffset.ts, pRequest->reqId); - tDeleteSMqDataRsp(&dataRsp); +end: + { + char buf[80] = {0}; + tFormatOffset(buf, 80, &dataRsp.rspOffset); + tqDebug("tmq poll: consumer:0x%" PRIx64 ", subkey %s, vgId:%d, rsp block:%d, rsp offset type:%s, reqId:0x%" PRIx64 " code:%d", + consumerId, pHandle->subKey, vgId, dataRsp.blockNum, buf, pRequest->reqId, code); + taosWUnLockLatch(&pTq->lock); + tDeleteSMqDataRsp(&dataRsp); + } return code; } -static int32_t doPollDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq* pRequest, SRpcMsg* pMsg) { - int32_t code = -1; - STqOffsetVal offset = {0}; - SWalCkHead* pCkHead = NULL; - int32_t vgId = TD_VID(pTq->pVnode); - STqOffsetVal reqOffset = pRequest->reqOffset; - uint64_t consumerId = pRequest->consumerId; - - // 1. reset the offset if needed - if (IS_OFFSET_RESET_TYPE(reqOffset.type)) { - // handle the reset offset cases, according to the consumer's choice. - bool blockReturned = false; - code = extractResetOffsetVal(&offset, pTq, pHandle, pRequest, pMsg, &blockReturned); - if (code != 0) { - return code; - } - - // empty block returned, quit - if (blockReturned) { - return 0; - } - } else { // use the consumer specified offset - // the offset value can not be monotonious increase?? - offset = reqOffset; - } - - // this is a normal subscribe requirement - if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { - return extractDataAndRspForNormalSubscribe(pTq, pHandle, pRequest, pMsg, &offset); - } - - // todo handle the case where re-balance occurs. - // for taosx +static int32_t extractDataAndRspForDbStbSubscribe(STQ* pTq, STqHandle* pHandle, const SMqPollReq* pRequest, SRpcMsg* pMsg, STqOffsetVal *offset) { + int code = 0; + int32_t vgId = TD_VID(pTq->pVnode); + SWalCkHead* pCkHead = NULL; SMqMetaRsp metaRsp = {0}; STaosxRsp taosxRsp = {0}; tqInitTaosxRsp(&taosxRsp, pRequest); - if (offset.type != TMQ_OFFSET__LOG) { - if (tqScanTaosx(pTq, pHandle, &taosxRsp, &metaRsp, &offset) < 0) { + if (offset->type != TMQ_OFFSET__LOG) { + if (tqScanTaosx(pTq, pHandle, &taosxRsp, &metaRsp, offset) < 0) { return -1; } if (metaRsp.metaRspLen > 0) { code = tqSendMetaPollRsp(pTq, pMsg, pRequest, &metaRsp); - tqDebug("tmq poll: consumer:0x%" PRIx64 " subkey:%s vgId:%d, send meta offset type:%d,uid:%" PRId64 - ",ts:%" PRId64, - consumerId, pHandle->subKey, vgId, metaRsp.rspOffset.type, metaRsp.rspOffset.uid, - metaRsp.rspOffset.ts); + tqDebug("tmq poll: consumer:0x%" PRIx64 " subkey:%s vgId:%d, send meta offset type:%d,uid:%" PRId64 ",ts:%" PRId64, + pRequest->consumerId, pHandle->subKey, vgId, metaRsp.rspOffset.type, metaRsp.rspOffset.uid, metaRsp.rspOffset.ts); taosMemoryFree(metaRsp.metaRsp); tDeleteSTaosxRsp(&taosxRsp); return code; } + tqDebug("taosx poll: consumer:0x%" PRIx64 " subkey:%s vgId:%d, send data blockNum:%d, offset type:%d,uid:%" PRId64 + ",ts:%" PRId64,pRequest->consumerId, pHandle->subKey, vgId, taosxRsp.blockNum, taosxRsp.rspOffset.type, taosxRsp.rspOffset.uid,taosxRsp.rspOffset.ts); if (taosxRsp.blockNum > 0) { code = tqSendDataRsp(pTq, pMsg, pRequest, (SMqDataRsp*)&taosxRsp, TMQ_MSG_TYPE__TAOSX_RSP); tDeleteSTaosxRsp(&taosxRsp); return code; - } else { - offset = taosxRsp.rspOffset; + }else { + *offset = taosxRsp.rspOffset; } - - tqDebug("taosx poll: consumer:0x%" PRIx64 " subkey:%s vgId:%d, send data blockNum:%d, offset type:%d,uid:%" PRId64 - ",version:%" PRId64, - consumerId, pHandle->subKey, vgId, taosxRsp.blockNum, taosxRsp.rspOffset.type, taosxRsp.rspOffset.uid, - taosxRsp.rspOffset.version); } - if (offset.type == TMQ_OFFSET__LOG) { - int64_t fetchVer = offset.version + 1; + + if (offset->type == TMQ_OFFSET__LOG) { + int64_t fetchVer = offset->version + 1; pCkHead = taosMemoryMalloc(sizeof(SWalCkHead) + 2048); if (pCkHead == NULL) { tDeleteSTaosxRsp(&taosxRsp); @@ -578,12 +522,10 @@ static int32_t doPollDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq* p walSetReaderCapacity(pHandle->pWalReader, 2048); int totalRows = 0; while (1) { - // todo refactor: this is not correct. int32_t savedEpoch = atomic_load_32(&pHandle->epoch); if (savedEpoch > pRequest->epoch) { tqWarn("tmq poll: consumer:0x%" PRIx64 " (epoch %d), subkey:%s vgId:%d offset %" PRId64 - ", found new consumer epoch %d, discard req epoch %d", - consumerId, pRequest->epoch, pHandle->subKey, vgId, fetchVer, savedEpoch, pRequest->epoch); + ", found new consumer epoch %d, discard req epoch %d", pRequest->consumerId, pRequest->epoch, pHandle->subKey, vgId, fetchVer, savedEpoch, pRequest->epoch); break; } @@ -596,7 +538,7 @@ static int32_t doPollDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq* p } SWalCont* pHead = &pCkHead->head; - tqDebug("tmq poll: consumer:0x%" PRIx64 " (epoch %d) iter log, vgId:%d offset %" PRId64 " msgType %d", consumerId, + tqDebug("tmq poll: consumer:0x%" PRIx64 " (epoch %d) iter log, vgId:%d offset %" PRId64 " msgType %d", pRequest->consumerId, pRequest->epoch, vgId, fetchVer, pHead->msgType); // process meta @@ -634,7 +576,7 @@ static int32_t doPollDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq* p }; if (tqTaosxScanLog(pTq, pHandle, submit, &taosxRsp, &totalRows) < 0) { - tqError("tmq poll: tqTaosxScanLog error %" PRId64 ", in vgId:%d, subkey %s", consumerId, vgId, + tqError("tmq poll: tqTaosxScanLog error %" PRId64 ", in vgId:%d, subkey %s", pRequest->consumerId, vgId, pRequest->subKey); taosMemoryFreeClear(pCkHead); tDeleteSTaosxRsp(&taosxRsp); @@ -658,6 +600,39 @@ static int32_t doPollDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq* p return 0; } +static int32_t doPollDataForMq(STQ* pTq, STqHandle* pHandle, const SMqPollReq* pRequest, SRpcMsg* pMsg) { + int32_t code = -1; + STqOffsetVal offset = {0}; + STqOffsetVal reqOffset = pRequest->reqOffset; + + // 1. reset the offset if needed + if (IS_OFFSET_RESET_TYPE(reqOffset.type)) { + // handle the reset offset cases, according to the consumer's choice. + bool blockReturned = false; + code = extractResetOffsetVal(&offset, pTq, pHandle, pRequest, pMsg, &blockReturned); + if (code != 0) { + return code; + } + + // empty block returned, quit + if (blockReturned) { + return 0; + } + } else { // use the consumer specified offset + // the offset value can not be monotonious increase?? + offset = reqOffset; + } + + // this is a normal subscribe requirement + if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { + return extractDataAndRspForNormalSubscribe(pTq, pHandle, pRequest, pMsg, &offset); + } + + // todo handle the case where re-balance occurs. + // for taosx + return extractDataAndRspForDbStbSubscribe(pTq, pHandle, pRequest, pMsg, &offset); +} + int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { SMqPollReq req = {0}; if (tDeserializeSMqPollReq(pMsg->pCont, pMsg->contLen, &req) < 0) { @@ -819,13 +794,7 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg pHandle->pRef = pRef; SReadHandle handle = { - .meta = pVnode->pMeta, - .vnode = pVnode, - .initTableReader = true, - .initTqReader = true, - .version = ver, - }; - + .meta = pVnode->pMeta, .vnode = pVnode, .initTableReader = true, .initTqReader = true, .version = ver}; pHandle->snapshotVer = ver; if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { @@ -1338,7 +1307,7 @@ int32_t tqProcessDelReq(STQ* pTq, void* pReq, int32_t len, int64_t ver) { pRefBlock->dataRef = pRef; atomic_add_fetch_32(pRefBlock->dataRef, 1); - if (streamTaskInput(pTask, (SStreamQueueItem*)pRefBlock) < 0) { + if (tAppendDataForStream(pTask, (SStreamQueueItem*)pRefBlock) < 0) { qError("stream task input del failed, task id %d", pTask->taskId); atomic_sub_fetch_32(pRef, 1); @@ -1373,7 +1342,7 @@ int32_t tqProcessDelReq(STQ* pTq, void* pReq, int32_t len, int64_t ver) { taosArrayPush(pStreamBlock->blocks, &block); if (!failed) { - if (streamTaskInput(pTask, (SStreamQueueItem*)pStreamBlock) < 0) { + if (tAppendDataForStream(pTask, (SStreamQueueItem*)pStreamBlock) < 0) { qError("stream task input del failed, task id %d", pTask->taskId); continue; } @@ -1393,15 +1362,14 @@ int32_t tqProcessDelReq(STQ* pTq, void* pReq, int32_t len, int64_t ver) { } int32_t tqProcessSubmitReq(STQ* pTq, SPackedData submit) { - void* pIter = NULL; - bool failed = false; - SStreamDataSubmit2* pSubmit = NULL; + void* pIter = NULL; + bool succ = true; - pSubmit = streamDataSubmitNew(submit); + SStreamDataSubmit2* pSubmit = streamDataSubmitNew(submit); if (pSubmit == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; tqError("failed to create data submit for stream since out of memory"); - failed = true; + succ = false; } while (1) { @@ -1411,22 +1379,27 @@ int32_t tqProcessSubmitReq(STQ* pTq, SPackedData submit) { } SStreamTask* pTask = *(SStreamTask**)pIter; - if (pTask->taskLevel != TASK_LEVEL__SOURCE) continue; + if (pTask->taskLevel != TASK_LEVEL__SOURCE) { + continue; + } + if (pTask->taskStatus == TASK_STATUS__RECOVER_PREPARE || pTask->taskStatus == TASK_STATUS__WAIT_DOWNSTREAM) { - tqDebug("skip push task %d, task status %d", pTask->taskId, pTask->taskStatus); + tqDebug("stream task:%d skip push data, not ready for processing, status %d", pTask->taskId, pTask->taskStatus); continue; } - tqDebug("data submit enqueue stream task: %d, ver: %" PRId64, pTask->taskId, submit.ver); + tqDebug("data submit enqueue stream task:%d, ver: %" PRId64, pTask->taskId, submit.ver); + if (succ) { + int32_t code = tAppendDataForStream(pTask, (SStreamQueueItem*)pSubmit); + if (code < 0) { + // let's handle the back pressure - if (!failed) { - if (streamTaskInput(pTask, (SStreamQueueItem*)pSubmit) < 0) { - tqError("stream task input failed, task id %d", pTask->taskId); + tqError("stream task:%d failed to put into queue for, too many", pTask->taskId); continue; } if (streamSchedExec(pTask) < 0) { - tqError("stream task launch failed, task id %d", pTask->taskId); + tqError("stream task:%d launch failed, code:%s", pTask->taskId, tstrerror(terrno)); continue; } } else { @@ -1434,12 +1407,12 @@ int32_t tqProcessSubmitReq(STQ* pTq, SPackedData submit) { } } - if (pSubmit) { - streamDataSubmitRefDec(pSubmit); + if (pSubmit != NULL) { + streamDataSubmitDestroy(pSubmit); taosFreeQitem(pSubmit); } - return failed ? -1 : 0; + return succ ? 0 : -1; } int32_t tqProcessTaskRunReq(STQ* pTq, SRpcMsg* pMsg) { @@ -1559,6 +1532,8 @@ int32_t vnodeEnqueueStreamMsg(SVnode* pVnode, SRpcMsg* pMsg) { rpcFreeCont(pMsg->pCont); taosFreeQitem(pMsg); return 0; + } else { + tDeleteStreamDispatchReq(&req); } code = TSDB_CODE_STREAM_TASK_NOT_EXIST; diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index 1619829115960d7c1e35ba6663e5a834dfa62c37..9dfcf43e4d534116c536ce85f4d9c8b7daf9fcc9 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -30,7 +30,7 @@ static int32_t tqLoopExecFromQueue(STQ* pTq, STqHandle* pHandle, SStreamDataSubm // update processed atomic_store_64(&pHandle->pushHandle.processedVer, pSubmit->ver); streamQueueProcessSuccess(&pHandle->pushHandle.inputQ); - streamDataSubmitRefDec(pSubmit); + streamDataSubmitDestroy(pSubmit); if (pRsp->blockNum > 0) { *ppSubmit = pSubmit; return 0; @@ -58,7 +58,7 @@ int32_t tqExecFromInputQ(STQ* pTq, STqHandle* pHandle) { } while (pHandle->pushHandle.processedVer > pSubmit->ver + 1) { streamQueueProcessSuccess(&pHandle->pushHandle.inputQ); - streamDataSubmitRefDec(pSubmit); + streamDataSubmitDestroy(pSubmit); pSubmit = streamQueueNextItem(&pHandle->pushHandle.inputQ); if (pSubmit == NULL) break; } @@ -120,7 +120,7 @@ int32_t tqPreparePush(STQ* pTq, STqHandle* pHandle, int64_t reqId, const SRpcHan int32_t tqEnqueue(STqHandle* pHandle, SStreamDataSubmit* pSubmit) { int8_t inputStatus = atomic_load_8(&pHandle->pushHandle.inputStatus); if (inputStatus == TASK_INPUT_STATUS__NORMAL) { - SStreamDataSubmit* pSubmitClone = streamSubmitRefClone(pSubmit); + SStreamDataSubmit* pSubmitClone = streamSubmitBlockClone(pSubmit); if (pSubmitClone == NULL) { return -1; } @@ -207,33 +207,18 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ #endif typedef struct { - void* pKey; + void* pKey; int64_t keyLen; } SItem; static void recordPushedEntry(SArray* cachedKey, void* pIter); +static void doRemovePushedEntry(SArray* pCachedKeys, STQ* pTq); static void freeItem(void* param) { SItem* p = (SItem*) param; taosMemoryFree(p->pKey); } -static void doRemovePushedEntry(SArray* pCachedKeys, STQ* pTq) { - int32_t vgId = TD_VID(pTq->pVnode); - int32_t numOfKeys = (int32_t) taosArrayGetSize(pCachedKeys); - - for (int32_t i = 0; i < numOfKeys; i++) { - SItem* pItem = taosArrayGet(pCachedKeys, i); - if (taosHashRemove(pTq->pPushMgr, pItem->pKey, pItem->keyLen) != 0) { - tqError("vgId:%d, tq push hash remove key error, key: %s", vgId, (char*) pItem->pKey); - } - } - - if (numOfKeys > 0) { - tqDebug("vgId:%d, pushed %d items and remain:%d", vgId, numOfKeys, (int32_t)taosHashGetSize(pTq->pPushMgr)); - } -} - static void doPushDataForEntry(void* pIter, STqExecHandle* pExec, STQ* pTq, int64_t ver, int32_t vgId, char* pData, int32_t dataLen, SArray* pCachedKey) { STqPushEntry* pPushEntry = *(STqPushEntry**)pIter; @@ -253,7 +238,7 @@ static void doPushDataForEntry(void* pIter, STqExecHandle* pExec, STQ* pTq, int6 if (qStreamSetScanMemData(pTaskInfo, submit) != 0) { return; } - + qStreamSetOpen(pTaskInfo); // here start to scan submit block to extract the subscribed data int32_t totalRows = 0; @@ -347,7 +332,7 @@ int32_t tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t v void* data = taosMemoryMalloc(len); if (data == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; - tqError("failed to copy data for stream since out of memory"); + tqError("vgId:%d, failed to copy submit data for stream processing, since out of memory", vgId); return -1; } @@ -366,13 +351,6 @@ int32_t tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t v return 0; } -void recordPushedEntry(SArray* cachedKey, void* pIter) { - size_t kLen = 0; - void* key = taosHashGetKey(pIter, &kLen); - SItem item = {.pKey = strndup(key, kLen), .keyLen = kLen}; - taosArrayPush(cachedKey, &item); -} - int32_t tqRegisterPushEntry(STQ* pTq, void* pHandle, const SMqPollReq* pRequest, SRpcMsg* pRpcMsg, SMqDataRsp* pDataRsp, int32_t type) { uint64_t consumerId = pRequest->consumerId; @@ -430,3 +408,26 @@ int32_t tqUnregisterPushEntry(STQ* pTq, const char* pKey, int32_t keyLen, uint64 return 0; } + +void recordPushedEntry(SArray* cachedKey, void* pIter) { + size_t kLen = 0; + void* key = taosHashGetKey(pIter, &kLen); + SItem item = {.pKey = strndup(key, kLen), .keyLen = kLen}; + taosArrayPush(cachedKey, &item); +} + +void doRemovePushedEntry(SArray* pCachedKeys, STQ* pTq) { + int32_t vgId = TD_VID(pTq->pVnode); + int32_t numOfKeys = (int32_t) taosArrayGetSize(pCachedKeys); + + for (int32_t i = 0; i < numOfKeys; i++) { + SItem* pItem = taosArrayGet(pCachedKeys, i); + if (taosHashRemove(pTq->pPushMgr, pItem->pKey, pItem->keyLen) != 0) { + tqError("vgId:%d, tq push hash remove key error, key: %s", vgId, (char*) pItem->pKey); + } + } + + if (numOfKeys > 0) { + tqDebug("vgId:%d, pushed %d items and remain:%d", vgId, numOfKeys, (int32_t)taosHashGetSize(pTq->pPushMgr)); + } +} diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index 90ff1f8a84800eb7c1c857b35e48f3cd34359476..54e4e393ecff1c001fcd778005b0645b13f589c8 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -263,7 +263,7 @@ STqReader* tqOpenReader(SVnode* pVnode) { pReader->pVnodeMeta = pVnode->pMeta; /*pReader->pMsg = NULL;*/ - pReader->ver = -1; +// pReader->ver = -1; pReader->pColIdList = NULL; pReader->cachedSchemaVer = 0; pReader->cachedSchemaSuid = 0; @@ -290,41 +290,26 @@ void tqCloseReader(STqReader* pReader) { } // free hash taosHashCleanup(pReader->tbIdHash); + tDestroySSubmitReq2(&pReader->submit, TSDB_MSG_FLG_DECODE); taosMemoryFree(pReader); } int32_t tqSeekVer(STqReader* pReader, int64_t ver, const char* id) { - // todo set the correct vgId - tqDebug("tmq poll: wal seek to version:%"PRId64" %s", ver, id); if (walReadSeekVer(pReader->pWalReader, ver) < 0) { tqDebug("tmq poll: wal reader failed to seek to ver:%"PRId64" code:%s, %s", ver, tstrerror(terrno), id); return -1; - } else { - tqDebug("tmq poll: wal reader seek to ver:%"PRId64" %s", ver, id); - return 0; } + tqDebug("tmq poll: wal reader seek to ver:%"PRId64" %s", ver, id); + return 0; } -int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { - bool fromProcessedMsg = pReader->msg2.msgStr != NULL; - +void tqNextBlock(STqReader* pReader, SFetchRet* ret) { while (1) { - if (!fromProcessedMsg) { + if (pReader->msg2.msgStr == NULL) { if (walNextValidMsg(pReader->pWalReader) < 0) { -// pReader->ver = pReader->pWalReader->curVersion - pReader->pWalReader->curStopped; - if(pReader->pWalReader->curInvalid == 0){ - pReader->ver = pReader->pWalReader->curVersion - pReader->pWalReader->curStopped; - }else{ - pReader->ver = walGetLastVer(pReader->pWalReader->pWal); - } - ret->offset.type = TMQ_OFFSET__LOG; - - ret->offset.version = pReader->ver; ret->fetchType = FETCH_TYPE__NONE; - tqDebug("return offset %" PRId64 ", no more valid msg in wal", ret->offset.version); - return -1; + return; } - void* body = POINTER_SHIFT(pReader->pWalReader->pHead->head.body, sizeof(SSubmitReq2Msg)); int32_t bodyLen = pReader->pWalReader->pHead->head.bodyLen - sizeof(SSubmitReq2Msg); int64_t ver = pReader->pWalReader->pHead->head.version; @@ -333,109 +318,44 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { } while (tqNextDataBlock2(pReader)) { - // TODO mem free memset(&ret->data, 0, sizeof(SSDataBlock)); int32_t code = tqRetrieveDataBlock2(&ret->data, pReader, NULL); if (code != 0 || ret->data.info.rows == 0) { continue; } ret->fetchType = FETCH_TYPE__DATA; - tqDebug("return data rows %" PRId64, ret->data.info.rows); - return 0; - } - - if (fromProcessedMsg) { - ret->offset.type = TMQ_OFFSET__LOG; - ret->offset.version = pReader->ver; - ret->fetchType = FETCH_TYPE__SEP; - tqDebug("return offset %" PRId64 ", processed finish", ret->offset.version); - return 0; + return; } } } -#if 0 -int32_t tqReaderSetDataMsg(STqReader* pReader, const SSubmitReq* pMsg, int64_t ver) { - pReader->pMsg = pMsg; - -// if (tInitSubmitMsgIter(pMsg, &pReader->msgIter) < 0) return -1; -// while (true) { -// if (tGetSubmitMsgNext(&pReader->msgIter, &pReader->pBlock) < 0) return -1; -// tqDebug("submitnext vgId:%d, block:%p, dataLen:%d, len:%d, uid:%"PRId64, pWalReader->pWal->cfg.vgId, pReader->pBlock, pReader->msgIter.dataLen, -// pReader->msgIter.len, pReader->msgIter.uid); -// if (pReader->pBlock == NULL) break; -// } - - if (tInitSubmitMsgIter(pMsg, &pReader->msgIter) < 0) return -1; - pReader->ver = ver; - memset(&pReader->blkIter, 0, sizeof(SSubmitBlkIter)); - return 0; -} -#endif - int32_t tqReaderSetSubmitReq2(STqReader* pReader, void* msgStr, int32_t msgLen, int64_t ver) { - ASSERT(pReader->msg2.msgStr == NULL && msgStr && msgLen && (ver >= 0)); - pReader->msg2.msgStr = msgStr; pReader->msg2.msgLen = msgLen; pReader->msg2.ver = ver; - pReader->ver = ver; tqDebug("tq reader set msg %p %d", msgStr, msgLen); - - if (pReader->setMsg == 0) { - SDecoder decoder; - tDecoderInit(&decoder, pReader->msg2.msgStr, pReader->msg2.msgLen); - if (tDecodeSSubmitReq2(&decoder, &pReader->submit) < 0) { - ASSERT(0); - } + SDecoder decoder; + tDecoderInit(&decoder, pReader->msg2.msgStr, pReader->msg2.msgLen); + if (tDecodeSSubmitReq2(&decoder, &pReader->submit) < 0) { tDecoderClear(&decoder); - pReader->setMsg = 1; + tqError("DecodeSSubmitReq2 error, msgLen:%d, ver:%"PRId64, msgLen, ver); + return -1; } + tDecoderClear(&decoder); return 0; } -#if 0 -bool tqNextDataBlock(STqReader* pReader) { - if (pReader->pMsg == NULL) return false; - while (1) { - if (tGetSubmitMsgNext(&pReader->msgIter, &pReader->pBlock) < 0) { - return false; - } - if (pReader->pBlock == NULL) { - pReader->pMsg = NULL; - return false; - } - - if (pReader->tbIdHash == NULL) { - return true; - } - void* ret = taosHashGet(pReader->tbIdHash, &pReader->msgIter.uid, sizeof(int64_t)); - /*tqDebug("search uid %" PRId64, pHandle->msgIter.uid);*/ - if (ret != NULL) { - /*tqDebug("find uid %" PRId64, pHandle->msgIter.uid);*/ - return true; - } - } - return false; -} -#endif - bool tqNextDataBlock2(STqReader* pReader) { if (pReader->msg2.msgStr == NULL) { return false; } - ASSERT(pReader->setMsg == 1); - - tqDebug("tq reader next data block %p, %d %" PRId64 " %d", pReader->msg2.msgStr, pReader->msg2.msgLen, - pReader->msg2.ver, pReader->nextBlk); - int32_t blockSz = taosArrayGetSize(pReader->submit.aSubmitTbData); while (pReader->nextBlk < blockSz) { + tqDebug("tq reader next data block %p, %d %" PRId64 " %d", pReader->msg2.msgStr, pReader->msg2.msgLen, + pReader->msg2.ver, pReader->nextBlk); SSubmitTbData* pSubmitTbData = taosArrayGet(pReader->submit.aSubmitTbData, pReader->nextBlk); - ASSERT(pSubmitTbData->uid); - if (pReader->tbIdHash == NULL) return true; void* ret = taosHashGet(pReader->tbIdHash, &pSubmitTbData->uid, sizeof(int64_t)); @@ -446,7 +366,6 @@ bool tqNextDataBlock2(STqReader* pReader) { } tDestroySSubmitReq2(&pReader->submit, TSDB_MSG_FLG_DECODE); - pReader->setMsg = 0; pReader->nextBlk = 0; pReader->msg2.msgStr = NULL; @@ -455,7 +374,6 @@ bool tqNextDataBlock2(STqReader* pReader) { bool tqNextDataBlockFilterOut2(STqReader* pReader, SHashObj* filterOutUids) { if (pReader->msg2.msgStr == NULL) return false; - ASSERT(pReader->setMsg == 1); int32_t blockSz = taosArrayGetSize(pReader->submit.aSubmitTbData); while (pReader->nextBlk < blockSz) { @@ -470,7 +388,6 @@ bool tqNextDataBlockFilterOut2(STqReader* pReader, SHashObj* filterOutUids) { } tDestroySSubmitReq2(&pReader->submit, TSDB_MSG_FLG_DECODE); - pReader->setMsg = 0; pReader->nextBlk = 0; pReader->msg2.msgStr = NULL; @@ -506,63 +423,8 @@ int32_t tqMaskBlock(SSchemaWrapper* pDst, SSDataBlock* pBlock, const SSchemaWrap return 0; } -#if 0 -bool tqNextDataBlockFilterOut(STqReader* pHandle, SHashObj* filterOutUids) { - while (1) { - if (tGetSubmitMsgNext(&pHandle->msgIter, &pHandle->pBlock) < 0) { - return false; - } - if (pHandle->pBlock == NULL) return false; - - void* ret = taosHashGet(filterOutUids, &pHandle->msgIter.uid, sizeof(int64_t)); - if (ret == NULL) { - return true; - } - } - return false; -} - -int32_t tqScanSubmitSplit(SArray* pBlocks, SArray* schemas, STqReader* pReader) { - // - int32_t sversion = htonl(pReader->pBlock->sversion); - if (pReader->cachedSchemaSuid == 0 || pReader->cachedSchemaVer != sversion || - pReader->cachedSchemaSuid != pReader->msgIter.suid) { - taosMemoryFree(pReader->pSchema); - pReader->pSchema = metaGetTbTSchema(pReader->pVnodeMeta, pReader->msgIter.uid, sversion, 1); - if (pReader->pSchema == NULL) { - tqWarn("vgId:%d, cannot found tsschema for table: uid:%" PRId64 " (suid:%" PRId64 - "), version %d, possibly dropped table", - pWalReader->pWal->cfg.vgId, pReader->msgIter.uid, pReader->msgIter.suid, sversion); - pReader->cachedSchemaSuid = 0; - terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; - return -1; - } - - tDeleteSSchemaWrapper(pReader->pSchemaWrapper); - pReader->pSchemaWrapper = metaGetTableSchema(pReader->pVnodeMeta, pReader->msgIter.uid, sversion, 1); - if (pReader->pSchemaWrapper == NULL) { - tqWarn("vgId:%d, cannot found schema wrapper for table: suid:%" PRId64 ", version %d, possibly dropped table", - pWalReader->pWal->cfg.vgId, pReader->msgIter.uid, pReader->cachedSchemaVer); - pReader->cachedSchemaSuid = 0; - terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; - return -1; - } - - STSchema* pTschema = pReader->pSchema; - SSchemaWrapper* pSchemaWrapper = pReader->pSchemaWrapper; - - int32_t colNumNeed = taosArrayGetSize(pReader->pColIdList); - } - return 0; -} -#endif - int32_t tqRetrieveDataBlock2(SSDataBlock* pBlock, STqReader* pReader, SSubmitTbData** pSubmitTbDataRet) { - int32_t blockSz = taosArrayGetSize(pReader->submit.aSubmitTbData); - ASSERT(pReader->nextBlk < blockSz); - - tqDebug("tq reader retrieve data block %p, %d", pReader->msg2.msgStr, pReader->nextBlk); - + tqDebug("tq reader retrieve data block %p, index:%d", pReader->msg2.msgStr, pReader->nextBlk); SSubmitTbData* pSubmitTbData = taosArrayGet(pReader->submit.aSubmitTbData, pReader->nextBlk); pReader->nextBlk++; @@ -666,33 +528,27 @@ int32_t tqRetrieveDataBlock2(SSDataBlock* pBlock, STqReader* pReader, SSubmitTbD int32_t targetIdx = 0; int32_t sourceIdx = 0; while (targetIdx < colActual) { - ASSERT(sourceIdx < numOfCols); - + if(sourceIdx >= numOfCols){ + tqError("tqRetrieveDataBlock2 sourceIdx:%d >= numOfCols:%d", sourceIdx, numOfCols); + goto FAIL; + } SColData* pCol = taosArrayGet(pCols, sourceIdx); SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, targetIdx); SColVal colVal; - ASSERT(pCol->nVal == numOfRows); + if(pCol->nVal != numOfRows){ + tqError("tqRetrieveDataBlock2 pCol->nVal:%d != numOfRows:%d", pCol->nVal, numOfRows); + goto FAIL; + } if (pCol->cid < pColData->info.colId) { sourceIdx++; } else if (pCol->cid == pColData->info.colId) { for (int32_t i = 0; i < pCol->nVal; i++) { tColDataGetValue(pCol, i, &colVal); -#if 0 - void* val = NULL; - if (IS_STR_DATA_TYPE(colVal.type)) { - val = colVal.value.pData; - } else { - val = &colVal.value.val; - } - if (colDataAppend(pColData, i, val, !COL_VAL_IS_VALUE(&colVal)) < 0) { - goto FAIL; - } -#endif if (IS_STR_DATA_TYPE(colVal.type)) { if (colVal.value.pData != NULL) { - char val[65535 + 2]; + char val[65535 + 2] = {0}; memcpy(varDataVal(val), colVal.value.pData, colVal.value.nData); varDataSetLen(val, colVal.value.nData); if (colDataAppend(pColData, i, val, !COL_VAL_IS_VALUE(&colVal)) < 0) { @@ -726,8 +582,6 @@ int32_t tqRetrieveDataBlock2(SSDataBlock* pBlock, STqReader* pReader, SSubmitTbD for (int32_t j = 0; j < colActual; j++) { SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, j); while (1) { - ASSERT(sourceIdx < pTschema->numOfCols); - SColVal colVal; tRowGet(pRow, pTschema, sourceIdx, &colVal); if (colVal.cid < pColData->info.colId) { @@ -736,7 +590,7 @@ int32_t tqRetrieveDataBlock2(SSDataBlock* pBlock, STqReader* pReader, SSubmitTbD } else if (colVal.cid == pColData->info.colId) { if (IS_STR_DATA_TYPE(colVal.type)) { if (colVal.value.pData != NULL) { - char val[65535 + 2]; + char val[65535 + 2] = {0}; memcpy(varDataVal(val), colVal.value.pData, colVal.value.nData); varDataSetLen(val, colVal.value.nData); if (colDataAppend(pColData, i, val, !COL_VAL_IS_VALUE(&colVal)) < 0) { @@ -745,7 +599,6 @@ int32_t tqRetrieveDataBlock2(SSDataBlock* pBlock, STqReader* pReader, SSubmitTbD } else { colDataSetNULL(pColData, i); } - /*val = colVal.value.pData;*/ } else { if (colDataAppend(pColData, i, (void*)&colVal.value.val, !COL_VAL_IS_VALUE(&colVal)) < 0) { goto FAIL; @@ -771,253 +624,6 @@ FAIL: return -1; } -#if 0 -int32_t tqRetrieveDataBlock(SSDataBlock* pBlock, STqReader* pReader) { - // TODO: cache multiple schema - int32_t sversion = htonl(pReader->pBlock->sversion); - if (pReader->cachedSchemaSuid == 0 || pReader->cachedSchemaVer != sversion || - pReader->cachedSchemaSuid != pReader->msgIter.suid) { - if (pReader->pSchema) taosMemoryFree(pReader->pSchema); - pReader->pSchema = metaGetTbTSchema(pReader->pVnodeMeta, pReader->msgIter.uid, sversion, 1); - if (pReader->pSchema == NULL) { - tqWarn("cannot found tsschema for table: uid:%" PRId64 " (suid:%" PRId64 "), version %d, possibly dropped table", - pReader->msgIter.uid, pReader->msgIter.suid, pReader->cachedSchemaVer); - pReader->cachedSchemaSuid = 0; - terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; - return -1; - } - - if (pReader->pSchemaWrapper) tDeleteSSchemaWrapper(pReader->pSchemaWrapper); - pReader->pSchemaWrapper = metaGetTableSchema(pReader->pVnodeMeta, pReader->msgIter.uid, sversion, 1); - if (pReader->pSchemaWrapper == NULL) { - tqWarn("cannot found schema wrapper for table: suid:%" PRId64 ", version %d, possibly dropped table", - pReader->msgIter.uid, pReader->cachedSchemaVer); - pReader->cachedSchemaSuid = 0; - terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; - return -1; - } - pReader->cachedSchemaVer = sversion; - pReader->cachedSchemaSuid = pReader->msgIter.suid; - } - - STSchema* pTschema = pReader->pSchema; - SSchemaWrapper* pSchemaWrapper = pReader->pSchemaWrapper; - - int32_t colNumNeed = taosArrayGetSize(pReader->pColIdList); - - if (colNumNeed == 0) { - int32_t colMeta = 0; - while (colMeta < pSchemaWrapper->nCols) { - SSchema* pColSchema = &pSchemaWrapper->pSchema[colMeta]; - SColumnInfoData colInfo = createColumnInfoData(pColSchema->type, pColSchema->bytes, pColSchema->colId); - int32_t code = blockDataAppendColInfo(pBlock, &colInfo); - if (code != TSDB_CODE_SUCCESS) { - goto FAIL; - } - colMeta++; - } - } else { - if (colNumNeed > pSchemaWrapper->nCols) { - colNumNeed = pSchemaWrapper->nCols; - } - - int32_t colMeta = 0; - int32_t colNeed = 0; - while (colMeta < pSchemaWrapper->nCols && colNeed < colNumNeed) { - SSchema* pColSchema = &pSchemaWrapper->pSchema[colMeta]; - col_id_t colIdSchema = pColSchema->colId; - col_id_t colIdNeed = *(col_id_t*)taosArrayGet(pReader->pColIdList, colNeed); - if (colIdSchema < colIdNeed) { - colMeta++; - } else if (colIdSchema > colIdNeed) { - colNeed++; - } else { - SColumnInfoData colInfo = createColumnInfoData(pColSchema->type, pColSchema->bytes, pColSchema->colId); - int32_t code = blockDataAppendColInfo(pBlock, &colInfo); - if (code != TSDB_CODE_SUCCESS) { - goto FAIL; - } - colMeta++; - colNeed++; - } - } - } - - if (blockDataEnsureCapacity(pBlock, pReader->msgIter.numOfRows) < 0) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - goto FAIL; - } - - int32_t colActual = blockDataGetNumOfCols(pBlock); - - STSRowIter iter = {0}; - tdSTSRowIterInit(&iter, pTschema); - STSRow* row; - int32_t curRow = 0; - - tInitSubmitBlkIter(&pReader->msgIter, pReader->pBlock, &pReader->blkIter); - - pBlock->info.id.uid = pReader->msgIter.uid; - pBlock->info.rows = pReader->msgIter.numOfRows; - pBlock->info.version = pReader->pMsg->version; - pBlock->info.dataLoad = 1; - - while ((row = tGetSubmitBlkNext(&pReader->blkIter)) != NULL) { - tdSTSRowIterReset(&iter, row); - // get all wanted col of that block - for (int32_t i = 0; i < colActual; i++) { - SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, i); - SCellVal sVal = {0}; - if (!tdSTSRowIterFetch(&iter, pColData->info.colId, pColData->info.type, &sVal)) { - break; - } - if (colDataSetVal(pColData, curRow, sVal.val, sVal.valType != TD_VTYPE_NORM) < 0) { - goto FAIL; - } - } - curRow++; - } - return 0; - -FAIL: - blockDataFreeRes(pBlock); - return -1; -} - -int32_t tqRetrieveTaosxBlock(STqReader* pReader, SArray* blocks, SArray* schemas) { - int32_t sversion = htonl(pReader->pBlock->sversion); - - if (pReader->cachedSchemaSuid == 0 || pReader->cachedSchemaVer != sversion || - pReader->cachedSchemaSuid != pReader->msgIter.suid) { - if (pReader->pSchema) taosMemoryFree(pReader->pSchema); - pReader->pSchema = metaGetTbTSchema(pReader->pVnodeMeta, pReader->msgIter.uid, sversion, 1); - if (pReader->pSchema == NULL) { - tqWarn("cannot found tsschema for table: uid:%" PRId64 " (suid:%" PRId64 "), version %d, possibly dropped table", - pReader->msgIter.uid, pReader->msgIter.suid, pReader->cachedSchemaVer); - pReader->cachedSchemaSuid = 0; - terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; - return -1; - } - - if (pReader->pSchemaWrapper) tDeleteSSchemaWrapper(pReader->pSchemaWrapper); - pReader->pSchemaWrapper = metaGetTableSchema(pReader->pVnodeMeta, pReader->msgIter.uid, sversion, 1); - if (pReader->pSchemaWrapper == NULL) { - tqWarn("cannot found schema wrapper for table: suid:%" PRId64 ", version %d, possibly dropped table", - pReader->msgIter.uid, pReader->cachedSchemaVer); - pReader->cachedSchemaSuid = 0; - terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; - return -1; - } - pReader->cachedSchemaVer = sversion; - pReader->cachedSchemaSuid = pReader->msgIter.suid; - } - - STSchema* pTschema = pReader->pSchema; - SSchemaWrapper* pSchemaWrapper = pReader->pSchemaWrapper; - - int32_t colAtMost = pSchemaWrapper->nCols; - - int32_t curRow = 0; - int32_t lastRow = 0; - - char* assigned = taosMemoryCalloc(1, pSchemaWrapper->nCols); - if (assigned == NULL) return -1; - - tInitSubmitBlkIter(&pReader->msgIter, pReader->pBlock, &pReader->blkIter); - STSRowIter iter = {0}; - tdSTSRowIterInit(&iter, pTschema); - STSRow* row; - - while ((row = tGetSubmitBlkNext(&pReader->blkIter)) != NULL) { - bool buildNew = false; - tdSTSRowIterReset(&iter, row); - - tqDebug("vgId:%d, row of block %d", pReader->pWalReader->pWal->cfg.vgId, curRow); - for (int32_t i = 0; i < colAtMost; i++) { - SCellVal sVal = {0}; - if (!tdSTSRowIterFetch(&iter, pSchemaWrapper->pSchema[i].colId, pSchemaWrapper->pSchema[i].type, &sVal)) { - break; - } - tqDebug("vgId:%d, %d col, type %d", pReader->pWalReader->pWal->cfg.vgId, i, sVal.valType); - if (curRow == 0) { - assigned[i] = sVal.valType != TD_VTYPE_NONE; - buildNew = true; - } else { - bool currentRowAssigned = sVal.valType != TD_VTYPE_NONE; - if (currentRowAssigned != assigned[i]) { - assigned[i] = currentRowAssigned; - buildNew = true; - } - } - } - - if (buildNew) { - if (taosArrayGetSize(blocks) > 0) { - SSDataBlock* pLastBlock = taosArrayGetLast(blocks); - pLastBlock->info.rows = curRow - lastRow; - lastRow = curRow; - } - SSDataBlock* pBlock = createDataBlock(); - SSchemaWrapper* pSW = taosMemoryCalloc(1, sizeof(SSchemaWrapper)); - if (tqMaskBlock(pSW, pBlock, pSchemaWrapper, assigned) < 0) { - blockDataDestroy(pBlock); - goto FAIL; - } - SSDataBlock block = {0}; - assignOneDataBlock(&block, pBlock); - blockDataDestroy(pBlock); - - tqDebug("vgId:%d, build new block, col %d", pReader->pWalReader->pWal->cfg.vgId, - (int32_t)taosArrayGetSize(block.pDataBlock)); - - taosArrayPush(blocks, &block); - taosArrayPush(schemas, &pSW); - } - - SSDataBlock* pBlock = taosArrayGetLast(blocks); - pBlock->info.id.uid = pReader->msgIter.uid; - pBlock->info.rows = 0; - pBlock->info.version = pReader->pMsg->version; - - tqDebug("vgId:%d, taosx scan, block num: %d", pReader->pWalReader->pWal->cfg.vgId, - (int32_t)taosArrayGetSize(blocks)); - - if (blockDataEnsureCapacity(pBlock, pReader->msgIter.numOfRows - curRow) < 0) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - goto FAIL; - } - - tdSTSRowIterReset(&iter, row); - for (int32_t i = 0; i < taosArrayGetSize(pBlock->pDataBlock); i++) { - SColumnInfoData* pColData = taosArrayGet(pBlock->pDataBlock, i); - SCellVal sVal = {0}; - - if (!tdSTSRowIterFetch(&iter, pColData->info.colId, pColData->info.type, &sVal)) { - break; - } - - ASSERT(sVal.valType != TD_VTYPE_NONE); - - if (colDataSetVal(pColData, curRow, sVal.val, sVal.valType == TD_VTYPE_NULL) < 0) { - goto FAIL; - } - tqDebug("vgId:%d, row %d col %d append %d", pReader->pWalReader->pWal->cfg.vgId, curRow, i, - sVal.valType == TD_VTYPE_NULL); - } - curRow++; - } - SSDataBlock* pLastBlock = taosArrayGetLast(blocks); - pLastBlock->info.rows = curRow - lastRow; - - taosMemoryFree(assigned); - return 0; - -FAIL: - taosMemoryFree(assigned); - return -1; -} -#endif - int32_t tqRetrieveTaosxBlock2(STqReader* pReader, SArray* blocks, SArray* schemas, SSubmitTbData** pSubmitTbDataRet) { tqDebug("tq reader retrieve data block %p, %d", pReader->msg2.msgStr, pReader->nextBlk); diff --git a/source/dnode/vnode/src/tq/tqScan.c b/source/dnode/vnode/src/tq/tqScan.c index c097cac015d4293cc9aa6aeeaeca80ced84cec84..b4e50312fd059bbbf6260fa5b6b1cff90209634c 100644 --- a/source/dnode/vnode/src/tq/tqScan.c +++ b/source/dnode/vnode/src/tq/tqScan.c @@ -71,37 +71,25 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs int32_t totalRows = 0; const STqExecHandle* pExec = &pHandle->execHandle; - qTaskInfo_t task = pExec->task; + qTaskInfo_t task = pExec->task; if (qStreamPrepareScan(task, pOffset, pHandle->execHandle.subType) < 0) { - tqDebug("prepare scan failed, vgId:%d, consumer:0x%"PRIx64, vgId, pHandle->consumerId); - if (pOffset->type == TMQ_OFFSET__LOG) { - pRsp->rspOffset = *pOffset; - return code; - } else { - tqOffsetResetToLog(pOffset, pHandle->snapshotVer); - if (qStreamPrepareScan(task, pOffset, pHandle->execHandle.subType) < 0) { - tqDebug("prepare scan failed, vgId:%d, consumer:0x%"PRIx64, vgId, pHandle->consumerId); - pRsp->rspOffset = *pOffset; - return code; - } - } + tqError("prepare scan failed, return"); + return -1; } while (1) { SSDataBlock* pDataBlock = NULL; uint64_t ts = 0; - - tqDebug("vgId:%d, tmq task start to execute, consumer:0x%"PRIx64, vgId, pHandle->consumerId); - - code = qExecTask(task, &pDataBlock, &ts); - if (code != TSDB_CODE_SUCCESS) { - tqError("vgId:%d, task exec error since %s, consumer:0x%" PRIx64, vgId, terrstr(), - pHandle->consumerId); - return code; + qStreamSetOpen(task); + tqDebug("consumer:0x%"PRIx64" vgId:%d, tmq one task start execute", pHandle->consumerId, vgId); + if (qExecTask(task, &pDataBlock, &ts) != TSDB_CODE_SUCCESS) { + tqError("consumer:0x%"PRIx64" vgId:%d, task exec error since %s", pHandle->consumerId, vgId, terrstr()); + return -1; } - // current scan should be stopped ASAP, since the re-balance occurs. + tqDebug("consumer:0x%"PRIx64" vgId:%d tmq one task end executed, pDataBlock:%p", pHandle->consumerId, vgId, pDataBlock); + // current scan should be stopped asap, since the rebalance occurs. if (pDataBlock == NULL) { break; } @@ -113,37 +101,15 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs } pRsp->blockNum++; - - tqDebug("vgId:%d, consumer:0x%" PRIx64 " tmq task executed, rows:%" PRId64 ", total blocks:%d", vgId, pHandle->consumerId, - pDataBlock->info.rows, pRsp->blockNum); - - if (pOffset->type == TMQ_OFFSET__SNAPSHOT_DATA) { - totalRows += pDataBlock->info.rows; - if (totalRows >= MAX_ROWS_TO_RETURN) { - break; - } + totalRows += pDataBlock->info.rows; + if (totalRows >= MAX_ROWS_TO_RETURN) { + break; } } + tqDebug("consumer:0x%"PRIx64" vgId:%d tmq task executed finished, total blocks:%d, totalRows:%d", pHandle->consumerId, vgId, pRsp->blockNum, totalRows); qStreamExtractOffset(task, &pRsp->rspOffset); - - if (pRsp->rspOffset.type == 0) { - code = TSDB_CODE_INVALID_PARA; - tqError("vgId:%d, expected rsp offset: type %d %" PRId64 " %" PRId64 " %" PRId64, vgId, pRsp->rspOffset.type, - pRsp->rspOffset.ts, pRsp->rspOffset.uid, pRsp->rspOffset.version); - return code; - } - - if (pRsp->withTbName || pRsp->withSchema) { - code = TSDB_CODE_INVALID_PARA; - tqError("vgId:%d, get column should not with meta:%d,%d", vgId, pRsp->withTbName, pRsp->withSchema); - return code; - } - - tqDebug("vgId:%d, consumer:0x%" PRIx64 " tmq task executed, total blocks:%d, rows:%d", vgId, pHandle->consumerId, - pRsp->blockNum, totalRows); - - return code; + return 0; } int32_t tqScanTaosx(STQ* pTq, const STqHandle* pHandle, STaosxRsp* pRsp, SMqMetaRsp* pMetaRsp, STqOffsetVal* pOffset) { @@ -151,18 +117,8 @@ int32_t tqScanTaosx(STQ* pTq, const STqHandle* pHandle, STaosxRsp* pRsp, SMqMeta qTaskInfo_t task = pExec->task; if (qStreamPrepareScan(task, pOffset, pHandle->execHandle.subType) < 0) { - tqDebug("prepare scan failed, return"); - if (pOffset->type == TMQ_OFFSET__LOG) { - pRsp->rspOffset = *pOffset; - return 0; - } else { - tqOffsetResetToLog(pOffset, pHandle->snapshotVer); - if (qStreamPrepareScan(task, pOffset, pHandle->execHandle.subType) < 0) { - tqDebug("prepare scan failed, return"); - pRsp->rspOffset = *pOffset; - return 0; - } - } + tqDebug("tqScanTaosx prepare scan failed, return"); + return -1; } int32_t rowCnt = 0; @@ -208,42 +164,31 @@ int32_t tqScanTaosx(STQ* pTq, const STqHandle* pHandle, STaosxRsp* pRsp, SMqMeta } } - if (pDataBlock == NULL && pOffset->type == TMQ_OFFSET__SNAPSHOT_DATA) { - if (qStreamExtractPrepareUid(task) != 0) { + // get meta + SMqMetaRsp* tmp = qStreamExtractMetaMsg(task); + if (tmp->metaRspLen > 0) { + qStreamExtractOffset(task, &tmp->rspOffset); + *pMetaRsp = *tmp; + + tqDebug("tmqsnap task get data"); + break; + } + + if (pDataBlock == NULL) { + qStreamExtractOffset(task, pOffset); + if (pOffset->type == TMQ_OFFSET__SNAPSHOT_DATA) { continue; } - tqDebug("tmqsnap vgId: %d, tsdb consume over, switch to wal, ver %" PRId64, TD_VID(pTq->pVnode), - pHandle->snapshotVer + 1); + tqDebug("tmqsnap vgId: %d, tsdb consume over, switch to wal, ver %" PRId64, TD_VID(pTq->pVnode), pHandle->snapshotVer + 1); + qStreamExtractOffset(task, &pRsp->rspOffset); break; } if (pRsp->blockNum > 0) { tqDebug("tmqsnap task exec exited, get data"); + qStreamExtractOffset(task, &pRsp->rspOffset); break; } - - SMqMetaRsp* tmp = qStreamExtractMetaMsg(task); - if (tmp->rspOffset.type == TMQ_OFFSET__SNAPSHOT_DATA) { - tqOffsetResetToData(pOffset, tmp->rspOffset.uid, tmp->rspOffset.ts); - qStreamPrepareScan(task, pOffset, pHandle->execHandle.subType); - tmp->rspOffset.type = TMQ_OFFSET__SNAPSHOT_META; - tqDebug("tmqsnap task exec change to get data"); - continue; - } - - *pMetaRsp = *tmp; - tqDebug("tmqsnap task exec exited, get meta"); - - tqDebug("task exec exited"); - break; - } - - qStreamExtractOffset(task, &pRsp->rspOffset); - - if (pRsp->rspOffset.type == 0) { - tqError("expected rsp offset: type %d %" PRId64 " %" PRId64 " %" PRId64, pRsp->rspOffset.type, pRsp->rspOffset.ts, - pRsp->rspOffset.uid, pRsp->rspOffset.version); - return -1; } return 0; diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 718b5979a156dae1cb043d2dc1a27fca2801fbb3..3d2b032156d7fbdd98cde5eb5ba64ae595487e50 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -541,6 +541,7 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) { return vnodeGetBatchMeta(pVnode, pMsg); case TDMT_VND_TMQ_CONSUME: return tqProcessPollReq(pVnode->pTq, pMsg); + case TDMT_STREAM_TASK_RUN: return tqProcessTaskRunReq(pVnode->pTq, pMsg); #if 1 diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index a6353f722a7cabd3e4e97f962af0f05533d9b8e2..16433dc34e1d4ddac12513bc1121ff7e07a95c9e 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -128,10 +128,10 @@ enum { typedef struct { // TODO remove prepareStatus - STqOffsetVal prepareStatus; // for tmq - STqOffsetVal lastStatus; // for tmq +// STqOffsetVal prepareStatus; // for tmq + STqOffsetVal currentOffset; // for tmq SMqMetaRsp metaRsp; // for tmq fetching meta - int8_t returned; +// int8_t returned; int64_t snapshotVer; // const SSubmitReq* pReq; @@ -191,7 +191,7 @@ enum { OP_OPENED = 0x1, OP_RES_TO_RETURN = 0x5, OP_EXEC_DONE = 0x9, - OP_EXEC_RECV = 0x11, +// OP_EXEC_RECV = 0x11, }; typedef struct SOperatorFpSet { @@ -502,32 +502,12 @@ typedef struct STableCountScanSupp { char stbNameFilter[TSDB_TABLE_NAME_LEN]; } STableCountScanSupp; -typedef struct STableCountScanOperatorInfo { - SReadHandle readHandle; - SSDataBlock* pRes; - - STableCountScanSupp supp; - - int32_t currGrpIdx; - SArray* stbUidList; // when group by db_name and/or stable_name -} STableCountScanOperatorInfo; - typedef struct SOptrBasicInfo { SResultRowInfo resultRowInfo; SSDataBlock* pRes; bool mergeResultBlock; } SOptrBasicInfo; -typedef struct SAggOperatorInfo { - SOptrBasicInfo binfo; - SAggSupporter aggSup; - STableQueryInfo* current; - uint64_t groupId; - SGroupResInfo groupResInfo; - SExprSupp scalarExprSup; - bool groupKeyOptimized; -} SAggOperatorInfo; - typedef struct SIntervalAggOperatorInfo { SOptrBasicInfo binfo; // basic info SAggSupporter aggSup; // aggregate supporter @@ -852,7 +832,7 @@ SArray* getTableListInfo(const SExecTaskInfo* pTaskInfo); int32_t createExecTaskInfo(SSubplan* pPlan, SExecTaskInfo** pTaskInfo, SReadHandle* pHandle, uint64_t taskId, int32_t vgId, char* sql, EOPTR_EXEC_MODEL model); -int32_t createDataSinkParam(SDataSinkNode* pNode, void** pParam, STableListInfo* pTableListInfo, SReadHandle* readHandle); +int32_t createDataSinkParam(SDataSinkNode* pNode, void** pParam, SExecTaskInfo* pTask, SReadHandle* readHandle); int32_t getOperatorExplainExecInfo(SOperatorInfo* operatorInfo, SArray* pExecInfoList); STimeWindow getActiveTimeWindow(SDiskbasedBuf* pBuf, SResultRowInfo* pResultRowInfo, int64_t ts, SInterval* pInterval, diff --git a/source/libs/executor/src/aggregateoperator.c b/source/libs/executor/src/aggregateoperator.c index a26e3ace7b5a715cd3bcdda315ae9587c2d033cd..d5fc507b941ac4ca59cb5f5e47c12e3ed626e909 100644 --- a/source/libs/executor/src/aggregateoperator.c +++ b/source/libs/executor/src/aggregateoperator.c @@ -40,6 +40,16 @@ typedef struct { int32_t startOffset; } SFunctionCtxStatus; +typedef struct SAggOperatorInfo { + SOptrBasicInfo binfo; + SAggSupporter aggSup; + STableQueryInfo* current; + uint64_t groupId; + SGroupResInfo groupResInfo; + SExprSupp scalarExprSup; + bool groupKeyOptimized; +} SAggOperatorInfo; + static void destroyAggOperatorInfo(void* param); static void setExecutionContext(SOperatorInfo* pOperator, int32_t numOfOutput, uint64_t groupId); diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index e1cd509cbae8cac31dabb0319e1a926737710101..b4431a7c3bad5fedde5aea69ba3163e5de8bd82c 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -127,12 +127,10 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu pOperator->status = OP_NOT_OPENED; SStreamScanInfo* pInfo = pOperator->info; - qDebug("stream set total blocks:%d, task id:%s" PRIx64, (int32_t)numOfBlocks, id); - ASSERT(pInfo->validBlockIndex == 0); - ASSERT(taosArrayGetSize(pInfo->pBlockLists) == 0); + qDebug("task stream set total blocks:%d %s", (int32_t)numOfBlocks, id); + ASSERT(pInfo->validBlockIndex == 0 && taosArrayGetSize(pInfo->pBlockLists) == 0); if (type == STREAM_INPUT__MERGED_SUBMIT) { - // ASSERT(numOfBlocks > 1); for (int32_t i = 0; i < numOfBlocks; i++) { SPackedData* pReq = POINTER_SHIFT(input, i * sizeof(SPackedData)); taosArrayPush(pInfo->pBlockLists, pReq); @@ -505,12 +503,7 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId, if (handle) { void* pSinkParam = NULL; - - SArray* pInfoList = getTableListInfo(*pTask); - STableListInfo* pTableListInfo = taosArrayGetP(pInfoList, 0); - taosArrayDestroy(pInfoList); - - code = createDataSinkParam(pSubplan->pDataSink, &pSinkParam, pTableListInfo, readHandle); + code = createDataSinkParam(pSubplan->pDataSink, &pSinkParam, (*pTask), readHandle); if (code != TSDB_CODE_SUCCESS) { qError("failed to createDataSinkParam, vgId:%d, code:%s, %s", vgId, tstrerror(code), (*pTask)->id.str); goto _error; @@ -1029,15 +1022,9 @@ SMqMetaRsp* qStreamExtractMetaMsg(qTaskInfo_t tinfo) { return &pTaskInfo->streamInfo.metaRsp; } -int64_t qStreamExtractPrepareUid(qTaskInfo_t tinfo) { +void qStreamExtractOffset(qTaskInfo_t tinfo, STqOffsetVal* pOffset) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - return pTaskInfo->streamInfo.prepareStatus.uid; -} - -int32_t qStreamExtractOffset(qTaskInfo_t tinfo, STqOffsetVal* pOffset) { - SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; - memcpy(pOffset, &pTaskInfo->streamInfo.lastStatus, sizeof(STqOffsetVal)); - return 0; + memcpy(pOffset, &pTaskInfo->streamInfo.currentOffset, sizeof(STqOffsetVal)); } int32_t initQueryTableDataCondForTmq(SQueryTableDataCond* pCond, SSnapContext* sContext, SMetaTableInfo* pMtInfo) { @@ -1083,33 +1070,38 @@ int32_t qStreamSetScanMemData(qTaskInfo_t tinfo, SPackedData submit) { return 0; } +void qStreamSetOpen(qTaskInfo_t tinfo) { + SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; + SOperatorInfo* pOperator = pTaskInfo->pRoot; + pOperator->status = OP_NOT_OPENED; +} + int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subType) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tinfo; SOperatorInfo* pOperator = pTaskInfo->pRoot; const char* id = GET_TASKID(pTaskInfo); - pTaskInfo->streamInfo.prepareStatus = *pOffset; - pTaskInfo->streamInfo.returned = 0; - - if (tOffsetEqual(pOffset, &pTaskInfo->streamInfo.lastStatus)) { + // if pOffset equal to current offset, means continue consume + if (tOffsetEqual(pOffset, &pTaskInfo->streamInfo.currentOffset)) { return 0; } if (subType == TOPIC_SUB_TYPE__COLUMN) { - pOperator->status = OP_OPENED; pOperator = extractOperatorInTree(pOperator, QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN, id); - + if (pOperator == NULL) { + return -1; + } SStreamScanInfo* pInfo = pOperator->info; STableScanInfo* pScanInfo = pInfo->pTableScanOp->info; STableScanBase* pScanBaseInfo = &pScanInfo->base; - STableListInfo* pTableListInfo = pScanBaseInfo->pTableListInfo; + STableListInfo* pTableListInfo = pScanBaseInfo->pTableListInfo; if (pOffset->type == TMQ_OFFSET__LOG) { tsdbReaderClose(pScanBaseInfo->dataReader); pScanBaseInfo->dataReader = NULL; // let's seek to the next version in wal file - if (tqSeekVer(pInfo->tqReader, pOffset->version + 1, pTaskInfo->id.str) < 0) { + if (tqSeekVer(pInfo->tqReader, pOffset->version + 1, id) < 0) { qError("tqSeekVer failed ver:%"PRId64", %s", pOffset->version + 1, id); return -1; } @@ -1137,6 +1129,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT } } + qDebug("switch to table uid:%" PRId64 " ts:%" PRId64 "% "PRId64 " rows returned", uid, ts, pInfo->pTableScanOp->resultInfo.totalRows); pInfo->pTableScanOp->resultInfo.totalRows = 0; // start from current accessed position @@ -1241,6 +1234,7 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT qDebug("tmqsnap qStreamPrepareScan snapshot log, %s", id); } } + pTaskInfo->streamInfo.currentOffset = *pOffset; return 0; } diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index c120c6055d171ae83023e3554dee95be259aafb7..11753c181c3bd33e618e50fcef726a0f0f53138a 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -1586,7 +1586,7 @@ int32_t extractTableScanNode(SPhysiNode* pNode, STableScanPhysiNode** ppNode) { return -1; } -int32_t createDataSinkParam(SDataSinkNode* pNode, void** pParam, STableListInfo* pTableListInfo, SReadHandle* readHandle) { +int32_t createDataSinkParam(SDataSinkNode* pNode, void** pParam, SExecTaskInfo* pTask, SReadHandle* readHandle) { switch (pNode->type) { case QUERY_NODE_PHYSICAL_PLAN_QUERY_INSERT: { SInserterParam* pInserterParam = taosMemoryCalloc(1, sizeof(SInserterParam)); @@ -1604,23 +1604,26 @@ int32_t createDataSinkParam(SDataSinkNode* pNode, void** pParam, STableListInfo* return TSDB_CODE_OUT_OF_MEMORY; } - int32_t tbNum = tableListGetSize(pTableListInfo); + SArray* pInfoList = getTableListInfo(pTask); + STableListInfo* pTableListInfo = taosArrayGetP(pInfoList, 0); + taosArrayDestroy(pInfoList); + pDeleterParam->suid = tableListGetSuid(pTableListInfo); // TODO extract uid list - pDeleterParam->pUidList = taosArrayInit(tbNum, sizeof(uint64_t)); + int32_t numOfTables = tableListGetSize(pTableListInfo); + pDeleterParam->pUidList = taosArrayInit(numOfTables, sizeof(uint64_t)); if (NULL == pDeleterParam->pUidList) { taosMemoryFree(pDeleterParam); return TSDB_CODE_OUT_OF_MEMORY; } - for (int32_t i = 0; i < tbNum; ++i) { + for (int32_t i = 0; i < numOfTables; ++i) { STableKeyInfo* pTable = tableListGetInfo(pTableListInfo, i); taosArrayPush(pDeleterParam->pUidList, &pTable->uid); } *pParam = pDeleterParam; - break; } default: @@ -1967,11 +1970,11 @@ void qStreamCloseTsdbReader(void* task) { SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)task; SOperatorInfo* pOp = pTaskInfo->pRoot; - qDebug("stream close tsdb reader, reset status uid:%" PRId64 " ts:%" PRId64, pTaskInfo->streamInfo.lastStatus.uid, - pTaskInfo->streamInfo.lastStatus.ts); + qDebug("stream close tsdb reader, reset status uid:%" PRId64 " ts:%" PRId64, pTaskInfo->streamInfo.currentOffset.uid, + pTaskInfo->streamInfo.currentOffset.ts); // todo refactor, other thread may already use this read to extract data. - pTaskInfo->streamInfo.lastStatus = (STqOffsetVal){0}; + pTaskInfo->streamInfo.currentOffset = (STqOffsetVal){0}; while (pOp->numOfDownstream == 1 && pOp->pDownstream[0]) { SOperatorInfo* pDownstreamOp = pOp->pDownstream[0]; if (pDownstreamOp->operatorType == QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN) { diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index c943270df9dff636b90c9e955b0030c49eb0a5a2..86c49e0fc82b76a595480e61b53167aab4b81f18 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -227,17 +227,8 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { blockDataCleanup(pFinalRes); SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; - if (pTaskInfo->streamInfo.submit.msgStr) { - pOperator->status = OP_OPENED; - } if (pOperator->status == OP_EXEC_DONE) { - if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) { - pOperator->status = OP_OPENED; - qDebug("projection in queue model, set status open and return null"); - return NULL; - } - return NULL; } @@ -263,23 +254,14 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) { // The downstream exec may change the value of the newgroup, so use a local variable instead. SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); if (pBlock == NULL) { - if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE && pFinalRes->info.rows == 0) { - pOperator->status = OP_OPENED; - if (pOperator->status == OP_EXEC_RECV) { - continue; - } else { - return NULL; - } - } - qDebug("set op close, exec %d, status %d rows %" PRId64 , pTaskInfo->execModel, pOperator->status, - pFinalRes->info.rows); + qDebug("set op close, exec %d, status %d rows %" PRId64 , pTaskInfo->execModel, pOperator->status, pFinalRes->info.rows); setOperatorCompleted(pOperator); break; } - if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) { - qDebug("set status recv"); - pOperator->status = OP_EXEC_RECV; - } +// if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) { +// qDebug("set status recv"); +// pOperator->status = OP_EXEC_RECV; +// } // for stream interval if (pBlock->info.type == STREAM_RETRIEVE || pBlock->info.type == STREAM_DELETE_RESULT || diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 1bfa8ccfc4b6f54797b11953879cbf057181c36a..29990f2d069a4ff6999d54c6d0b466991dc1660b 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -33,7 +33,6 @@ int32_t scanDebug = 0; - #define MULTI_READER_MAX_TABLE_NUM 5000 #define SET_REVERSE_SCAN_FLAG(_info) ((_info)->scanFlag = REVERSE_SCAN) #define SWITCH_ORDER(n) (((n) = ((n) == TSDB_ORDER_ASC) ? TSDB_ORDER_DESC : TSDB_ORDER_ASC)) @@ -52,6 +51,16 @@ typedef struct STableMergeScanSortSourceParam { STsdbReader* dataReader; } STableMergeScanSortSourceParam; +typedef struct STableCountScanOperatorInfo { + SReadHandle readHandle; + SSDataBlock* pRes; + + STableCountScanSupp supp; + + int32_t currGrpIdx; + SArray* stbUidList; // when group by db_name and/or stable_name +} STableCountScanOperatorInfo; + static bool processBlockWithProbability(const SSampleExecInfo* pInfo); bool processBlockWithProbability(const SSampleExecInfo* pInfo) { @@ -698,9 +707,9 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) { // todo refactor /*pTableScanInfo->lastStatus.uid = pBlock->info.id.uid;*/ /*pTableScanInfo->lastStatus.ts = pBlock->info.window.ekey;*/ - pTaskInfo->streamInfo.lastStatus.type = TMQ_OFFSET__SNAPSHOT_DATA; - pTaskInfo->streamInfo.lastStatus.uid = pBlock->info.id.uid; - pTaskInfo->streamInfo.lastStatus.ts = pBlock->info.window.ekey; +// pTaskInfo->streamInfo.lastStatus.type = TMQ_OFFSET__SNAPSHOT_DATA; +// pTaskInfo->streamInfo.lastStatus.uid = pBlock->info.id.uid; +// pTaskInfo->streamInfo.lastStatus.ts = pBlock->info.window.ekey; return pBlock; } @@ -890,9 +899,11 @@ static void destroyTableScanOperatorInfo(void* param) { SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode, SReadHandle* readHandle, STableListInfo* pTableListInfo, SExecTaskInfo* pTaskInfo) { + int32_t code = 0; STableScanInfo* pInfo = taosMemoryCalloc(1, sizeof(STableScanInfo)); SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); if (pInfo == NULL || pOperator == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; goto _error; } @@ -900,8 +911,7 @@ SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode, SDataBlockDescNode* pDescNode = pScanNode->node.pOutputDataBlockDesc; int32_t numOfCols = 0; - int32_t code = - extractColMatchInfo(pScanNode->pScanCols, pDescNode, &numOfCols, COL_MATCH_FROM_COL_ID, &pInfo->base.matchInfo); + code = extractColMatchInfo(pScanNode->pScanCols, pDescNode, &numOfCols, COL_MATCH_FROM_COL_ID, &pInfo->base.matchInfo); if (code != TSDB_CODE_SUCCESS) { goto _error; } @@ -1623,14 +1633,11 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { qDebug("start to exec queue scan, %s", id); if (pTaskInfo->streamInfo.submit.msgStr != NULL) { - if (pInfo->tqReader->msg2.msgStr == NULL) { SPackedData submit = pTaskInfo->streamInfo.submit; if (tqReaderSetSubmitReq2(pInfo->tqReader, submit.msgStr, submit.msgLen, submit.ver) < 0) { - qError("submit msg messed up when initing stream submit block %p, %s", submit.msgStr, id); - pInfo->tqReader->msg2 = (SPackedData){0}; - pInfo->tqReader->setMsg = 0; - ASSERT(0); + qError("submit msg messed up when initing stream submit block %p", submit.msgStr); + return NULL; } } @@ -1653,73 +1660,49 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) { } pInfo->tqReader->msg2 = (SPackedData){0}; - pInfo->tqReader->setMsg = 0; pTaskInfo->streamInfo.submit = (SPackedData){0}; return NULL; } - if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__SNAPSHOT_DATA) { + if (pTaskInfo->streamInfo.currentOffset.type == TMQ_OFFSET__SNAPSHOT_DATA) { SSDataBlock* pResult = doTableScan(pInfo->pTableScanOp); if (pResult && pResult->info.rows > 0) { - qDebug("queue scan tsdb return %" PRId64 " rows min:%" PRId64 " max:%" PRId64 " wal curVersion:%" PRId64" %s", pResult->info.rows, - pResult->info.window.skey, pResult->info.window.ekey, pInfo->tqReader->pWalReader->curVersion, id); - pTaskInfo->streamInfo.returned = 1; + qDebug("queue scan tsdb return %"PRId64" rows min:%" PRId64 " max:%" PRId64 " wal curVersion:%" PRId64, pResult->info.rows, + pResult->info.window.skey, pResult->info.window.ekey, pInfo->tqReader->pWalReader->curVersion); + tqOffsetResetToData(&pTaskInfo->streamInfo.currentOffset, pResult->info.id.uid, pResult->info.window.ekey); return pResult; - } else { - // no data has return already, try to extract data in the WAL - if (!pTaskInfo->streamInfo.returned) { - STableScanInfo* pTSInfo = pInfo->pTableScanOp->info; - tsdbReaderClose(pTSInfo->base.dataReader); - - pTSInfo->base.dataReader = NULL; - tqOffsetResetToLog(&pTaskInfo->streamInfo.prepareStatus, pTaskInfo->streamInfo.snapshotVer); - - qDebug("queue scan tsdb over, switch to wal ver:%" PRId64 " %s", pTaskInfo->streamInfo.snapshotVer + 1, id); - if (tqSeekVer(pInfo->tqReader, pTaskInfo->streamInfo.snapshotVer + 1, pTaskInfo->id.str) < 0) { - tqOffsetResetToLog(&pTaskInfo->streamInfo.lastStatus, pTaskInfo->streamInfo.snapshotVer); - return NULL; - } - } else { - return NULL; - } } + STableScanInfo* pTSInfo = pInfo->pTableScanOp->info; + tsdbReaderClose(pTSInfo->base.dataReader); + pTSInfo->base.dataReader = NULL; + qDebug("queue scan tsdb over, switch to wal ver %" PRId64 "", pTaskInfo->streamInfo.snapshotVer + 1); + if (tqSeekVer(pInfo->tqReader, pTaskInfo->streamInfo.snapshotVer + 1, pTaskInfo->id.str) < 0) { + return NULL; + } + tqOffsetResetToLog(&pTaskInfo->streamInfo.currentOffset, pTaskInfo->streamInfo.snapshotVer); } - if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__LOG) { + if (pTaskInfo->streamInfo.currentOffset.type == TMQ_OFFSET__LOG) { while (1) { SFetchRet ret = {0}; - terrno = 0; - - if (tqNextBlock(pInfo->tqReader, &ret) < 0) { - // if the end is reached, terrno is 0 - if (terrno != 0) { - qError("failed to get next log block since %s, %s", terrstr(), id); - } - } + tqNextBlock(pInfo->tqReader, &ret); + tqOffsetResetToLog(&pTaskInfo->streamInfo.currentOffset, pInfo->tqReader->pWalReader->curVersion - 1); //curVersion move to next, so currentOffset = curVersion - 1 if (ret.fetchType == FETCH_TYPE__DATA) { + qDebug("doQueueScan get data from log %"PRId64" rows, version:%" PRId64, ret.data.info.rows, pTaskInfo->streamInfo.currentOffset.version); blockDataCleanup(pInfo->pRes); setBlockIntoRes(pInfo, &ret.data, true); if (pInfo->pRes->info.rows > 0) { - pOperator->status = OP_EXEC_RECV; - qDebug("queue scan log return %" PRId64 " rows", pInfo->pRes->info.rows); + qDebug("doQueueScan get data from log %"PRId64" rows, return, version:%" PRId64, pInfo->pRes->info.rows, pTaskInfo->streamInfo.currentOffset.version); return pInfo->pRes; } - } else if (ret.fetchType == FETCH_TYPE__META) { - qError("unexpected ret.fetchType:%d", ret.fetchType); - continue; - } else if (ret.fetchType == FETCH_TYPE__NONE || - (ret.fetchType == FETCH_TYPE__SEP && pOperator->status == OP_EXEC_RECV)) { - pTaskInfo->streamInfo.lastStatus = ret.offset; - char formatBuf[80]; - tFormatOffset(formatBuf, 80, &ret.offset); - qDebug("queue scan log return null, offset %s", formatBuf); - pOperator->status = OP_OPENED; + }else if(ret.fetchType == FETCH_TYPE__NONE){ + qDebug("doQueueScan get none from log, return, version:%" PRId64, pTaskInfo->streamInfo.currentOffset.version); return NULL; } } } else { - qError("unexpected streamInfo prepare type: %d %s", pTaskInfo->streamInfo.prepareStatus.type, id); + qError("unexpected streamInfo prepare type: %d", pTaskInfo->streamInfo.currentOffset.type); return NULL; } } @@ -2074,7 +2057,6 @@ FETCH_NEXT_BLOCK: int32_t current = pInfo->validBlockIndex++; SPackedData* pSubmit = taosArrayGet(pInfo->pBlockLists, current); - /*if (tqReaderSetDataMsg(pInfo->tqReader, pSubmit, 0) < 0) {*/ if (tqReaderSetSubmitReq2(pInfo->tqReader, pSubmit->msgStr, pSubmit->msgLen, pSubmit->ver) < 0) { qError("submit msg messed up when initing stream submit block %p, current %d, total %d", pSubmit, current, totBlockNum); @@ -2166,7 +2148,7 @@ static SSDataBlock* doRawScan(SOperatorInfo* pOperator) { pTaskInfo->streamInfo.metaRsp.metaRsp = NULL; qDebug("tmqsnap doRawScan called"); - if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__SNAPSHOT_DATA) { + if (pTaskInfo->streamInfo.currentOffset.type == TMQ_OFFSET__SNAPSHOT_DATA) { bool hasNext = false; if (pInfo->dataReader) { code = tsdbNextDataBlock(pInfo->dataReader, &hasNext); @@ -2188,28 +2170,23 @@ static SSDataBlock* doRawScan(SOperatorInfo* pOperator) { } qDebug("tmqsnap doRawScan get data uid:%" PRId64 "", pBlock->info.id.uid); - pTaskInfo->streamInfo.lastStatus.type = TMQ_OFFSET__SNAPSHOT_DATA; - pTaskInfo->streamInfo.lastStatus.uid = pBlock->info.id.uid; - pTaskInfo->streamInfo.lastStatus.ts = pBlock->info.window.ekey; + tqOffsetResetToData(&pTaskInfo->streamInfo.currentOffset, pBlock->info.id.uid, pBlock->info.window.ekey); return pBlock; } SMetaTableInfo mtInfo = getUidfromSnapShot(pInfo->sContext); + STqOffsetVal offset = {0}; if (mtInfo.uid == 0) { // read snapshot done, change to get data from wal qDebug("tmqsnap read snapshot done, change to get data from wal"); - pTaskInfo->streamInfo.prepareStatus.uid = mtInfo.uid; - pTaskInfo->streamInfo.lastStatus.type = TMQ_OFFSET__LOG; - pTaskInfo->streamInfo.lastStatus.version = pInfo->sContext->snapVersion; + tqOffsetResetToLog(&offset, pInfo->sContext->snapVersion); } else { - pTaskInfo->streamInfo.prepareStatus.uid = mtInfo.uid; - pTaskInfo->streamInfo.prepareStatus.ts = INT64_MIN; + tqOffsetResetToData(&offset, mtInfo.uid, INT64_MIN); qDebug("tmqsnap change get data uid:%" PRId64 "", mtInfo.uid); - qStreamPrepareScan(pTaskInfo, &pTaskInfo->streamInfo.prepareStatus, pInfo->sContext->subType); } + qStreamPrepareScan(pTaskInfo, &offset, pInfo->sContext->subType); tDeleteSSchemaWrapper(mtInfo.schema); - qDebug("tmqsnap stream scan tsdb return null"); return NULL; - } else if (pTaskInfo->streamInfo.prepareStatus.type == TMQ_OFFSET__SNAPSHOT_META) { + } else if (pTaskInfo->streamInfo.currentOffset.type == TMQ_OFFSET__SNAPSHOT_META) { SSnapContext* sContext = pInfo->sContext; void* data = NULL; int32_t dataLen = 0; @@ -2221,16 +2198,12 @@ static SSDataBlock* doRawScan(SOperatorInfo* pOperator) { return NULL; } - if (!sContext->queryMetaOrData) { // change to get data next poll request - pTaskInfo->streamInfo.lastStatus.type = TMQ_OFFSET__SNAPSHOT_META; - pTaskInfo->streamInfo.lastStatus.uid = uid; - pTaskInfo->streamInfo.metaRsp.rspOffset.type = TMQ_OFFSET__SNAPSHOT_DATA; - pTaskInfo->streamInfo.metaRsp.rspOffset.uid = 0; - pTaskInfo->streamInfo.metaRsp.rspOffset.ts = INT64_MIN; + if (!sContext->queryMeta) { // change to get data next poll request + STqOffsetVal offset = {0}; + tqOffsetResetToData(&offset, 0, INT64_MIN); + qStreamPrepareScan(pTaskInfo, &offset, pInfo->sContext->subType); } else { - pTaskInfo->streamInfo.lastStatus.type = TMQ_OFFSET__SNAPSHOT_META; - pTaskInfo->streamInfo.lastStatus.uid = uid; - pTaskInfo->streamInfo.metaRsp.rspOffset = pTaskInfo->streamInfo.lastStatus; + tqOffsetResetToMeta(&pTaskInfo->streamInfo.currentOffset, uid); pTaskInfo->streamInfo.metaRsp.resMsgType = type; pTaskInfo->streamInfo.metaRsp.metaRspLen = dataLen; pTaskInfo->streamInfo.metaRsp.metaRsp = data; @@ -2444,7 +2417,6 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys if (pHandle->initTableReader) { pTSInfo->scanMode = TABLE_SCAN__TABLE_ORDER; pTSInfo->base.dataReader = NULL; - pTaskInfo->streamInfo.lastStatus.uid = -1; } if (pHandle->initTqReader) { diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 29acc1fea203d44b86ebd1a0867d4d041c09a2de..1a1fb6208d7a187f207c73c8fd5e53e8750bd52d 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -4758,6 +4758,7 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) { if (!pInfo->pUpdated) { pInfo->pUpdated = taosArrayInit(4, sizeof(SWinKey)); } + if (!pInfo->pUpdatedMap) { _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY); pInfo->pUpdatedMap = tSimpleHashInit(1024, hashFn); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 9fd8d5415ad5fdea65a50155f79352374a2d6045..301d3fb9826fe7fedf68f454fb75f4298b9deee6 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -330,7 +330,7 @@ column_def_list(A) ::= column_def(B). column_def_list(A) ::= column_def_list(B) NK_COMMA column_def(C). { A = addNodeToList(pCxt, B, C); } column_def(A) ::= column_name(B) type_name(C). { A = createColumnDefNode(pCxt, &B, C, NULL); } -column_def(A) ::= column_name(B) type_name(C) COMMENT NK_STRING(D). { A = createColumnDefNode(pCxt, &B, C, &D); } +//column_def(A) ::= column_name(B) type_name(C) COMMENT NK_STRING(D). { A = createColumnDefNode(pCxt, &B, C, &D); } %type type_name { SDataType } %destructor type_name { } diff --git a/source/libs/parser/src/parInsertUtil.c b/source/libs/parser/src/parInsertUtil.c index 132a3b26187a833b5eeb3bd23ab8642331478635..ac504b9809ad495175d54025d881853d0f443ca9 100644 --- a/source/libs/parser/src/parInsertUtil.c +++ b/source/libs/parser/src/parInsertUtil.c @@ -470,11 +470,11 @@ int32_t insMergeTableDataCxt(SHashObj* pTableHash, SArray** pVgDataBlocks) { if (TSDB_CODE_SUCCESS == code) { SVgroupDataCxt* pVgCxt = NULL; int32_t vgId = pTableCxt->pMeta->vgId; - void** p = taosHashGet(pVgroupHash, &vgId, sizeof(vgId)); - if (NULL == p) { + void** pp = taosHashGet(pVgroupHash, &vgId, sizeof(vgId)); + if (NULL == pp) { code = createVgroupDataCxt(pTableCxt, pVgroupHash, pVgroupList, &pVgCxt); } else { - pVgCxt = *(SVgroupDataCxt**)p; + pVgCxt = *(SVgroupDataCxt**)pp; } if (TSDB_CODE_SUCCESS == code) { code = fillVgroupDataCxt(pTableCxt, pVgCxt); diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 291d35ebe3abadfdcbee46cbcdaf1bc04f33fcbb..123aada8095660e64e681e864eabb58fe5324bc0 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 752 -#define YYNRULE 572 +#define YYNSTATE 750 +#define YYNRULE 571 #define YYNTOKEN 328 -#define YY_MAX_SHIFT 751 -#define YY_MIN_SHIFTREDUCE 1118 -#define YY_MAX_SHIFTREDUCE 1689 -#define YY_ERROR_ACTION 1690 -#define YY_ACCEPT_ACTION 1691 -#define YY_NO_ACTION 1692 -#define YY_MIN_REDUCE 1693 -#define YY_MAX_REDUCE 2264 +#define YY_MAX_SHIFT 749 +#define YY_MIN_SHIFTREDUCE 1116 +#define YY_MAX_SHIFTREDUCE 1686 +#define YY_ERROR_ACTION 1687 +#define YY_ACCEPT_ACTION 1688 +#define YY_NO_ACTION 1689 +#define YY_MIN_REDUCE 1690 +#define YY_MAX_REDUCE 2260 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -218,273 +218,273 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (2669) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1975, 1845, 387, 2076, 429, 604, 627, 2062, 141, 2235, - /* 10 */ 161, 2135, 45, 43, 1617, 1973, 628, 363, 2058, 1858, - /* 20 */ 384, 2062, 1466, 616, 603, 182, 1907, 2062, 496, 2236, - /* 30 */ 605, 2030, 2058, 1547, 492, 1464, 2094, 640, 2058, 44, - /* 40 */ 42, 41, 40, 39, 619, 1170, 332, 1169, 640, 2044, - /* 50 */ 1491, 657, 2054, 2060, 365, 506, 139, 1968, 1542, 1909, - /* 60 */ 222, 2240, 1909, 651, 18, 2235, 2054, 2060, 366, 349, - /* 70 */ 1691, 1472, 2054, 2060, 379, 1908, 1171, 651, 1907, 404, - /* 80 */ 2075, 2239, 176, 651, 2111, 2236, 2238, 109, 2077, 661, - /* 90 */ 2079, 2080, 656, 1151, 651, 166, 167, 748, 1705, 179, - /* 100 */ 14, 2164, 1801, 351, 1958, 378, 2160, 1491, 38, 37, + /* 0 */ 1971, 1842, 387, 2072, 429, 604, 627, 2058, 141, 2231, + /* 10 */ 161, 2131, 45, 43, 1614, 1969, 628, 363, 2054, 1855, + /* 20 */ 384, 2058, 1463, 616, 603, 182, 1903, 2058, 496, 2232, + /* 30 */ 605, 2026, 2054, 1544, 492, 1461, 2090, 640, 2054, 44, + /* 40 */ 42, 41, 40, 39, 619, 1168, 332, 1167, 640, 2040, + /* 50 */ 1488, 657, 2050, 2056, 365, 506, 139, 1964, 1539, 1905, + /* 60 */ 222, 2236, 1905, 651, 18, 2231, 2050, 2056, 366, 349, + /* 70 */ 1688, 1469, 2050, 2056, 379, 1904, 1169, 651, 1903, 404, + /* 80 */ 2071, 2235, 176, 651, 2107, 2232, 2234, 109, 2073, 661, + /* 90 */ 2075, 2076, 656, 1149, 651, 166, 1950, 746, 65, 179, + /* 100 */ 14, 2160, 1798, 351, 1954, 378, 2156, 190, 38, 37, /* 110 */ 45, 43, 44, 42, 41, 40, 39, 48, 384, 184, - /* 120 */ 1466, 269, 2172, 615, 176, 133, 614, 2190, 48, 2235, - /* 130 */ 61, 1547, 1153, 1464, 1156, 1157, 1549, 1550, 397, 604, - /* 140 */ 622, 31, 396, 2235, 603, 182, 1959, 38, 37, 2236, - /* 150 */ 605, 44, 42, 41, 40, 39, 1542, 389, 603, 182, - /* 160 */ 1902, 1904, 18, 2236, 605, 1492, 1522, 1532, 1716, 1472, - /* 170 */ 1759, 122, 1548, 1551, 121, 120, 119, 118, 117, 116, - /* 180 */ 115, 114, 113, 579, 1975, 579, 1467, 2235, 1465, 2235, - /* 190 */ 490, 1493, 491, 1729, 65, 748, 375, 1239, 14, 1972, - /* 200 */ 628, 105, 2241, 182, 2241, 182, 640, 2236, 605, 2236, - /* 210 */ 605, 102, 1470, 1471, 2044, 1521, 1524, 1525, 1526, 1527, - /* 220 */ 1528, 1529, 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, - /* 230 */ 1545, 1546, 2, 1241, 1549, 1550, 725, 724, 723, 722, - /* 240 */ 394, 626, 721, 720, 143, 715, 714, 713, 712, 711, - /* 250 */ 710, 709, 156, 705, 704, 703, 393, 392, 700, 699, - /* 260 */ 698, 697, 696, 2240, 1522, 1532, 1715, 2235, 38, 37, - /* 270 */ 1548, 1551, 44, 42, 41, 40, 39, 185, 1686, 185, - /* 280 */ 1494, 1330, 1331, 2239, 1467, 693, 1465, 2236, 2237, 508, - /* 290 */ 61, 1847, 489, 38, 37, 494, 1735, 44, 42, 41, - /* 300 */ 40, 39, 2058, 154, 153, 690, 689, 688, 151, 599, - /* 310 */ 1470, 1471, 2044, 1521, 1524, 1525, 1526, 1527, 1528, 1529, - /* 320 */ 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, 1546, - /* 330 */ 2, 11, 45, 43, 1762, 1491, 2054, 2060, 1909, 271, - /* 340 */ 384, 1296, 1466, 1492, 695, 362, 1170, 651, 1169, 344, - /* 350 */ 594, 106, 194, 1547, 1907, 1464, 100, 1287, 683, 682, - /* 360 */ 681, 1291, 680, 1293, 1294, 679, 676, 140, 1302, 673, - /* 370 */ 1304, 1305, 670, 667, 1685, 1848, 33, 1171, 1542, 1833, - /* 380 */ 1849, 2076, 38, 37, 18, 568, 44, 42, 41, 40, - /* 390 */ 39, 1472, 1490, 83, 1576, 1645, 82, 545, 544, 543, - /* 400 */ 545, 544, 543, 1714, 535, 136, 539, 535, 136, 539, - /* 410 */ 538, 35, 290, 538, 2094, 537, 542, 748, 537, 542, - /* 420 */ 14, 536, 658, 499, 536, 491, 1729, 2044, 249, 657, - /* 430 */ 45, 43, 1552, 600, 595, 588, 86, 2179, 384, 185, - /* 440 */ 1466, 1250, 591, 590, 1643, 1644, 1646, 1647, 1648, 2044, - /* 450 */ 1577, 1547, 353, 1464, 1249, 641, 1549, 1550, 2075, 1402, - /* 460 */ 1403, 1851, 2111, 2176, 533, 109, 2077, 661, 2079, 2080, - /* 470 */ 656, 187, 651, 1694, 641, 142, 1542, 149, 2135, 2164, - /* 480 */ 61, 1385, 1386, 378, 2160, 532, 1522, 1532, 1856, 1472, - /* 490 */ 54, 693, 1548, 1551, 122, 1401, 1404, 121, 120, 119, - /* 500 */ 118, 117, 116, 115, 114, 113, 1467, 1856, 1465, 154, - /* 510 */ 153, 690, 689, 688, 151, 748, 476, 239, 46, 467, - /* 520 */ 49, 34, 382, 1571, 1572, 1573, 1574, 1575, 1579, 1580, - /* 530 */ 1581, 1582, 1470, 1471, 1693, 1521, 1524, 1525, 1526, 1527, - /* 540 */ 1528, 1529, 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, - /* 550 */ 1545, 1546, 2, 423, 1549, 1550, 1472, 422, 131, 130, - /* 560 */ 129, 128, 127, 126, 125, 124, 123, 272, 498, 38, - /* 570 */ 37, 494, 1735, 44, 42, 41, 40, 39, 164, 2076, - /* 580 */ 198, 197, 1440, 1441, 1522, 1532, 616, 1859, 38, 37, - /* 590 */ 1548, 1551, 44, 42, 41, 40, 39, 2240, 579, 686, - /* 600 */ 1909, 86, 2235, 466, 1467, 2094, 1465, 372, 643, 61, - /* 610 */ 2136, 92, 2094, 598, 1493, 178, 1907, 2241, 182, 139, - /* 620 */ 619, 1831, 2236, 605, 27, 2044, 1852, 657, 1896, 185, - /* 630 */ 1470, 1471, 416, 1521, 1524, 1525, 1526, 1527, 1528, 1529, - /* 640 */ 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, 1546, - /* 650 */ 2, 45, 43, 2037, 418, 414, 2075, 641, 597, 384, - /* 660 */ 2111, 1466, 1656, 109, 2077, 661, 2079, 2080, 656, 185, - /* 670 */ 651, 641, 1547, 132, 1464, 179, 641, 2164, 1903, 1904, - /* 680 */ 529, 378, 2160, 618, 180, 2172, 2173, 132, 137, 2177, - /* 690 */ 1856, 550, 427, 2179, 534, 1679, 2076, 1542, 579, 73, - /* 700 */ 1713, 616, 2235, 2191, 1856, 641, 560, 38, 37, 1856, - /* 710 */ 1472, 44, 42, 41, 40, 39, 627, 2241, 182, 2175, - /* 720 */ 236, 428, 2236, 605, 41, 40, 39, 641, 238, 2094, - /* 730 */ 616, 641, 237, 693, 139, 553, 748, 658, 1856, 46, - /* 740 */ 547, 11, 2044, 437, 657, 235, 2044, 452, 81, 45, - /* 750 */ 43, 154, 153, 690, 689, 688, 151, 384, 185, 1466, - /* 760 */ 1856, 376, 271, 139, 1856, 625, 627, 1968, 2063, 164, - /* 770 */ 1547, 2038, 1464, 2075, 707, 1549, 1550, 2111, 1858, 2058, - /* 780 */ 168, 2077, 661, 2079, 2080, 656, 69, 651, 1841, 68, - /* 790 */ 89, 339, 1712, 641, 361, 1542, 561, 1711, 2076, 181, - /* 800 */ 2172, 2173, 387, 137, 2177, 1522, 1532, 1954, 1472, 453, - /* 810 */ 164, 1548, 1551, 2054, 2060, 636, 579, 1968, 190, 1858, - /* 820 */ 2235, 580, 2201, 1939, 651, 1467, 1856, 1465, 183, 2172, - /* 830 */ 2173, 2094, 137, 2177, 748, 2241, 182, 14, 2044, 658, - /* 840 */ 2236, 605, 1621, 2044, 2044, 1710, 657, 1557, 1491, 1709, - /* 850 */ 2179, 1470, 1471, 1491, 1521, 1524, 1525, 1526, 1527, 1528, - /* 860 */ 1529, 1530, 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, - /* 870 */ 1546, 2, 1843, 1549, 1550, 2075, 2174, 559, 1708, 2111, - /* 880 */ 1839, 641, 109, 2077, 661, 2079, 2080, 656, 165, 651, - /* 890 */ 557, 2044, 555, 310, 2139, 2044, 2164, 507, 685, 1909, - /* 900 */ 378, 2160, 1707, 1522, 1532, 1704, 377, 308, 72, 1548, - /* 910 */ 1551, 71, 38, 37, 1856, 1907, 44, 42, 41, 40, - /* 920 */ 39, 281, 282, 1467, 2044, 1465, 280, 356, 390, 205, - /* 930 */ 486, 484, 481, 8, 38, 37, 164, 2239, 44, 42, - /* 940 */ 41, 40, 39, 1703, 2076, 1858, 541, 540, 2044, 1470, - /* 950 */ 1471, 2044, 1521, 1524, 1525, 1526, 1527, 1528, 1529, 1530, - /* 960 */ 1531, 653, 649, 1540, 1541, 1543, 1544, 1545, 1546, 2, - /* 970 */ 61, 335, 1909, 1489, 2076, 719, 717, 2094, 447, 388, - /* 980 */ 460, 641, 1614, 474, 641, 658, 473, 446, 1907, 2044, - /* 990 */ 2044, 1254, 657, 357, 1523, 355, 354, 1853, 531, 1523, - /* 1000 */ 241, 443, 533, 475, 1253, 1633, 445, 2094, 108, 244, - /* 1010 */ 641, 641, 373, 1832, 1856, 658, 11, 1856, 9, 1491, - /* 1020 */ 2044, 2075, 657, 532, 652, 2111, 575, 620, 109, 2077, - /* 1030 */ 661, 2079, 2080, 656, 708, 651, 1818, 1702, 1701, 61, - /* 1040 */ 2255, 1494, 2164, 1856, 1856, 1700, 378, 2160, 80, 79, - /* 1050 */ 426, 2075, 352, 189, 641, 2111, 1494, 2198, 327, 2077, - /* 1060 */ 661, 2079, 2080, 656, 433, 651, 478, 13, 12, 1466, - /* 1070 */ 624, 1699, 333, 1749, 1578, 412, 695, 410, 406, 402, - /* 1080 */ 399, 419, 1464, 2044, 2044, 1698, 1697, 1856, 1696, 2076, - /* 1090 */ 645, 2044, 2136, 471, 163, 546, 465, 464, 463, 462, + /* 120 */ 1463, 269, 2168, 615, 176, 133, 614, 2186, 48, 2231, + /* 130 */ 61, 1544, 1151, 1461, 1154, 1155, 1546, 1547, 397, 604, + /* 140 */ 622, 31, 396, 2231, 603, 182, 1955, 38, 37, 2232, + /* 150 */ 605, 44, 42, 41, 40, 39, 1539, 389, 603, 182, + /* 160 */ 1898, 1900, 18, 2232, 605, 1489, 1519, 1529, 1713, 1469, + /* 170 */ 1756, 122, 1545, 1548, 121, 120, 119, 118, 117, 116, + /* 180 */ 115, 114, 113, 579, 1971, 579, 1464, 2231, 1462, 2231, + /* 190 */ 490, 105, 491, 1726, 61, 746, 375, 164, 14, 1968, + /* 200 */ 628, 102, 2237, 182, 2237, 182, 1856, 2232, 605, 2232, + /* 210 */ 605, 1488, 1467, 1468, 2040, 1518, 1521, 1522, 1523, 1524, + /* 220 */ 1525, 1526, 1527, 1528, 653, 649, 1537, 1538, 1540, 1541, + /* 230 */ 1542, 1543, 2, 1488, 1546, 1547, 723, 722, 721, 720, + /* 240 */ 394, 73, 719, 718, 143, 713, 712, 711, 710, 709, + /* 250 */ 708, 707, 156, 703, 702, 701, 393, 392, 698, 697, + /* 260 */ 696, 695, 694, 2236, 1519, 1529, 1712, 2231, 38, 37, + /* 270 */ 1545, 1548, 44, 42, 41, 40, 39, 185, 1683, 185, + /* 280 */ 1491, 1327, 1328, 2235, 1464, 1618, 1462, 2232, 2233, 467, + /* 290 */ 81, 1488, 594, 38, 37, 627, 627, 44, 42, 41, + /* 300 */ 40, 39, 691, 154, 153, 688, 687, 686, 151, 2175, + /* 310 */ 1467, 1468, 2040, 1518, 1521, 1522, 1523, 1524, 1525, 1526, + /* 320 */ 1527, 1528, 653, 649, 1537, 1538, 1540, 1541, 1542, 1543, + /* 330 */ 2, 11, 45, 43, 1759, 2172, 499, 1844, 491, 1726, + /* 340 */ 384, 1293, 1463, 185, 625, 636, 1964, 1964, 2054, 344, + /* 350 */ 198, 197, 167, 1544, 1702, 1461, 1284, 683, 682, 681, + /* 360 */ 1288, 680, 1290, 1291, 679, 676, 2175, 1299, 673, 1301, + /* 370 */ 1302, 670, 667, 466, 1682, 600, 595, 588, 1539, 1382, + /* 380 */ 1383, 2072, 2050, 2056, 18, 489, 508, 86, 494, 1732, + /* 390 */ 2033, 1469, 2171, 651, 1573, 1642, 640, 545, 544, 543, + /* 400 */ 545, 544, 543, 353, 535, 136, 539, 535, 136, 539, + /* 410 */ 538, 416, 1848, 538, 2090, 537, 542, 746, 537, 542, + /* 420 */ 14, 536, 658, 1490, 536, 106, 626, 2040, 249, 657, + /* 430 */ 45, 43, 1549, 418, 414, 579, 1711, 1520, 384, 2231, + /* 440 */ 1463, 140, 591, 590, 1640, 1641, 1643, 1644, 1645, 1845, + /* 450 */ 1574, 1544, 61, 1461, 2237, 182, 1546, 1547, 2071, 2232, + /* 460 */ 605, 100, 2107, 2090, 599, 109, 2073, 661, 2075, 2076, + /* 470 */ 656, 598, 651, 1691, 1905, 142, 1539, 149, 2131, 2160, + /* 480 */ 641, 362, 2040, 378, 2156, 1846, 1519, 1529, 693, 1469, + /* 490 */ 1903, 2175, 1545, 1548, 122, 1487, 187, 121, 120, 119, + /* 500 */ 118, 117, 116, 115, 114, 113, 1464, 498, 1462, 49, + /* 510 */ 494, 1732, 568, 1853, 1935, 746, 597, 2170, 46, 11, + /* 520 */ 1237, 34, 382, 1568, 1569, 1570, 1571, 1572, 1576, 1577, + /* 530 */ 1578, 1579, 1467, 1468, 1690, 1518, 1521, 1522, 1523, 1524, + /* 540 */ 1525, 1526, 1527, 1528, 653, 649, 1537, 1538, 1540, 1541, + /* 550 */ 1542, 1543, 2, 423, 1546, 1547, 1239, 422, 131, 130, + /* 560 */ 129, 128, 127, 126, 125, 124, 123, 641, 178, 38, + /* 570 */ 37, 271, 1554, 44, 42, 41, 40, 39, 1488, 2072, + /* 580 */ 1168, 1892, 1167, 54, 1519, 1529, 616, 1469, 38, 37, + /* 590 */ 1545, 1548, 44, 42, 41, 40, 39, 376, 579, 387, + /* 600 */ 1853, 185, 2231, 1491, 1464, 164, 1462, 164, 41, 40, + /* 610 */ 39, 1169, 2090, 559, 1855, 684, 1855, 2237, 182, 139, + /* 620 */ 619, 1491, 2232, 605, 27, 2040, 557, 657, 555, 1838, + /* 630 */ 1467, 1468, 1830, 1518, 1521, 1522, 1523, 1524, 1525, 1526, + /* 640 */ 1527, 1528, 653, 649, 1537, 1538, 1540, 1541, 1542, 1543, + /* 650 */ 2, 45, 43, 2034, 35, 290, 2071, 272, 185, 384, + /* 660 */ 2107, 1463, 1653, 109, 2073, 661, 2075, 2076, 656, 447, + /* 670 */ 651, 641, 1544, 1710, 1461, 179, 533, 2160, 446, 1248, + /* 680 */ 532, 378, 2156, 618, 180, 2168, 2169, 427, 137, 2173, + /* 690 */ 238, 550, 1247, 641, 237, 705, 2072, 1539, 579, 61, + /* 700 */ 1709, 92, 2231, 2187, 1853, 641, 560, 38, 37, 132, + /* 710 */ 1469, 44, 42, 41, 40, 39, 529, 2237, 182, 2040, + /* 720 */ 236, 132, 2232, 605, 1520, 1905, 1853, 641, 534, 2090, + /* 730 */ 541, 540, 372, 1899, 1900, 553, 746, 658, 1853, 46, + /* 740 */ 547, 1903, 2040, 241, 657, 235, 2040, 194, 1708, 45, + /* 750 */ 43, 191, 89, 339, 476, 1840, 361, 384, 561, 1463, + /* 760 */ 1853, 691, 154, 153, 688, 687, 686, 151, 2059, 248, + /* 770 */ 1544, 566, 1461, 2071, 1489, 1546, 1547, 2107, 8, 2054, + /* 780 */ 168, 2073, 661, 2075, 2076, 656, 69, 651, 83, 68, + /* 790 */ 33, 82, 13, 12, 2040, 1539, 38, 37, 2072, 641, + /* 800 */ 44, 42, 41, 40, 39, 1519, 1529, 1707, 1469, 1829, + /* 810 */ 1836, 1545, 1548, 2050, 2056, 428, 579, 641, 281, 282, + /* 820 */ 2231, 580, 2197, 280, 651, 1464, 2236, 1462, 1154, 1155, + /* 830 */ 390, 2090, 1853, 437, 746, 2237, 182, 14, 164, 658, + /* 840 */ 2232, 605, 685, 1490, 2040, 1896, 657, 1855, 185, 1611, + /* 850 */ 1853, 1467, 1468, 2040, 1518, 1521, 1522, 1523, 1524, 1525, + /* 860 */ 1526, 1527, 1528, 653, 649, 1537, 1538, 1540, 1541, 1542, + /* 870 */ 1543, 2, 693, 1546, 1547, 2071, 1706, 717, 715, 2107, + /* 880 */ 239, 641, 109, 2073, 661, 2075, 2076, 656, 165, 651, + /* 890 */ 1399, 1400, 1587, 310, 2135, 616, 2160, 452, 1733, 1905, + /* 900 */ 378, 2156, 1705, 1519, 1529, 1704, 377, 308, 72, 1545, + /* 910 */ 1548, 71, 38, 37, 1853, 1903, 44, 42, 41, 40, + /* 920 */ 39, 574, 2040, 1464, 1676, 1462, 1398, 1401, 139, 205, + /* 930 */ 486, 484, 481, 1575, 38, 37, 1701, 2235, 44, 42, + /* 940 */ 41, 40, 39, 1700, 2072, 1437, 1438, 741, 2040, 1467, + /* 950 */ 1468, 2040, 1518, 1521, 1522, 1523, 1524, 1525, 1526, 1527, + /* 960 */ 1528, 653, 649, 1537, 1538, 1540, 1541, 1542, 1543, 2, + /* 970 */ 61, 335, 1905, 1486, 2072, 2180, 1607, 2090, 1699, 388, + /* 980 */ 460, 1857, 2040, 474, 641, 658, 473, 1607, 1903, 2040, + /* 990 */ 2040, 271, 657, 181, 2168, 2169, 1252, 137, 2173, 1698, + /* 1000 */ 453, 443, 244, 475, 32, 1630, 445, 2090, 108, 1251, + /* 1010 */ 641, 641, 373, 1799, 1580, 658, 1828, 1853, 1685, 1686, + /* 1020 */ 2040, 2071, 657, 641, 2040, 2107, 507, 1850, 109, 2073, + /* 1030 */ 661, 2075, 2076, 656, 11, 651, 9, 1697, 1696, 575, + /* 1040 */ 2251, 61, 2160, 1853, 1853, 2040, 378, 2156, 80, 79, + /* 1050 */ 426, 2071, 352, 189, 641, 2107, 1853, 2194, 327, 2073, + /* 1060 */ 661, 2075, 2076, 656, 433, 651, 643, 1695, 2132, 1463, + /* 1070 */ 620, 478, 333, 611, 645, 412, 2132, 410, 406, 402, + /* 1080 */ 399, 419, 1461, 2040, 2040, 1488, 1694, 1853, 1693, 2072, + /* 1090 */ 652, 578, 86, 471, 163, 1610, 465, 464, 463, 462, /* 1100 */ 459, 458, 457, 456, 455, 451, 450, 449, 448, 334, - /* 1110 */ 440, 439, 438, 641, 435, 434, 350, 2044, 1472, 185, - /* 1120 */ 641, 608, 2094, 641, 421, 641, 420, 641, 574, 285, - /* 1130 */ 658, 2044, 2044, 152, 2044, 2044, 638, 657, 2076, 639, - /* 1140 */ 1954, 291, 1610, 391, 748, 32, 1856, 2012, 1954, 304, - /* 1150 */ 419, 192, 1886, 1856, 687, 1583, 1856, 1900, 1856, 196, - /* 1160 */ 1856, 1156, 1157, 2184, 1610, 1523, 2075, 1590, 1834, 691, - /* 1170 */ 2111, 2094, 1900, 109, 2077, 661, 2079, 2080, 656, 658, - /* 1180 */ 651, 51, 611, 3, 2044, 2255, 657, 2164, 185, 191, - /* 1190 */ 53, 378, 2160, 240, 430, 692, 1742, 2076, 1900, 145, - /* 1200 */ 152, 134, 2211, 607, 248, 228, 230, 431, 226, 229, - /* 1210 */ 232, 234, 147, 231, 233, 2075, 1688, 1689, 548, 2111, - /* 1220 */ 2076, 247, 109, 2077, 661, 2079, 2080, 656, 1613, 651, - /* 1230 */ 2094, 1802, 152, 1467, 2255, 1465, 2164, 563, 658, 562, - /* 1240 */ 378, 2160, 1740, 2044, 1475, 657, 63, 578, 13, 12, - /* 1250 */ 1706, 586, 2204, 2094, 648, 63, 253, 1435, 701, 1470, - /* 1260 */ 1471, 658, 266, 152, 551, 90, 2044, 592, 657, 47, - /* 1270 */ 278, 70, 150, 152, 2075, 63, 1474, 47, 2111, 47, - /* 1280 */ 1219, 109, 2077, 661, 2079, 2080, 656, 2065, 651, 1438, - /* 1290 */ 665, 221, 150, 2255, 152, 2164, 135, 2075, 2076, 378, - /* 1300 */ 2160, 2111, 150, 1642, 109, 2077, 661, 2079, 2080, 656, - /* 1310 */ 2229, 651, 1641, 255, 381, 380, 2255, 395, 2164, 52, - /* 1320 */ 623, 1736, 378, 2160, 1480, 1200, 1399, 283, 633, 287, - /* 1330 */ 1280, 2094, 1584, 2183, 1533, 1547, 303, 1473, 260, 658, - /* 1340 */ 2067, 702, 1963, 223, 2044, 2095, 657, 1308, 609, 1312, - /* 1350 */ 1730, 1319, 2194, 1317, 617, 1897, 265, 2076, 171, 155, - /* 1360 */ 1542, 1201, 268, 1217, 525, 521, 517, 513, 220, 1, - /* 1370 */ 743, 4, 398, 1472, 403, 2075, 1422, 348, 298, 2111, - /* 1380 */ 2076, 195, 109, 2077, 661, 2079, 2080, 656, 432, 651, - /* 1390 */ 2094, 1494, 1964, 436, 2137, 469, 2164, 1478, 658, 647, - /* 1400 */ 378, 2160, 1568, 2044, 441, 657, 1489, 454, 1956, 87, - /* 1410 */ 468, 612, 218, 2094, 461, 470, 479, 477, 200, 480, - /* 1420 */ 199, 658, 483, 482, 202, 485, 2044, 566, 657, 1477, - /* 1430 */ 487, 1495, 488, 497, 2075, 1497, 1492, 500, 2111, 208, - /* 1440 */ 501, 109, 2077, 661, 2079, 2080, 656, 1496, 651, 210, - /* 1450 */ 502, 1498, 503, 644, 213, 2164, 215, 2075, 505, 378, - /* 1460 */ 2160, 2111, 2076, 509, 110, 2077, 661, 2079, 2080, 656, - /* 1470 */ 84, 651, 579, 85, 219, 1173, 2235, 526, 2164, 217, - /* 1480 */ 211, 528, 2163, 2160, 216, 527, 504, 530, 1481, 111, - /* 1490 */ 1476, 2241, 182, 338, 1846, 2094, 2236, 605, 225, 2021, - /* 1500 */ 1842, 227, 209, 658, 157, 158, 1844, 565, 2044, 1840, - /* 1510 */ 657, 2076, 567, 159, 1484, 1486, 160, 88, 148, 242, - /* 1520 */ 299, 2018, 569, 2017, 245, 576, 573, 649, 1540, 1541, - /* 1530 */ 1543, 1544, 1545, 1546, 2076, 570, 583, 593, 2210, 2075, - /* 1540 */ 2195, 2205, 631, 2111, 2094, 602, 110, 2077, 661, 2079, - /* 1550 */ 2080, 656, 658, 651, 251, 589, 254, 2044, 7, 657, - /* 1560 */ 2164, 367, 596, 2209, 646, 2160, 172, 2094, 2186, 584, - /* 1570 */ 582, 261, 259, 2258, 263, 655, 262, 581, 1610, 264, - /* 1580 */ 2044, 613, 657, 368, 610, 138, 1493, 2180, 659, 371, - /* 1590 */ 621, 1499, 2111, 300, 1969, 110, 2077, 661, 2079, 2080, - /* 1600 */ 656, 629, 651, 273, 95, 634, 2076, 301, 97, 2164, - /* 1610 */ 635, 2075, 99, 343, 2160, 2111, 630, 60, 326, 2077, - /* 1620 */ 661, 2079, 2080, 656, 654, 651, 642, 2129, 267, 2076, - /* 1630 */ 2234, 1983, 1982, 1981, 374, 1857, 302, 2145, 101, 2094, - /* 1640 */ 663, 1901, 1819, 751, 305, 744, 745, 658, 747, 314, - /* 1650 */ 294, 328, 2044, 318, 657, 307, 309, 297, 50, 340, - /* 1660 */ 341, 2036, 2094, 2076, 2035, 2034, 329, 77, 2031, 400, - /* 1670 */ 658, 401, 175, 1457, 1458, 2044, 188, 657, 741, 737, - /* 1680 */ 733, 729, 295, 2075, 405, 2029, 407, 2111, 408, 2076, - /* 1690 */ 169, 2077, 661, 2079, 2080, 656, 2094, 651, 409, 2028, - /* 1700 */ 411, 2027, 413, 2026, 658, 415, 2075, 2025, 417, 2044, - /* 1710 */ 2111, 657, 78, 110, 2077, 661, 2079, 2080, 656, 1425, - /* 1720 */ 651, 1424, 2094, 107, 1995, 1994, 288, 2164, 1993, 424, - /* 1730 */ 658, 425, 2161, 1992, 1991, 2044, 1376, 657, 1947, 1946, - /* 1740 */ 2075, 1944, 606, 2256, 2111, 1943, 144, 168, 2077, 661, - /* 1750 */ 2079, 2080, 656, 2076, 651, 1942, 1945, 1941, 637, 193, - /* 1760 */ 1935, 442, 444, 1949, 1934, 1933, 2075, 1940, 1938, 1937, - /* 1770 */ 2111, 1936, 1932, 320, 2077, 661, 2079, 2080, 656, 1931, - /* 1780 */ 651, 1930, 1929, 1928, 1927, 2076, 2094, 1926, 1925, 2202, - /* 1790 */ 1924, 1923, 1922, 275, 658, 1921, 1920, 1919, 274, 2044, - /* 1800 */ 146, 657, 1918, 1917, 1948, 1916, 1915, 1378, 1914, 1913, - /* 1810 */ 2076, 1912, 1911, 472, 1429, 1910, 243, 601, 2094, 336, - /* 1820 */ 1251, 1255, 1765, 337, 201, 1764, 655, 1763, 1247, 1761, - /* 1830 */ 2075, 2044, 203, 657, 2111, 204, 1725, 169, 2077, 661, - /* 1840 */ 2079, 2080, 656, 2094, 651, 177, 1724, 2064, 383, 206, - /* 1850 */ 2008, 658, 75, 1159, 1158, 76, 2044, 493, 657, 2076, - /* 1860 */ 207, 495, 2075, 2002, 1990, 212, 2111, 214, 1989, 326, - /* 1870 */ 2077, 661, 2079, 2080, 656, 2076, 651, 1967, 2130, 1835, - /* 1880 */ 1760, 1758, 1193, 510, 512, 511, 1756, 2075, 514, 515, - /* 1890 */ 2257, 2111, 2094, 516, 327, 2077, 661, 2079, 2080, 656, - /* 1900 */ 658, 651, 1754, 519, 518, 2044, 520, 657, 2094, 1752, - /* 1910 */ 522, 524, 1739, 385, 523, 1738, 658, 1721, 1837, 1324, - /* 1920 */ 1836, 2044, 1323, 657, 2076, 1238, 224, 62, 1237, 1236, - /* 1930 */ 1235, 1234, 716, 718, 1231, 1229, 564, 1750, 1230, 1228, - /* 1940 */ 2111, 2076, 1743, 322, 2077, 661, 2079, 2080, 656, 358, - /* 1950 */ 651, 359, 2075, 1741, 360, 549, 2111, 2094, 2076, 327, - /* 1960 */ 2077, 661, 2079, 2080, 656, 658, 651, 1720, 552, 554, - /* 1970 */ 2044, 1719, 657, 556, 2094, 1718, 558, 112, 1445, 1447, - /* 1980 */ 1444, 2007, 658, 1449, 1431, 26, 2001, 2044, 571, 657, - /* 1990 */ 1988, 2094, 55, 246, 1986, 2240, 577, 66, 572, 658, - /* 2000 */ 19, 2075, 364, 16, 2044, 2111, 657, 2076, 311, 2077, - /* 2010 */ 661, 2079, 2080, 656, 58, 651, 28, 162, 2075, 5, - /* 2020 */ 1658, 250, 2111, 2076, 585, 312, 2077, 661, 2079, 2080, - /* 2030 */ 656, 6, 651, 59, 587, 2075, 64, 252, 258, 2111, - /* 2040 */ 2094, 2076, 313, 2077, 661, 2079, 2080, 656, 658, 651, - /* 2050 */ 257, 1640, 170, 2044, 2065, 657, 2094, 30, 256, 29, - /* 2060 */ 21, 1632, 91, 1673, 658, 1678, 1679, 1672, 270, 2044, - /* 2070 */ 369, 657, 1677, 1676, 2094, 370, 173, 1607, 1606, 1987, - /* 2080 */ 57, 1985, 658, 93, 2075, 56, 20, 2044, 2111, 657, - /* 2090 */ 2076, 319, 2077, 661, 2079, 2080, 656, 17, 651, 1984, - /* 2100 */ 2075, 1966, 94, 276, 2111, 22, 2076, 323, 2077, 661, - /* 2110 */ 2079, 2080, 656, 1965, 651, 277, 1638, 279, 2075, 284, - /* 2120 */ 67, 96, 2111, 2094, 286, 315, 2077, 661, 2079, 2080, - /* 2130 */ 656, 658, 651, 102, 98, 289, 2044, 23, 657, 2094, - /* 2140 */ 632, 1559, 10, 1558, 12, 1482, 2114, 658, 1537, 650, - /* 2150 */ 174, 1535, 2044, 1569, 657, 36, 186, 1514, 1534, 15, - /* 2160 */ 24, 660, 1506, 2076, 25, 662, 1309, 2075, 664, 386, - /* 2170 */ 666, 2111, 1306, 668, 324, 2077, 661, 2079, 2080, 656, - /* 2180 */ 2076, 651, 671, 2075, 669, 674, 1303, 2111, 1297, 672, - /* 2190 */ 316, 2077, 661, 2079, 2080, 656, 2094, 651, 675, 677, - /* 2200 */ 1301, 1295, 678, 1300, 658, 1286, 684, 103, 104, 2044, - /* 2210 */ 292, 657, 1318, 2094, 1299, 1298, 74, 1314, 1191, 694, - /* 2220 */ 1225, 658, 1224, 1223, 1222, 1221, 2044, 1220, 657, 2076, - /* 2230 */ 1245, 1218, 706, 1216, 1215, 1214, 1212, 293, 1211, 1210, - /* 2240 */ 2075, 1209, 1208, 1207, 2111, 2076, 1206, 325, 2077, 661, - /* 2250 */ 2079, 2080, 656, 1242, 651, 1240, 1203, 2075, 1202, 1199, - /* 2260 */ 1198, 2111, 2094, 1197, 317, 2077, 661, 2079, 2080, 656, - /* 2270 */ 658, 651, 1196, 1757, 726, 2044, 727, 657, 2094, 728, - /* 2280 */ 1755, 731, 730, 732, 1753, 734, 658, 736, 1751, 738, - /* 2290 */ 735, 2044, 740, 657, 2076, 1737, 742, 739, 1148, 1717, - /* 2300 */ 296, 1468, 746, 750, 306, 1692, 2075, 749, 1692, 1692, - /* 2310 */ 2111, 1692, 1692, 330, 2077, 661, 2079, 2080, 656, 2076, - /* 2320 */ 651, 1692, 2075, 1692, 1692, 1692, 2111, 2094, 1692, 331, - /* 2330 */ 2077, 661, 2079, 2080, 656, 658, 651, 1692, 1692, 1692, - /* 2340 */ 2044, 1692, 657, 2076, 1692, 1692, 1692, 1692, 1692, 1692, - /* 2350 */ 1692, 1692, 2094, 1692, 1692, 1692, 1692, 1692, 1692, 1692, - /* 2360 */ 658, 1692, 1692, 1692, 1692, 2044, 1692, 657, 1692, 1692, - /* 2370 */ 1692, 2075, 1692, 1692, 1692, 2111, 2094, 1692, 2088, 2077, - /* 2380 */ 661, 2079, 2080, 656, 658, 651, 1692, 1692, 1692, 2044, - /* 2390 */ 1692, 657, 1692, 1692, 1692, 1692, 2075, 1692, 1692, 1692, - /* 2400 */ 2111, 1692, 1692, 2087, 2077, 661, 2079, 2080, 656, 1692, - /* 2410 */ 651, 1692, 1692, 1692, 2076, 1692, 1692, 1692, 1692, 1692, - /* 2420 */ 2075, 1692, 1692, 1692, 2111, 1692, 1692, 2086, 2077, 661, - /* 2430 */ 2079, 2080, 656, 1692, 651, 1692, 2076, 1692, 1692, 1692, - /* 2440 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 2094, 1692, 1692, - /* 2450 */ 1692, 1692, 1692, 1692, 1692, 658, 1692, 1692, 1692, 1692, - /* 2460 */ 2044, 1692, 657, 2076, 1692, 1692, 1692, 1692, 1692, 2094, - /* 2470 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 658, 1692, 1692, - /* 2480 */ 1692, 1692, 2044, 1692, 657, 1692, 1692, 1692, 1692, 1692, - /* 2490 */ 1692, 2075, 1692, 1692, 1692, 2111, 2094, 1692, 345, 2077, - /* 2500 */ 661, 2079, 2080, 656, 658, 651, 1692, 1692, 1692, 2044, - /* 2510 */ 1692, 657, 2076, 2075, 1692, 1692, 1692, 2111, 1692, 1692, - /* 2520 */ 346, 2077, 661, 2079, 2080, 656, 1692, 651, 2076, 1692, - /* 2530 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, - /* 2540 */ 2075, 1692, 1692, 1692, 2111, 2094, 1692, 342, 2077, 661, - /* 2550 */ 2079, 2080, 656, 658, 651, 1692, 1692, 1692, 2044, 1692, - /* 2560 */ 657, 2094, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 658, - /* 2570 */ 1692, 1692, 1692, 1692, 2044, 1692, 657, 2076, 1692, 1692, - /* 2580 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 2075, - /* 2590 */ 1692, 1692, 1692, 2111, 1692, 1692, 347, 2077, 661, 2079, - /* 2600 */ 2080, 656, 1692, 651, 1692, 659, 1692, 1692, 1692, 2111, - /* 2610 */ 2094, 1692, 322, 2077, 661, 2079, 2080, 656, 658, 651, - /* 2620 */ 1692, 1692, 1692, 2044, 1692, 657, 1692, 1692, 1692, 1692, - /* 2630 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, - /* 2640 */ 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, 1692, - /* 2650 */ 1692, 1692, 1692, 1692, 2075, 1692, 1692, 1692, 2111, 1692, - /* 2660 */ 1692, 321, 2077, 661, 2079, 2080, 656, 1692, 651, + /* 1110 */ 440, 439, 438, 2040, 435, 434, 350, 1849, 1469, 185, + /* 1120 */ 641, 608, 2090, 641, 641, 641, 421, 706, 420, 1815, + /* 1130 */ 658, 1950, 2040, 2200, 2040, 2040, 624, 657, 2072, 285, + /* 1140 */ 638, 639, 192, 1950, 746, 691, 154, 153, 688, 687, + /* 1150 */ 686, 151, 419, 1853, 196, 2008, 1853, 1853, 1853, 304, + /* 1160 */ 152, 689, 1882, 52, 1896, 641, 2071, 641, 1831, 430, + /* 1170 */ 2107, 2090, 1746, 109, 2073, 661, 2075, 2076, 656, 658, + /* 1180 */ 651, 291, 431, 391, 2040, 2251, 657, 2160, 13, 12, + /* 1190 */ 185, 378, 2156, 690, 546, 152, 1896, 2072, 1853, 152, + /* 1200 */ 1853, 240, 2207, 607, 51, 145, 3, 134, 228, 1472, + /* 1210 */ 230, 226, 147, 229, 247, 2071, 1471, 53, 232, 2107, + /* 1220 */ 2072, 231, 109, 2073, 661, 2075, 2076, 656, 1739, 651, + /* 1230 */ 2090, 1520, 1737, 1464, 2251, 1462, 2160, 63, 658, 234, + /* 1240 */ 378, 2156, 233, 2040, 563, 657, 562, 648, 1703, 266, + /* 1250 */ 548, 586, 1432, 2090, 551, 63, 1435, 592, 90, 1467, + /* 1260 */ 1468, 658, 253, 152, 47, 221, 2040, 699, 657, 278, + /* 1270 */ 70, 150, 260, 152, 2071, 63, 2091, 47, 2107, 47, + /* 1280 */ 395, 109, 2073, 661, 2075, 2076, 656, 2061, 651, 1217, + /* 1290 */ 665, 1893, 150, 2251, 1639, 2160, 152, 2071, 2072, 378, + /* 1300 */ 2156, 2107, 612, 700, 109, 2073, 661, 2075, 2076, 656, + /* 1310 */ 2225, 651, 1638, 135, 381, 380, 2251, 616, 2160, 255, + /* 1320 */ 623, 1396, 378, 2156, 1477, 1215, 283, 633, 287, 1959, + /* 1330 */ 1278, 2090, 1581, 2179, 1530, 1544, 303, 1470, 1198, 658, + /* 1340 */ 2063, 1727, 2190, 223, 2040, 150, 657, 1305, 609, 1309, + /* 1350 */ 139, 617, 268, 1316, 265, 1, 4, 2072, 171, 398, + /* 1360 */ 1539, 403, 1475, 348, 525, 521, 517, 513, 220, 1474, + /* 1370 */ 1314, 298, 1419, 1469, 1199, 2071, 195, 432, 1960, 2107, + /* 1380 */ 2072, 356, 109, 2073, 661, 2075, 2076, 656, 1491, 651, + /* 1390 */ 2090, 436, 441, 1486, 2133, 1565, 2160, 454, 658, 647, + /* 1400 */ 378, 2156, 155, 2040, 469, 657, 1952, 461, 480, 87, + /* 1410 */ 468, 477, 218, 2090, 470, 183, 2168, 2169, 479, 137, + /* 1420 */ 2173, 658, 199, 200, 482, 483, 2040, 202, 657, 485, + /* 1430 */ 487, 1492, 488, 497, 2071, 1494, 500, 208, 2107, 1489, + /* 1440 */ 501, 109, 2073, 661, 2075, 2076, 656, 357, 651, 355, + /* 1450 */ 354, 1493, 531, 644, 210, 2160, 1495, 2071, 502, 378, + /* 1460 */ 2156, 2107, 2072, 503, 110, 2073, 661, 2075, 2076, 656, + /* 1470 */ 213, 651, 505, 533, 215, 84, 509, 532, 2160, 217, + /* 1480 */ 211, 85, 2159, 2156, 216, 219, 504, 1171, 1478, 2017, + /* 1490 */ 1473, 526, 527, 528, 2014, 2090, 2013, 530, 1843, 338, + /* 1500 */ 111, 565, 209, 658, 567, 225, 1839, 227, 2040, 157, + /* 1510 */ 657, 2072, 158, 88, 1481, 1483, 1841, 1837, 159, 242, + /* 1520 */ 148, 160, 569, 299, 570, 573, 2191, 649, 1537, 1538, + /* 1530 */ 1540, 1541, 1542, 1543, 2072, 245, 576, 593, 2206, 2071, + /* 1540 */ 631, 583, 589, 2107, 2090, 2201, 110, 2073, 661, 2075, + /* 1550 */ 2076, 656, 658, 651, 2205, 367, 596, 2040, 7, 657, + /* 1560 */ 2160, 251, 254, 602, 646, 2156, 259, 2090, 368, 581, + /* 1570 */ 267, 582, 172, 584, 261, 655, 262, 2182, 2254, 613, + /* 1580 */ 2040, 264, 657, 1607, 610, 138, 263, 1490, 659, 2176, + /* 1590 */ 2230, 371, 2107, 273, 621, 110, 2073, 661, 2075, 2076, + /* 1600 */ 656, 95, 651, 1496, 1965, 97, 2072, 300, 301, 2160, + /* 1610 */ 634, 2071, 635, 343, 2156, 2107, 99, 1854, 326, 2073, + /* 1620 */ 661, 2075, 2076, 656, 654, 651, 642, 2125, 302, 2072, + /* 1630 */ 629, 60, 2141, 630, 1979, 101, 1978, 1977, 374, 2090, + /* 1640 */ 663, 1897, 1816, 749, 742, 305, 743, 658, 745, 314, + /* 1650 */ 2032, 294, 2040, 329, 657, 328, 340, 297, 309, 341, + /* 1660 */ 2031, 2030, 2090, 2072, 50, 307, 2027, 318, 77, 400, + /* 1670 */ 658, 401, 175, 1454, 1455, 2040, 188, 657, 739, 735, + /* 1680 */ 731, 727, 295, 2071, 405, 2025, 407, 2107, 408, 2072, + /* 1690 */ 169, 2073, 661, 2075, 2076, 656, 2090, 651, 409, 2024, + /* 1700 */ 411, 2023, 413, 2022, 658, 415, 2071, 2021, 417, 2040, + /* 1710 */ 2107, 657, 78, 110, 2073, 661, 2075, 2076, 656, 1991, + /* 1720 */ 651, 1422, 2090, 107, 1421, 1990, 288, 2160, 1989, 424, + /* 1730 */ 658, 425, 2157, 1988, 1987, 2040, 1373, 657, 1943, 1942, + /* 1740 */ 2071, 1940, 606, 2252, 2107, 1939, 144, 168, 2073, 661, + /* 1750 */ 2075, 2076, 656, 2072, 651, 1938, 1941, 1937, 637, 193, + /* 1760 */ 1931, 442, 444, 1945, 1930, 1929, 2071, 1936, 1934, 1933, + /* 1770 */ 2107, 1932, 1928, 320, 2073, 661, 2075, 2076, 656, 1927, + /* 1780 */ 651, 1926, 1925, 1924, 1923, 2072, 2090, 1922, 1921, 2198, + /* 1790 */ 1920, 1919, 1918, 275, 658, 1917, 1916, 1915, 274, 2040, + /* 1800 */ 146, 657, 1914, 1913, 1944, 1912, 1911, 1375, 1910, 1909, + /* 1810 */ 2072, 1908, 1907, 472, 1426, 1906, 243, 601, 2090, 336, + /* 1820 */ 1249, 1253, 1762, 337, 201, 1761, 655, 1760, 1245, 1758, + /* 1830 */ 2071, 2040, 203, 657, 2107, 204, 1722, 169, 2073, 661, + /* 1840 */ 2075, 2076, 656, 2090, 651, 177, 1721, 2060, 383, 206, + /* 1850 */ 2004, 658, 75, 1157, 1156, 76, 2040, 493, 657, 2072, + /* 1860 */ 207, 495, 2071, 1998, 1986, 212, 2107, 214, 1985, 326, + /* 1870 */ 2073, 661, 2075, 2076, 656, 2072, 651, 1963, 2126, 1832, + /* 1880 */ 1757, 1755, 1191, 510, 512, 511, 1753, 2071, 514, 515, + /* 1890 */ 2253, 2107, 2090, 516, 327, 2073, 661, 2075, 2076, 656, + /* 1900 */ 658, 651, 1751, 519, 518, 2040, 520, 657, 2090, 1749, + /* 1910 */ 522, 524, 1736, 385, 523, 1735, 658, 1718, 1834, 1321, + /* 1920 */ 1833, 2040, 1320, 657, 2072, 1236, 224, 62, 1235, 1234, + /* 1930 */ 1233, 1232, 714, 716, 1229, 1227, 564, 1747, 1228, 1226, + /* 1940 */ 2107, 2072, 1740, 322, 2073, 661, 2075, 2076, 656, 358, + /* 1950 */ 651, 359, 2071, 1738, 360, 549, 2107, 2090, 2072, 327, + /* 1960 */ 2073, 661, 2075, 2076, 656, 658, 651, 1717, 552, 554, + /* 1970 */ 2040, 1716, 657, 556, 2090, 1715, 558, 112, 1442, 1444, + /* 1980 */ 1441, 2003, 658, 1446, 1428, 26, 1997, 2040, 571, 657, + /* 1990 */ 1984, 2090, 55, 246, 1982, 2236, 577, 66, 572, 658, + /* 2000 */ 19, 2071, 364, 16, 2040, 2107, 657, 2072, 311, 2073, + /* 2010 */ 661, 2075, 2076, 656, 58, 651, 28, 162, 2071, 5, + /* 2020 */ 1655, 250, 2107, 2072, 585, 312, 2073, 661, 2075, 2076, + /* 2030 */ 656, 6, 651, 59, 587, 2071, 64, 252, 258, 2107, + /* 2040 */ 2090, 2072, 313, 2073, 661, 2075, 2076, 656, 658, 651, + /* 2050 */ 257, 1637, 170, 2040, 2061, 657, 2090, 30, 256, 29, + /* 2060 */ 21, 1629, 91, 1670, 658, 1675, 1676, 1669, 270, 2040, + /* 2070 */ 369, 657, 1674, 1673, 2090, 370, 173, 1604, 1603, 1983, + /* 2080 */ 57, 1981, 658, 93, 2071, 56, 20, 2040, 2107, 657, + /* 2090 */ 2072, 319, 2073, 661, 2075, 2076, 656, 17, 651, 1980, + /* 2100 */ 2071, 1962, 94, 276, 2107, 22, 2072, 323, 2073, 661, + /* 2110 */ 2075, 2076, 656, 1961, 651, 277, 1635, 279, 2071, 284, + /* 2120 */ 67, 96, 2107, 2090, 286, 315, 2073, 661, 2075, 2076, + /* 2130 */ 656, 658, 651, 102, 98, 289, 2040, 23, 657, 2090, + /* 2140 */ 632, 1556, 10, 1555, 12, 1479, 2110, 658, 1534, 650, + /* 2150 */ 174, 1532, 2040, 1566, 657, 36, 186, 1511, 1531, 15, + /* 2160 */ 24, 660, 1503, 2072, 25, 662, 1306, 2071, 664, 386, + /* 2170 */ 666, 2107, 1303, 668, 324, 2073, 661, 2075, 2076, 656, + /* 2180 */ 2072, 651, 671, 2071, 669, 674, 1300, 2107, 1294, 672, + /* 2190 */ 316, 2073, 661, 2075, 2076, 656, 2090, 651, 675, 677, + /* 2200 */ 1298, 1292, 678, 292, 658, 1315, 103, 104, 1297, 2040, + /* 2210 */ 74, 657, 1296, 2090, 1295, 1311, 1189, 692, 1223, 1222, + /* 2220 */ 1221, 658, 1220, 1219, 1218, 1216, 2040, 1214, 657, 2072, + /* 2230 */ 1213, 1212, 1243, 704, 1210, 293, 1209, 1208, 1207, 1206, + /* 2240 */ 2071, 1205, 1204, 1240, 2107, 2072, 1238, 325, 2073, 661, + /* 2250 */ 2075, 2076, 656, 1201, 651, 1200, 1197, 2071, 1196, 1195, + /* 2260 */ 1194, 2107, 2090, 1754, 317, 2073, 661, 2075, 2076, 656, + /* 2270 */ 658, 651, 725, 724, 726, 2040, 1752, 657, 2090, 728, + /* 2280 */ 729, 730, 1750, 732, 733, 1748, 658, 736, 734, 737, + /* 2290 */ 738, 2040, 1734, 657, 2072, 740, 1146, 1714, 748, 296, + /* 2300 */ 744, 1689, 1465, 306, 747, 1689, 2071, 1689, 1689, 1689, + /* 2310 */ 2107, 1689, 1689, 330, 2073, 661, 2075, 2076, 656, 2072, + /* 2320 */ 651, 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 331, + /* 2330 */ 2073, 661, 2075, 2076, 656, 658, 651, 1689, 1689, 1689, + /* 2340 */ 2040, 1689, 657, 2072, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2350 */ 1689, 1689, 2090, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2360 */ 658, 1689, 1689, 1689, 1689, 2040, 1689, 657, 1689, 1689, + /* 2370 */ 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 2084, 2073, + /* 2380 */ 661, 2075, 2076, 656, 658, 651, 1689, 1689, 1689, 2040, + /* 2390 */ 1689, 657, 1689, 1689, 1689, 1689, 2071, 1689, 1689, 1689, + /* 2400 */ 2107, 1689, 1689, 2083, 2073, 661, 2075, 2076, 656, 1689, + /* 2410 */ 651, 1689, 1689, 1689, 2072, 1689, 1689, 1689, 1689, 1689, + /* 2420 */ 2071, 1689, 1689, 1689, 2107, 1689, 1689, 2082, 2073, 661, + /* 2430 */ 2075, 2076, 656, 1689, 651, 1689, 2072, 1689, 1689, 1689, + /* 2440 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 2090, 1689, 1689, + /* 2450 */ 1689, 1689, 1689, 1689, 1689, 658, 1689, 1689, 1689, 1689, + /* 2460 */ 2040, 1689, 657, 2072, 1689, 1689, 1689, 1689, 1689, 2090, + /* 2470 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 658, 1689, 1689, + /* 2480 */ 1689, 1689, 2040, 1689, 657, 1689, 1689, 1689, 1689, 1689, + /* 2490 */ 1689, 2071, 1689, 1689, 1689, 2107, 2090, 1689, 345, 2073, + /* 2500 */ 661, 2075, 2076, 656, 658, 651, 1689, 1689, 1689, 2040, + /* 2510 */ 1689, 657, 2072, 2071, 1689, 1689, 1689, 2107, 1689, 1689, + /* 2520 */ 346, 2073, 661, 2075, 2076, 656, 1689, 651, 2072, 1689, + /* 2530 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2540 */ 2071, 1689, 1689, 1689, 2107, 2090, 1689, 342, 2073, 661, + /* 2550 */ 2075, 2076, 656, 658, 651, 1689, 1689, 1689, 2040, 1689, + /* 2560 */ 657, 2090, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 658, + /* 2570 */ 1689, 1689, 1689, 1689, 2040, 1689, 657, 2072, 1689, 1689, + /* 2580 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 2071, + /* 2590 */ 1689, 1689, 1689, 2107, 1689, 1689, 347, 2073, 661, 2075, + /* 2600 */ 2076, 656, 1689, 651, 1689, 659, 1689, 1689, 1689, 2107, + /* 2610 */ 2090, 1689, 322, 2073, 661, 2075, 2076, 656, 658, 651, + /* 2620 */ 1689, 1689, 1689, 2040, 1689, 657, 1689, 1689, 1689, 1689, + /* 2630 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2640 */ 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, 1689, + /* 2650 */ 1689, 1689, 1689, 1689, 2071, 1689, 1689, 1689, 2107, 1689, + /* 2660 */ 1689, 321, 2073, 661, 2075, 2076, 656, 1689, 651, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 379, 365, 356, 331, 339, 441, 339, 366, 425, 445, @@ -496,8 +496,8 @@ static const YYCODETYPE yy_lookahead[] = { /* 60 */ 35, 441, 364, 422, 64, 445, 411, 412, 413, 371, /* 70 */ 328, 71, 411, 412, 413, 380, 51, 422, 380, 48, /* 80 */ 408, 461, 364, 422, 412, 465, 466, 415, 416, 417, - /* 90 */ 418, 419, 420, 4, 422, 346, 330, 97, 332, 427, - /* 100 */ 100, 429, 353, 385, 386, 433, 434, 20, 8, 9, + /* 90 */ 418, 419, 420, 4, 422, 346, 372, 97, 4, 427, + /* 100 */ 100, 429, 353, 385, 386, 433, 434, 383, 8, 9, /* 110 */ 12, 13, 12, 13, 14, 15, 16, 100, 20, 447, /* 120 */ 22, 437, 438, 439, 364, 441, 442, 455, 100, 445, /* 130 */ 100, 33, 43, 35, 45, 46, 136, 137, 396, 441, @@ -506,160 +506,160 @@ static const YYCODETYPE yy_lookahead[] = { /* 160 */ 378, 379, 64, 465, 466, 20, 166, 167, 331, 71, /* 170 */ 0, 21, 172, 173, 24, 25, 26, 27, 28, 29, /* 180 */ 30, 31, 32, 441, 379, 441, 186, 445, 188, 445, - /* 190 */ 335, 20, 337, 338, 4, 97, 391, 35, 100, 394, - /* 200 */ 395, 100, 460, 461, 460, 461, 20, 465, 466, 465, - /* 210 */ 466, 110, 212, 213, 377, 215, 216, 217, 218, 219, + /* 190 */ 335, 100, 337, 338, 100, 97, 391, 364, 100, 394, + /* 200 */ 395, 110, 460, 461, 460, 461, 373, 465, 466, 465, + /* 210 */ 466, 20, 212, 213, 377, 215, 216, 217, 218, 219, /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - /* 230 */ 230, 231, 232, 71, 136, 137, 66, 67, 68, 69, - /* 240 */ 70, 20, 72, 73, 74, 75, 76, 77, 78, 79, + /* 230 */ 230, 231, 232, 20, 136, 137, 66, 67, 68, 69, + /* 240 */ 70, 111, 72, 73, 74, 75, 76, 77, 78, 79, /* 250 */ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, /* 260 */ 90, 91, 92, 441, 166, 167, 331, 445, 8, 9, /* 270 */ 172, 173, 12, 13, 14, 15, 16, 249, 178, 249, - /* 280 */ 20, 136, 137, 461, 186, 112, 188, 465, 466, 63, - /* 290 */ 100, 366, 336, 8, 9, 339, 340, 12, 13, 14, - /* 300 */ 15, 16, 377, 130, 131, 132, 133, 134, 135, 20, + /* 280 */ 20, 136, 137, 461, 186, 14, 188, 465, 466, 80, + /* 290 */ 160, 20, 171, 8, 9, 339, 339, 12, 13, 14, + /* 300 */ 15, 16, 129, 130, 131, 132, 133, 134, 135, 414, /* 310 */ 212, 213, 377, 215, 216, 217, 218, 219, 220, 221, /* 320 */ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - /* 330 */ 232, 233, 12, 13, 0, 20, 411, 412, 364, 168, - /* 340 */ 20, 97, 22, 20, 63, 371, 20, 422, 22, 64, - /* 350 */ 171, 343, 58, 33, 380, 35, 343, 113, 114, 115, - /* 360 */ 116, 117, 118, 119, 120, 121, 122, 359, 124, 125, - /* 370 */ 126, 127, 128, 129, 274, 367, 2, 51, 58, 0, - /* 380 */ 367, 331, 8, 9, 64, 111, 12, 13, 14, 15, - /* 390 */ 16, 71, 20, 99, 109, 212, 102, 66, 67, 68, - /* 400 */ 66, 67, 68, 331, 73, 74, 75, 73, 74, 75, - /* 410 */ 79, 430, 431, 79, 364, 84, 85, 97, 84, 85, - /* 420 */ 100, 90, 372, 335, 90, 337, 338, 377, 168, 379, - /* 430 */ 12, 13, 14, 254, 255, 256, 345, 414, 20, 249, - /* 440 */ 22, 22, 259, 260, 261, 262, 263, 264, 265, 377, - /* 450 */ 165, 33, 361, 35, 35, 339, 136, 137, 408, 136, - /* 460 */ 137, 370, 412, 440, 112, 415, 416, 417, 418, 419, - /* 470 */ 420, 355, 422, 0, 339, 425, 58, 427, 428, 429, - /* 480 */ 100, 166, 167, 433, 434, 133, 166, 167, 372, 71, - /* 490 */ 355, 112, 172, 173, 21, 172, 173, 24, 25, 26, - /* 500 */ 27, 28, 29, 30, 31, 32, 186, 372, 188, 130, - /* 510 */ 131, 132, 133, 134, 135, 97, 97, 130, 100, 80, - /* 520 */ 100, 236, 237, 238, 239, 240, 241, 242, 243, 244, + /* 330 */ 232, 233, 12, 13, 0, 440, 335, 366, 337, 338, + /* 340 */ 20, 97, 22, 249, 388, 388, 390, 390, 377, 64, + /* 350 */ 141, 142, 330, 33, 332, 35, 112, 113, 114, 115, + /* 360 */ 116, 117, 118, 119, 120, 121, 414, 123, 124, 125, + /* 370 */ 126, 127, 128, 164, 274, 254, 255, 256, 58, 166, + /* 380 */ 167, 331, 411, 412, 64, 336, 63, 345, 339, 340, + /* 390 */ 396, 71, 440, 422, 109, 212, 20, 66, 67, 68, + /* 400 */ 66, 67, 68, 361, 73, 74, 75, 73, 74, 75, + /* 410 */ 79, 181, 370, 79, 364, 84, 85, 97, 84, 85, + /* 420 */ 100, 90, 372, 20, 90, 343, 20, 377, 168, 379, + /* 430 */ 12, 13, 14, 203, 204, 441, 331, 166, 20, 445, + /* 440 */ 22, 359, 259, 260, 261, 262, 263, 264, 265, 367, + /* 450 */ 165, 33, 100, 35, 460, 461, 136, 137, 408, 465, + /* 460 */ 466, 343, 412, 364, 20, 415, 416, 417, 418, 419, + /* 470 */ 420, 372, 422, 0, 364, 425, 58, 427, 428, 429, + /* 480 */ 339, 371, 377, 433, 434, 367, 166, 167, 63, 71, + /* 490 */ 380, 414, 172, 173, 21, 20, 355, 24, 25, 26, + /* 500 */ 27, 28, 29, 30, 31, 32, 186, 336, 188, 100, + /* 510 */ 339, 340, 111, 372, 0, 97, 417, 440, 100, 233, + /* 520 */ 35, 236, 237, 238, 239, 240, 241, 242, 243, 244, /* 530 */ 245, 246, 212, 213, 0, 215, 216, 217, 218, 219, /* 540 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, /* 550 */ 230, 231, 232, 396, 136, 137, 71, 400, 24, 25, - /* 560 */ 26, 27, 28, 29, 30, 31, 32, 58, 336, 8, - /* 570 */ 9, 339, 340, 12, 13, 14, 15, 16, 364, 331, - /* 580 */ 141, 142, 195, 196, 166, 167, 339, 373, 8, 9, - /* 590 */ 172, 173, 12, 13, 14, 15, 16, 3, 441, 111, - /* 600 */ 364, 345, 445, 164, 186, 364, 188, 371, 426, 100, - /* 610 */ 428, 102, 364, 372, 20, 363, 380, 460, 461, 372, - /* 620 */ 372, 0, 465, 466, 44, 377, 370, 379, 376, 249, - /* 630 */ 212, 213, 181, 215, 216, 217, 218, 219, 220, 221, + /* 560 */ 26, 27, 28, 29, 30, 31, 32, 339, 363, 8, + /* 570 */ 9, 168, 14, 12, 13, 14, 15, 16, 20, 331, + /* 580 */ 20, 376, 22, 355, 166, 167, 339, 71, 8, 9, + /* 590 */ 172, 173, 12, 13, 14, 15, 16, 356, 441, 356, + /* 600 */ 372, 249, 445, 20, 186, 364, 188, 364, 14, 15, + /* 610 */ 16, 51, 364, 21, 373, 111, 373, 460, 461, 372, + /* 620 */ 372, 20, 465, 466, 44, 377, 34, 379, 36, 365, + /* 630 */ 212, 213, 0, 215, 216, 217, 218, 219, 220, 221, /* 640 */ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - /* 650 */ 232, 12, 13, 396, 203, 204, 408, 339, 417, 20, - /* 660 */ 412, 22, 101, 415, 416, 417, 418, 419, 420, 249, - /* 670 */ 422, 339, 33, 355, 35, 427, 339, 429, 378, 379, - /* 680 */ 362, 433, 434, 436, 437, 438, 439, 355, 441, 442, - /* 690 */ 372, 4, 355, 414, 362, 101, 331, 58, 441, 111, - /* 700 */ 331, 339, 445, 455, 372, 339, 19, 8, 9, 372, - /* 710 */ 71, 12, 13, 14, 15, 16, 339, 460, 461, 440, - /* 720 */ 33, 355, 465, 466, 14, 15, 16, 339, 131, 364, - /* 730 */ 339, 339, 135, 112, 372, 48, 97, 372, 372, 100, - /* 740 */ 53, 233, 377, 355, 379, 58, 377, 355, 160, 12, - /* 750 */ 13, 130, 131, 132, 133, 134, 135, 20, 249, 22, - /* 760 */ 372, 356, 168, 372, 372, 388, 339, 390, 366, 364, - /* 770 */ 33, 396, 35, 408, 71, 136, 137, 412, 373, 377, - /* 780 */ 415, 416, 417, 418, 419, 420, 99, 422, 365, 102, - /* 790 */ 193, 194, 331, 339, 197, 58, 199, 331, 331, 437, - /* 800 */ 438, 439, 356, 441, 442, 166, 167, 372, 71, 355, - /* 810 */ 364, 172, 173, 411, 412, 388, 441, 390, 383, 373, - /* 820 */ 445, 456, 457, 0, 422, 186, 372, 188, 437, 438, - /* 830 */ 439, 364, 441, 442, 97, 460, 461, 100, 377, 372, - /* 840 */ 465, 466, 14, 377, 377, 331, 379, 14, 20, 331, - /* 850 */ 414, 212, 213, 20, 215, 216, 217, 218, 219, 220, + /* 650 */ 232, 12, 13, 396, 430, 431, 408, 58, 249, 20, + /* 660 */ 412, 22, 101, 415, 416, 417, 418, 419, 420, 155, + /* 670 */ 422, 339, 33, 331, 35, 427, 129, 429, 164, 22, + /* 680 */ 133, 433, 434, 436, 437, 438, 439, 355, 441, 442, + /* 690 */ 131, 4, 35, 339, 135, 71, 331, 58, 441, 100, + /* 700 */ 331, 102, 445, 455, 372, 339, 19, 8, 9, 355, + /* 710 */ 71, 12, 13, 14, 15, 16, 362, 460, 461, 377, + /* 720 */ 33, 355, 465, 466, 166, 364, 372, 339, 362, 364, + /* 730 */ 350, 351, 371, 378, 379, 48, 97, 372, 372, 100, + /* 740 */ 53, 380, 377, 355, 379, 58, 377, 58, 331, 12, + /* 750 */ 13, 168, 193, 194, 97, 365, 197, 20, 199, 22, + /* 760 */ 372, 129, 130, 131, 132, 133, 134, 135, 366, 168, + /* 770 */ 33, 396, 35, 408, 20, 136, 137, 412, 39, 377, + /* 780 */ 415, 416, 417, 418, 419, 420, 99, 422, 99, 102, + /* 790 */ 2, 102, 1, 2, 377, 58, 8, 9, 331, 339, + /* 800 */ 12, 13, 14, 15, 16, 166, 167, 331, 71, 0, + /* 810 */ 365, 172, 173, 411, 412, 355, 441, 339, 130, 131, + /* 820 */ 445, 456, 457, 135, 422, 186, 3, 188, 45, 46, + /* 830 */ 356, 364, 372, 355, 97, 460, 461, 100, 364, 372, + /* 840 */ 465, 466, 374, 20, 377, 377, 379, 373, 249, 4, + /* 850 */ 372, 212, 213, 377, 215, 216, 217, 218, 219, 220, /* 860 */ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - /* 870 */ 231, 232, 365, 136, 137, 408, 440, 21, 331, 412, - /* 880 */ 365, 339, 415, 416, 417, 418, 419, 420, 18, 422, - /* 890 */ 34, 377, 36, 23, 427, 377, 429, 355, 365, 364, + /* 870 */ 231, 232, 63, 136, 137, 408, 331, 350, 351, 412, + /* 880 */ 130, 339, 415, 416, 417, 418, 419, 420, 18, 422, + /* 890 */ 136, 137, 101, 23, 427, 339, 429, 355, 0, 364, /* 900 */ 433, 434, 331, 166, 167, 331, 371, 37, 38, 172, /* 910 */ 173, 41, 8, 9, 372, 380, 12, 13, 14, 15, - /* 920 */ 16, 130, 131, 186, 377, 188, 135, 37, 356, 59, - /* 930 */ 60, 61, 62, 39, 8, 9, 364, 3, 12, 13, - /* 940 */ 14, 15, 16, 331, 331, 373, 350, 351, 377, 212, + /* 920 */ 16, 401, 377, 186, 101, 188, 172, 173, 372, 59, + /* 930 */ 60, 61, 62, 165, 8, 9, 331, 3, 12, 13, + /* 940 */ 14, 15, 16, 331, 331, 195, 196, 49, 377, 212, /* 950 */ 213, 377, 215, 216, 217, 218, 219, 220, 221, 222, /* 960 */ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - /* 970 */ 100, 18, 364, 20, 331, 350, 351, 364, 155, 371, - /* 980 */ 27, 339, 4, 30, 339, 372, 33, 164, 380, 377, - /* 990 */ 377, 22, 379, 103, 166, 105, 106, 355, 108, 166, - /* 1000 */ 355, 48, 112, 50, 35, 101, 53, 364, 138, 365, - /* 1010 */ 339, 339, 369, 0, 372, 372, 233, 372, 235, 20, - /* 1020 */ 377, 408, 379, 133, 365, 412, 355, 355, 415, 416, - /* 1030 */ 417, 418, 419, 420, 352, 422, 354, 331, 331, 100, - /* 1040 */ 427, 20, 429, 372, 372, 331, 433, 434, 178, 179, - /* 1050 */ 180, 408, 99, 183, 339, 412, 20, 444, 415, 416, - /* 1060 */ 417, 418, 419, 420, 111, 422, 97, 1, 2, 22, - /* 1070 */ 355, 331, 202, 0, 165, 205, 63, 207, 208, 209, - /* 1080 */ 210, 211, 35, 377, 377, 331, 331, 372, 331, 331, - /* 1090 */ 426, 377, 428, 140, 168, 22, 143, 144, 145, 146, + /* 970 */ 100, 18, 364, 20, 331, 247, 248, 364, 331, 371, + /* 980 */ 27, 365, 377, 30, 339, 372, 33, 248, 380, 377, + /* 990 */ 377, 168, 379, 437, 438, 439, 22, 441, 442, 331, + /* 1000 */ 355, 48, 365, 50, 236, 101, 53, 364, 138, 35, + /* 1010 */ 339, 339, 369, 353, 246, 372, 0, 372, 136, 137, + /* 1020 */ 377, 408, 379, 339, 377, 412, 355, 355, 415, 416, + /* 1030 */ 417, 418, 419, 420, 233, 422, 235, 331, 331, 355, + /* 1040 */ 427, 100, 429, 372, 372, 377, 433, 434, 178, 179, + /* 1050 */ 180, 408, 99, 183, 339, 412, 372, 444, 415, 416, + /* 1060 */ 417, 418, 419, 420, 111, 422, 426, 331, 428, 22, + /* 1070 */ 355, 97, 202, 44, 426, 205, 428, 207, 208, 209, + /* 1080 */ 210, 211, 35, 377, 377, 20, 331, 372, 331, 331, + /* 1090 */ 365, 96, 345, 140, 168, 250, 143, 144, 145, 146, /* 1100 */ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - /* 1110 */ 157, 158, 159, 339, 161, 162, 163, 377, 71, 249, - /* 1120 */ 339, 44, 364, 339, 185, 339, 187, 339, 401, 355, - /* 1130 */ 372, 377, 377, 44, 377, 377, 355, 379, 331, 355, - /* 1140 */ 372, 355, 248, 355, 97, 236, 372, 360, 372, 357, - /* 1150 */ 211, 383, 360, 372, 374, 246, 372, 377, 372, 383, - /* 1160 */ 372, 45, 46, 247, 248, 166, 408, 101, 0, 374, - /* 1170 */ 412, 364, 377, 415, 416, 417, 418, 419, 420, 372, - /* 1180 */ 422, 42, 44, 44, 377, 427, 379, 429, 249, 168, - /* 1190 */ 101, 433, 434, 406, 22, 374, 0, 331, 377, 42, - /* 1200 */ 44, 44, 444, 269, 168, 104, 104, 35, 107, 107, - /* 1210 */ 104, 104, 44, 107, 107, 408, 136, 137, 22, 412, - /* 1220 */ 331, 58, 415, 416, 417, 418, 419, 420, 250, 422, - /* 1230 */ 364, 353, 44, 186, 427, 188, 429, 198, 372, 200, - /* 1240 */ 433, 434, 0, 377, 35, 379, 44, 96, 1, 2, - /* 1250 */ 332, 444, 387, 364, 64, 44, 44, 101, 13, 212, - /* 1260 */ 213, 372, 469, 44, 22, 102, 377, 458, 379, 44, - /* 1270 */ 44, 44, 44, 44, 408, 44, 35, 44, 412, 44, - /* 1280 */ 35, 415, 416, 417, 418, 419, 420, 47, 422, 101, - /* 1290 */ 44, 341, 44, 427, 44, 429, 44, 408, 331, 433, - /* 1300 */ 434, 412, 44, 101, 415, 416, 417, 418, 419, 420, - /* 1310 */ 444, 422, 101, 101, 12, 13, 427, 341, 429, 168, - /* 1320 */ 101, 0, 433, 434, 22, 35, 101, 101, 101, 101, - /* 1330 */ 101, 364, 101, 444, 101, 33, 101, 35, 452, 372, - /* 1340 */ 100, 13, 387, 33, 377, 364, 379, 101, 271, 101, - /* 1350 */ 338, 101, 387, 101, 443, 376, 435, 331, 48, 101, - /* 1360 */ 58, 71, 462, 35, 54, 55, 56, 57, 58, 446, - /* 1370 */ 49, 251, 410, 71, 48, 408, 184, 409, 398, 412, - /* 1380 */ 331, 42, 415, 416, 417, 418, 419, 420, 384, 422, - /* 1390 */ 364, 20, 387, 384, 427, 165, 429, 188, 372, 97, - /* 1400 */ 433, 434, 212, 377, 382, 379, 20, 339, 339, 99, - /* 1410 */ 382, 273, 102, 364, 384, 382, 98, 95, 339, 349, - /* 1420 */ 348, 372, 347, 94, 339, 339, 377, 396, 379, 188, - /* 1430 */ 339, 20, 333, 333, 408, 20, 20, 403, 412, 345, - /* 1440 */ 379, 415, 416, 417, 418, 419, 420, 20, 422, 345, - /* 1450 */ 340, 20, 397, 427, 345, 429, 345, 408, 340, 433, - /* 1460 */ 434, 412, 331, 339, 415, 416, 417, 418, 419, 420, - /* 1470 */ 345, 422, 441, 345, 345, 52, 445, 342, 429, 169, - /* 1480 */ 170, 333, 433, 434, 174, 342, 176, 364, 186, 339, - /* 1490 */ 188, 460, 461, 333, 364, 364, 465, 466, 364, 377, - /* 1500 */ 364, 364, 192, 372, 364, 364, 364, 201, 377, 364, - /* 1510 */ 379, 331, 407, 364, 212, 213, 364, 100, 405, 343, - /* 1520 */ 403, 377, 191, 377, 343, 339, 379, 225, 226, 227, - /* 1530 */ 228, 229, 230, 231, 331, 402, 377, 258, 451, 408, - /* 1540 */ 387, 387, 257, 412, 364, 177, 415, 416, 417, 418, - /* 1550 */ 419, 420, 372, 422, 392, 377, 392, 377, 266, 379, - /* 1560 */ 429, 377, 377, 451, 433, 434, 451, 364, 454, 268, - /* 1570 */ 267, 450, 453, 470, 448, 372, 449, 252, 248, 410, - /* 1580 */ 377, 272, 379, 275, 270, 372, 20, 414, 408, 340, - /* 1590 */ 339, 20, 412, 392, 390, 415, 416, 417, 418, 419, - /* 1600 */ 420, 377, 422, 343, 343, 170, 331, 392, 343, 429, - /* 1610 */ 389, 408, 343, 433, 434, 412, 377, 100, 415, 416, - /* 1620 */ 417, 418, 419, 420, 421, 422, 423, 424, 463, 331, - /* 1630 */ 464, 377, 377, 377, 377, 372, 360, 432, 100, 364, - /* 1640 */ 368, 377, 354, 19, 339, 36, 334, 372, 333, 358, - /* 1650 */ 343, 358, 377, 358, 379, 344, 329, 33, 399, 393, - /* 1660 */ 393, 0, 364, 331, 0, 0, 404, 42, 0, 35, + /* 1110 */ 157, 158, 159, 377, 161, 162, 163, 370, 71, 249, + /* 1120 */ 339, 44, 364, 339, 339, 339, 185, 352, 187, 354, + /* 1130 */ 372, 372, 377, 387, 377, 377, 355, 379, 331, 355, + /* 1140 */ 355, 355, 383, 372, 97, 129, 130, 131, 132, 133, + /* 1150 */ 134, 135, 211, 372, 383, 360, 372, 372, 372, 357, + /* 1160 */ 44, 374, 360, 168, 377, 339, 408, 339, 0, 22, + /* 1170 */ 412, 364, 0, 415, 416, 417, 418, 419, 420, 372, + /* 1180 */ 422, 355, 35, 355, 377, 427, 379, 429, 1, 2, + /* 1190 */ 249, 433, 434, 374, 22, 44, 377, 331, 372, 44, + /* 1200 */ 372, 406, 444, 269, 42, 42, 44, 44, 104, 35, + /* 1210 */ 104, 107, 44, 107, 58, 408, 35, 101, 104, 412, + /* 1220 */ 331, 107, 415, 416, 417, 418, 419, 420, 0, 422, + /* 1230 */ 364, 166, 0, 186, 427, 188, 429, 44, 372, 104, + /* 1240 */ 433, 434, 107, 377, 198, 379, 200, 64, 332, 469, + /* 1250 */ 22, 444, 101, 364, 22, 44, 101, 458, 102, 212, + /* 1260 */ 213, 372, 44, 44, 44, 341, 377, 13, 379, 44, + /* 1270 */ 44, 44, 452, 44, 408, 44, 364, 44, 412, 44, + /* 1280 */ 341, 415, 416, 417, 418, 419, 420, 47, 422, 35, + /* 1290 */ 44, 376, 44, 427, 101, 429, 44, 408, 331, 433, + /* 1300 */ 434, 412, 273, 13, 415, 416, 417, 418, 419, 420, + /* 1310 */ 444, 422, 101, 44, 12, 13, 427, 339, 429, 101, + /* 1320 */ 101, 101, 433, 434, 22, 35, 101, 101, 101, 387, + /* 1330 */ 101, 364, 101, 444, 101, 33, 101, 35, 35, 372, + /* 1340 */ 100, 338, 387, 33, 377, 44, 379, 101, 271, 101, + /* 1350 */ 372, 443, 462, 101, 435, 446, 251, 331, 48, 410, + /* 1360 */ 58, 48, 188, 409, 54, 55, 56, 57, 58, 188, + /* 1370 */ 101, 398, 184, 71, 71, 408, 42, 384, 387, 412, + /* 1380 */ 331, 37, 415, 416, 417, 418, 419, 420, 20, 422, + /* 1390 */ 364, 384, 382, 20, 427, 212, 429, 339, 372, 97, + /* 1400 */ 433, 434, 101, 377, 165, 379, 339, 384, 349, 99, + /* 1410 */ 382, 95, 102, 364, 382, 437, 438, 439, 98, 441, + /* 1420 */ 442, 372, 348, 339, 94, 347, 377, 339, 379, 339, + /* 1430 */ 339, 20, 333, 333, 408, 20, 403, 345, 412, 20, + /* 1440 */ 379, 415, 416, 417, 418, 419, 420, 103, 422, 105, + /* 1450 */ 106, 20, 108, 427, 345, 429, 20, 408, 340, 433, + /* 1460 */ 434, 412, 331, 397, 415, 416, 417, 418, 419, 420, + /* 1470 */ 345, 422, 340, 129, 345, 345, 339, 133, 429, 169, + /* 1480 */ 170, 345, 433, 434, 174, 345, 176, 52, 186, 377, + /* 1490 */ 188, 342, 342, 333, 377, 364, 377, 364, 364, 333, + /* 1500 */ 339, 201, 192, 372, 407, 364, 364, 364, 377, 364, + /* 1510 */ 379, 331, 364, 100, 212, 213, 364, 364, 364, 343, + /* 1520 */ 405, 364, 191, 403, 402, 379, 387, 225, 226, 227, + /* 1530 */ 228, 229, 230, 231, 331, 343, 339, 258, 451, 408, + /* 1540 */ 257, 377, 377, 412, 364, 387, 415, 416, 417, 418, + /* 1550 */ 419, 420, 372, 422, 451, 377, 377, 377, 266, 379, + /* 1560 */ 429, 392, 392, 177, 433, 434, 453, 364, 275, 252, + /* 1570 */ 463, 267, 451, 268, 450, 372, 449, 454, 470, 272, + /* 1580 */ 377, 410, 379, 248, 270, 372, 448, 20, 408, 414, + /* 1590 */ 464, 340, 412, 343, 339, 415, 416, 417, 418, 419, + /* 1600 */ 420, 343, 422, 20, 390, 343, 331, 392, 392, 429, + /* 1610 */ 170, 408, 389, 433, 434, 412, 343, 372, 415, 416, + /* 1620 */ 417, 418, 419, 420, 421, 422, 423, 424, 360, 331, + /* 1630 */ 377, 100, 432, 377, 377, 100, 377, 377, 377, 364, + /* 1640 */ 368, 377, 354, 19, 36, 339, 334, 372, 333, 358, + /* 1650 */ 0, 343, 377, 404, 379, 358, 393, 33, 329, 393, + /* 1660 */ 0, 0, 364, 331, 399, 344, 0, 358, 42, 35, /* 1670 */ 372, 206, 48, 35, 35, 377, 35, 379, 54, 55, /* 1680 */ 56, 57, 58, 408, 206, 0, 35, 412, 35, 331, /* 1690 */ 415, 416, 417, 418, 419, 420, 364, 422, 206, 0, /* 1700 */ 206, 0, 35, 0, 372, 22, 408, 0, 35, 377, - /* 1710 */ 412, 379, 193, 415, 416, 417, 418, 419, 420, 188, - /* 1720 */ 422, 186, 364, 99, 0, 0, 102, 429, 0, 182, + /* 1710 */ 412, 379, 193, 415, 416, 417, 418, 419, 420, 0, + /* 1720 */ 422, 188, 364, 99, 186, 0, 102, 429, 0, 182, /* 1730 */ 372, 181, 434, 0, 0, 377, 47, 379, 0, 0, /* 1740 */ 408, 0, 467, 468, 412, 0, 42, 415, 416, 417, /* 1750 */ 418, 419, 420, 331, 422, 0, 0, 0, 134, 155, @@ -707,17 +707,17 @@ static const YYCODETYPE yy_lookahead[] = { /* 2170 */ 100, 412, 101, 35, 415, 416, 417, 418, 419, 420, /* 2180 */ 331, 422, 35, 408, 100, 35, 101, 412, 101, 100, /* 2190 */ 415, 416, 417, 418, 419, 420, 364, 422, 100, 35, - /* 2200 */ 123, 101, 100, 123, 372, 22, 112, 100, 100, 377, - /* 2210 */ 44, 379, 35, 364, 123, 123, 100, 22, 65, 64, + /* 2200 */ 122, 101, 100, 44, 372, 35, 100, 100, 122, 377, + /* 2210 */ 100, 379, 122, 364, 122, 22, 65, 64, 35, 35, /* 2220 */ 35, 372, 35, 35, 35, 35, 377, 35, 379, 331, - /* 2230 */ 71, 35, 93, 35, 35, 35, 35, 44, 35, 35, - /* 2240 */ 408, 22, 35, 35, 412, 331, 35, 415, 416, 417, - /* 2250 */ 418, 419, 420, 71, 422, 35, 35, 408, 35, 35, - /* 2260 */ 35, 412, 364, 22, 415, 416, 417, 418, 419, 420, - /* 2270 */ 372, 422, 35, 0, 35, 377, 48, 379, 364, 39, - /* 2280 */ 0, 48, 35, 39, 0, 35, 372, 39, 0, 35, - /* 2290 */ 48, 377, 39, 379, 331, 0, 35, 48, 35, 0, - /* 2300 */ 22, 22, 21, 20, 22, 471, 408, 21, 471, 471, + /* 2230 */ 35, 35, 71, 93, 35, 44, 35, 35, 22, 35, + /* 2240 */ 408, 35, 35, 71, 412, 331, 35, 415, 416, 417, + /* 2250 */ 418, 419, 420, 35, 422, 35, 35, 408, 35, 22, + /* 2260 */ 35, 412, 364, 0, 415, 416, 417, 418, 419, 420, + /* 2270 */ 372, 422, 48, 35, 39, 377, 0, 379, 364, 35, + /* 2280 */ 48, 39, 0, 35, 48, 0, 372, 35, 39, 48, + /* 2290 */ 39, 377, 0, 379, 331, 35, 35, 0, 20, 22, + /* 2300 */ 21, 471, 22, 22, 21, 471, 408, 471, 471, 471, /* 2310 */ 412, 471, 471, 415, 416, 417, 418, 419, 420, 331, /* 2320 */ 422, 471, 408, 471, 471, 471, 412, 364, 471, 415, /* 2330 */ 416, 417, 418, 419, 420, 372, 422, 471, 471, 471, @@ -755,53 +755,53 @@ static const YYCODETYPE yy_lookahead[] = { /* 2650 */ 471, 471, 471, 471, 408, 471, 471, 471, 412, 471, /* 2660 */ 471, 415, 416, 417, 418, 419, 420, 471, 422, }; -#define YY_SHIFT_COUNT (751) +#define YY_SHIFT_COUNT (749) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2299) +#define YY_SHIFT_MAX (2297) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 870, 0, 98, 0, 320, 320, 320, 320, 320, 320, /* 10 */ 320, 320, 320, 320, 320, 418, 639, 639, 737, 639, /* 20 */ 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, /* 30 */ 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, /* 40 */ 639, 639, 639, 639, 639, 639, 639, 639, 28, 30, - /* 50 */ 939, 17, 509, 380, 420, 380, 17, 17, 1302, 1302, - /* 60 */ 1302, 380, 1302, 1302, 190, 380, 87, 323, 186, 186, - /* 70 */ 323, 89, 89, 315, 145, 14, 14, 186, 186, 186, - /* 80 */ 186, 186, 186, 186, 221, 186, 186, 226, 87, 186, - /* 90 */ 186, 289, 186, 87, 186, 221, 186, 221, 87, 186, - /* 100 */ 186, 87, 186, 87, 87, 87, 186, 281, 953, 285, + /* 50 */ 941, 17, 599, 352, 409, 352, 17, 17, 1302, 1302, + /* 60 */ 1302, 352, 1302, 1302, 94, 352, 191, 754, 376, 376, + /* 70 */ 754, 89, 89, 213, 145, 14, 14, 376, 376, 376, + /* 80 */ 376, 376, 376, 376, 406, 376, 376, 323, 191, 376, + /* 90 */ 376, 444, 376, 191, 376, 406, 376, 406, 191, 376, + /* 100 */ 376, 191, 376, 191, 191, 191, 376, 425, 953, 285, /* 110 */ 285, 331, 150, 1047, 1047, 1047, 1047, 1047, 1047, 1047, /* 120 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, - /* 130 */ 1047, 1047, 890, 594, 315, 145, 162, 171, 171, 171, - /* 140 */ 1013, 783, 783, 162, 372, 372, 372, 226, 274, 508, - /* 150 */ 87, 485, 87, 485, 485, 488, 703, 244, 244, 244, + /* 130 */ 1047, 1047, 1344, 823, 213, 145, 485, 403, 403, 403, + /* 140 */ 809, 801, 801, 485, 475, 475, 475, 323, 401, 286, + /* 150 */ 191, 516, 191, 516, 516, 504, 624, 244, 244, 244, /* 160 */ 244, 244, 244, 244, 244, 1624, 334, 473, 260, 100, - /* 170 */ 183, 25, 179, 828, 833, 326, 1021, 1116, 352, 1036, - /* 180 */ 916, 894, 934, 916, 1139, 978, 999, 1120, 1326, 1192, - /* 190 */ 1339, 1371, 1339, 1230, 1386, 1386, 1339, 1230, 1230, 1318, - /* 200 */ 1322, 1386, 1329, 1386, 1386, 1386, 1411, 1411, 1415, 226, - /* 210 */ 1416, 226, 1427, 1431, 226, 1427, 226, 226, 226, 1386, - /* 220 */ 226, 1423, 1423, 1411, 87, 87, 87, 87, 87, 87, - /* 230 */ 87, 87, 87, 87, 87, 1386, 1411, 485, 485, 485, - /* 240 */ 1306, 1417, 1415, 281, 1331, 1416, 281, 1386, 1371, 1371, - /* 250 */ 485, 1279, 1285, 485, 1279, 1285, 485, 485, 87, 1292, - /* 260 */ 1368, 1279, 1301, 1303, 1325, 1120, 1308, 1309, 1314, 1330, - /* 270 */ 372, 1566, 1386, 1427, 281, 281, 1571, 1285, 485, 485, - /* 280 */ 485, 485, 485, 1285, 485, 1435, 281, 488, 281, 372, - /* 290 */ 1517, 1538, 485, 703, 1386, 281, 1609, 1411, 2669, 2669, + /* 170 */ 183, 25, 121, 271, 558, 560, 583, 783, 547, 601, + /* 180 */ 728, 739, 934, 728, 1162, 845, 1065, 1105, 1313, 1188, + /* 190 */ 1334, 1368, 1334, 1239, 1373, 1373, 1334, 1239, 1239, 1320, + /* 200 */ 1316, 1373, 1330, 1373, 1373, 1373, 1411, 1411, 1415, 323, + /* 210 */ 1419, 323, 1431, 1436, 323, 1431, 323, 323, 323, 1373, + /* 220 */ 323, 1435, 1435, 1411, 191, 191, 191, 191, 191, 191, + /* 230 */ 191, 191, 191, 191, 191, 1373, 1411, 516, 516, 516, + /* 240 */ 1300, 1413, 1415, 425, 1331, 1419, 425, 1373, 1368, 1368, + /* 250 */ 516, 1279, 1283, 516, 1279, 1283, 516, 516, 191, 1292, + /* 260 */ 1386, 1279, 1305, 1304, 1317, 1105, 1293, 1307, 1314, 1335, + /* 270 */ 475, 1567, 1373, 1431, 425, 425, 1583, 1283, 516, 516, + /* 280 */ 516, 516, 516, 1283, 516, 1440, 425, 504, 425, 475, + /* 290 */ 1531, 1535, 516, 624, 1373, 425, 1608, 1411, 2669, 2669, /* 300 */ 2669, 2669, 2669, 2669, 2669, 2669, 2669, 170, 1310, 534, - /* 310 */ 687, 561, 580, 904, 379, 139, 374, 926, 621, 699, - /* 320 */ 699, 699, 699, 699, 699, 699, 699, 699, 173, 597, - /* 330 */ 27, 27, 439, 451, 823, 294, 419, 969, 856, 387, - /* 340 */ 791, 791, 710, 1066, 909, 710, 710, 710, 31, 1089, - /* 350 */ 1172, 1157, 588, 1168, 1101, 1102, 1106, 1107, 1073, 1196, - /* 360 */ 1242, 1039, 1156, 1188, 1163, 1202, 1211, 1212, 1080, 1077, - /* 370 */ 1138, 1151, 1219, 1225, 1226, 1227, 1228, 1229, 1247, 1231, - /* 380 */ 1209, 1241, 1190, 1233, 1240, 1235, 1246, 1248, 1250, 1252, - /* 390 */ 1258, 101, 1245, 1328, 1290, 1321, 1661, 1664, 1665, 1625, - /* 400 */ 1668, 1634, 1465, 1638, 1639, 1641, 1478, 1685, 1651, 1653, + /* 310 */ 687, 561, 580, 904, 632, 139, 788, 926, 1016, 699, + /* 320 */ 699, 699, 699, 699, 699, 699, 699, 699, 173, 559, + /* 330 */ 27, 27, 209, 230, 514, 689, 657, 974, 592, 750, + /* 340 */ 688, 688, 594, 791, 768, 594, 594, 594, 31, 1116, + /* 350 */ 1147, 1163, 130, 1168, 1104, 1106, 1114, 1135, 1172, 1228, + /* 360 */ 1232, 1046, 1151, 1155, 1156, 1193, 1211, 1218, 882, 1077, + /* 370 */ 1029, 995, 1219, 1220, 1225, 1226, 1227, 1229, 1187, 1231, + /* 380 */ 1174, 1181, 1183, 1233, 1240, 1235, 1246, 1248, 1252, 1269, + /* 390 */ 1301, 91, 1254, 1290, 1303, 898, 1650, 1660, 1661, 1626, + /* 400 */ 1666, 1634, 1465, 1638, 1639, 1641, 1478, 1685, 1651, 1653, /* 410 */ 1492, 1699, 1494, 1701, 1667, 1703, 1683, 1707, 1673, 1519, - /* 420 */ 1531, 1535, 1724, 1725, 1728, 1547, 1550, 1733, 1734, 1689, + /* 420 */ 1533, 1538, 1719, 1725, 1728, 1547, 1550, 1733, 1734, 1689, /* 430 */ 1738, 1739, 1741, 1704, 1745, 1755, 1756, 1757, 1767, 1768, /* 440 */ 1769, 1771, 1604, 1726, 1760, 1607, 1763, 1764, 1765, 1772, /* 450 */ 1779, 1781, 1782, 1783, 1784, 1787, 1788, 1790, 1791, 1792, @@ -827,14 +827,13 @@ static const unsigned short int yy_shift_ofst[] = { /* 650 */ 2047, 2049, 2050, 2055, 2057, 2103, 2059, 2060, 2109, 2061, /* 660 */ 2135, 1947, 2064, 2054, 2065, 2133, 2134, 2070, 2071, 2138, /* 670 */ 2084, 2085, 2147, 2089, 2087, 2150, 2098, 2100, 2164, 2102, - /* 680 */ 2077, 2080, 2091, 2092, 2183, 2094, 2107, 2166, 2108, 2177, - /* 690 */ 2116, 2166, 2166, 2195, 2153, 2155, 2185, 2187, 2188, 2189, - /* 700 */ 2190, 2192, 2196, 2198, 2199, 2200, 2159, 2139, 2193, 2201, - /* 710 */ 2203, 2204, 2219, 2207, 2208, 2211, 2182, 1888, 2220, 1889, - /* 720 */ 2221, 2223, 2224, 2225, 2241, 2237, 2273, 2239, 2228, 2240, - /* 730 */ 2280, 2247, 2233, 2244, 2284, 2250, 2242, 2248, 2288, 2254, - /* 740 */ 2249, 2253, 2295, 2261, 2263, 2299, 2278, 2281, 2279, 2282, - /* 750 */ 2286, 2283, + /* 680 */ 2078, 2086, 2090, 2092, 2106, 2159, 2107, 2170, 2110, 2159, + /* 690 */ 2159, 2193, 2151, 2153, 2183, 2184, 2185, 2187, 2188, 2189, + /* 700 */ 2190, 2192, 2195, 2196, 2161, 2140, 2191, 2199, 2201, 2202, + /* 710 */ 2216, 2204, 2206, 2207, 2172, 1888, 2211, 1889, 2218, 2220, + /* 720 */ 2221, 2223, 2237, 2225, 2263, 2238, 2224, 2235, 2276, 2244, + /* 730 */ 2232, 2242, 2282, 2248, 2236, 2249, 2285, 2252, 2241, 2251, + /* 740 */ 2292, 2260, 2261, 2297, 2277, 2279, 2280, 2281, 2283, 2278, }; #define YY_REDUCE_COUNT (306) #define YY_REDUCE_MIN (-436) @@ -845,110 +844,109 @@ static const short yy_reduce_ofst[] = { /* 20 */ 1358, 1422, 643, 1454, 1479, 1544, 1528, 1593, 1610, 1627, /* 30 */ 1676, 1692, 1710, 1759, 1775, 1832, 1849, 1898, 1914, 1963, /* 40 */ 1988, 2012, 2083, 2105, 2132, 2181, 2197, 2246, -316, -302, - /* 50 */ 157, 247, -256, 257, 375, 1031, 362, 391, -359, -345, - /* 60 */ -339, -436, -75, 402, -380, -178, -354, -195, 318, 332, - /* 70 */ -379, -145, 88, -282, -218, -44, 232, 116, 135, 337, - /* 80 */ 366, 388, 392, 454, -333, 542, 642, 91, -26, 645, - /* 90 */ 671, 241, 672, 236, 715, 377, 774, 427, 405, 781, - /* 100 */ 784, 535, 786, 446, 608, 572, 788, 8, -335, -19, - /* 110 */ -19, -251, -234, -163, -65, 72, 369, 461, 466, 514, - /* 120 */ 518, 547, 571, 574, 612, 706, 707, 714, 740, 754, - /* 130 */ 755, 757, 252, 23, -240, 300, 596, 23, 279, 436, - /* 140 */ 13, 182, 664, 625, 435, 768, 776, 256, 787, -417, - /* 150 */ 214, 780, -305, 795, 821, 792, 682, -364, 423, 507, - /* 160 */ 515, 533, 644, 659, 533, 727, 878, 918, 865, 793, - /* 170 */ 809, 950, 886, 981, 981, 976, 955, 1012, 979, 965, - /* 180 */ 911, 911, 900, 911, 921, 923, 981, 962, 968, 980, - /* 190 */ 1004, 1005, 1009, 1022, 1068, 1069, 1030, 1028, 1033, 1070, - /* 200 */ 1072, 1079, 1075, 1085, 1086, 1091, 1099, 1100, 1034, 1094, - /* 210 */ 1061, 1104, 1110, 1055, 1109, 1118, 1111, 1125, 1128, 1124, - /* 220 */ 1129, 1135, 1143, 1148, 1123, 1130, 1134, 1136, 1137, 1140, - /* 230 */ 1141, 1142, 1145, 1149, 1152, 1150, 1160, 1122, 1144, 1146, - /* 240 */ 1105, 1113, 1117, 1176, 1133, 1147, 1181, 1186, 1153, 1154, - /* 250 */ 1159, 1087, 1162, 1178, 1112, 1164, 1184, 1185, 981, 1114, - /* 260 */ 1119, 1115, 1121, 1127, 1126, 1169, 1103, 1166, 1165, 911, - /* 270 */ 1213, 1173, 1251, 1249, 1260, 1261, 1204, 1201, 1224, 1239, - /* 280 */ 1254, 1255, 1256, 1215, 1257, 1221, 1265, 1276, 1269, 1263, - /* 290 */ 1205, 1272, 1264, 1288, 1305, 1307, 1312, 1315, 1259, 1262, - /* 300 */ 1266, 1267, 1291, 1293, 1295, 1311, 1327, + /* 50 */ 157, 247, -256, -6, 257, 375, 556, 978, -359, -345, + /* 60 */ -339, -436, -29, 402, -380, -178, -354, -195, 354, 366, + /* 70 */ -379, -145, 1, -282, -218, 49, 171, 141, 228, 332, + /* 80 */ 460, 478, 542, 645, -333, 671, 672, 42, 110, 388, + /* 90 */ 684, 99, 715, 361, 781, -44, 784, -43, 241, 785, + /* 100 */ 786, 535, 826, 243, 608, 474, 828, 82, -335, 224, + /* 110 */ 224, -251, 22, -163, -65, 105, 342, 369, 417, 476, + /* 120 */ 545, 571, 574, 605, 612, 647, 668, 706, 707, 736, + /* 130 */ 755, 757, 205, -105, -240, 355, 380, -105, -48, 77, + /* 140 */ 118, 640, 648, 527, -276, 759, 771, 747, 795, -417, + /* 150 */ -167, 468, -305, 787, 819, 802, 775, -364, 264, 390, + /* 160 */ 445, 616, 637, 725, 616, 520, 660, 916, 746, 780, + /* 170 */ 799, 924, 820, 912, 912, 939, 942, 1003, 915, 955, + /* 180 */ 908, 908, 890, 908, 919, 909, 912, 949, 954, 973, + /* 190 */ 993, 991, 1007, 1010, 1058, 1067, 1023, 1028, 1032, 1059, + /* 200 */ 1074, 1084, 1078, 1088, 1090, 1091, 1099, 1100, 1033, 1092, + /* 210 */ 1061, 1109, 1118, 1066, 1125, 1132, 1129, 1130, 1136, 1137, + /* 220 */ 1140, 1149, 1150, 1160, 1133, 1134, 1141, 1142, 1143, 1145, + /* 230 */ 1148, 1152, 1153, 1154, 1157, 1161, 1166, 1112, 1117, 1119, + /* 240 */ 1097, 1115, 1120, 1176, 1122, 1146, 1192, 1197, 1139, 1158, + /* 250 */ 1164, 1087, 1169, 1165, 1103, 1170, 1178, 1179, 912, 1123, + /* 260 */ 1113, 1121, 1124, 1127, 1138, 1171, 1108, 1126, 1107, 908, + /* 270 */ 1213, 1175, 1255, 1251, 1250, 1258, 1214, 1215, 1253, 1256, + /* 280 */ 1257, 1259, 1260, 1216, 1261, 1223, 1262, 1268, 1273, 1245, + /* 290 */ 1200, 1272, 1264, 1288, 1306, 1308, 1312, 1315, 1265, 1249, + /* 300 */ 1263, 1266, 1291, 1297, 1309, 1321, 1329, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 10 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 20 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 30 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 40 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 50 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 60 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 70 */ 1690, 1690, 1690, 1957, 1690, 1690, 1690, 1690, 1690, 1690, - /* 80 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1769, 1690, 1690, - /* 90 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 100 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1767, 1950, 2166, - /* 110 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 120 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 130 */ 1690, 1690, 1690, 2178, 1690, 1690, 1690, 2178, 2178, 2178, - /* 140 */ 1767, 2138, 2138, 1690, 1690, 1690, 1690, 1769, 2011, 1690, - /* 150 */ 1690, 1690, 1690, 1690, 1690, 1885, 1690, 1690, 1690, 1690, - /* 160 */ 1690, 1909, 1690, 1690, 1690, 2003, 1690, 1690, 2203, 2259, - /* 170 */ 1690, 1690, 2206, 1690, 1690, 1690, 1962, 1690, 1838, 2193, - /* 180 */ 2170, 2184, 2243, 2171, 2168, 2187, 1690, 2197, 1690, 1996, - /* 190 */ 1955, 1690, 1955, 1952, 1690, 1690, 1955, 1952, 1952, 1827, - /* 200 */ 1823, 1690, 1821, 1690, 1690, 1690, 1690, 1690, 1690, 1769, - /* 210 */ 1690, 1769, 1690, 1690, 1769, 1690, 1769, 1769, 1769, 1690, - /* 220 */ 1769, 1747, 1747, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 230 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 240 */ 2023, 2009, 1690, 1767, 2005, 1690, 1767, 1690, 1690, 1690, - /* 250 */ 1690, 2214, 2212, 1690, 2214, 2212, 1690, 1690, 1690, 2228, - /* 260 */ 2224, 2214, 2232, 2230, 2199, 2197, 2262, 2249, 2245, 2184, - /* 270 */ 1690, 1690, 1690, 1690, 1767, 1767, 1690, 2212, 1690, 1690, - /* 280 */ 1690, 1690, 1690, 2212, 1690, 1690, 1767, 1690, 1767, 1690, - /* 290 */ 1690, 1854, 1690, 1690, 1690, 1767, 1722, 1690, 1998, 2014, - /* 300 */ 1980, 1980, 1888, 1888, 1888, 1770, 1695, 1690, 1690, 1690, - /* 310 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2227, - /* 320 */ 2226, 2093, 1690, 2142, 2141, 2140, 2131, 2092, 1850, 1690, - /* 330 */ 2091, 2090, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 340 */ 1971, 1970, 2084, 1690, 1690, 2085, 2083, 2082, 1690, 1690, - /* 350 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 360 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2246, - /* 370 */ 2250, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2167, 1690, - /* 380 */ 1690, 1690, 1690, 1690, 2066, 1690, 1690, 1690, 1690, 1690, - /* 390 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 400 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 410 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 420 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 430 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 440 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 450 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 460 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 470 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 480 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 490 */ 1690, 1727, 2071, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 500 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 510 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 520 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 530 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 540 */ 1808, 1807, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 550 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 560 */ 1690, 1690, 1690, 1690, 2075, 1690, 1690, 1690, 1690, 1690, - /* 570 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2242, - /* 580 */ 2200, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 590 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2066, - /* 600 */ 1690, 2225, 1690, 1690, 2240, 1690, 2244, 1690, 1690, 1690, - /* 610 */ 1690, 1690, 1690, 1690, 2177, 2173, 1690, 1690, 2169, 1690, - /* 620 */ 1690, 1690, 1690, 1690, 1690, 1690, 2074, 1690, 1690, 1690, - /* 630 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 640 */ 2065, 1690, 2128, 1690, 1690, 1690, 2162, 1690, 1690, 2113, - /* 650 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 2075, - /* 660 */ 1690, 2078, 1690, 1690, 1690, 1690, 1690, 1882, 1690, 1690, - /* 670 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 680 */ 1867, 1865, 1864, 1863, 1690, 1860, 1690, 1895, 1690, 1690, - /* 690 */ 1690, 1891, 1890, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 700 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1788, 1690, - /* 710 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1780, 1690, 1779, - /* 720 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 730 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 740 */ 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, 1690, - /* 750 */ 1690, 1690, + /* 0 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 10 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 20 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 30 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 40 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 50 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 60 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 70 */ 1687, 1687, 1687, 1953, 1687, 1687, 1687, 1687, 1687, 1687, + /* 80 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1766, 1687, 1687, + /* 90 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 100 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1764, 1946, 2162, + /* 110 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 120 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 130 */ 1687, 1687, 1687, 2174, 1687, 1687, 1687, 2174, 2174, 2174, + /* 140 */ 1764, 2134, 2134, 1687, 1687, 1687, 1687, 1766, 2007, 1687, + /* 150 */ 1687, 1687, 1687, 1687, 1687, 1881, 1687, 1687, 1687, 1687, + /* 160 */ 1687, 1905, 1687, 1687, 1687, 1999, 1687, 1687, 2199, 2255, + /* 170 */ 1687, 1687, 2202, 1687, 1687, 1687, 1958, 1687, 1835, 2189, + /* 180 */ 2166, 2180, 2239, 2167, 2164, 2183, 1687, 2193, 1687, 1992, + /* 190 */ 1951, 1687, 1951, 1948, 1687, 1687, 1951, 1948, 1948, 1824, + /* 200 */ 1820, 1687, 1818, 1687, 1687, 1687, 1687, 1687, 1687, 1766, + /* 210 */ 1687, 1766, 1687, 1687, 1766, 1687, 1766, 1766, 1766, 1687, + /* 220 */ 1766, 1744, 1744, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 230 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 240 */ 2019, 2005, 1687, 1764, 2001, 1687, 1764, 1687, 1687, 1687, + /* 250 */ 1687, 2210, 2208, 1687, 2210, 2208, 1687, 1687, 1687, 2224, + /* 260 */ 2220, 2210, 2228, 2226, 2195, 2193, 2258, 2245, 2241, 2180, + /* 270 */ 1687, 1687, 1687, 1687, 1764, 1764, 1687, 2208, 1687, 1687, + /* 280 */ 1687, 1687, 1687, 2208, 1687, 1687, 1764, 1687, 1764, 1687, + /* 290 */ 1687, 1851, 1687, 1687, 1687, 1764, 1719, 1687, 1994, 2010, + /* 300 */ 1976, 1976, 1884, 1884, 1884, 1767, 1692, 1687, 1687, 1687, + /* 310 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2223, + /* 320 */ 2222, 2089, 1687, 2138, 2137, 2136, 2127, 2088, 1847, 1687, + /* 330 */ 2087, 2086, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 340 */ 1967, 1966, 2080, 1687, 1687, 2081, 2079, 2078, 1687, 1687, + /* 350 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 360 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2242, + /* 370 */ 2246, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2163, 1687, + /* 380 */ 1687, 1687, 1687, 1687, 2062, 1687, 1687, 1687, 1687, 1687, + /* 390 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 400 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 410 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 420 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 430 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 440 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 450 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 460 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 470 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 480 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 490 */ 1687, 1724, 2067, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 500 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 510 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 520 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 530 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 540 */ 1805, 1804, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 550 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 560 */ 1687, 1687, 1687, 1687, 2071, 1687, 1687, 1687, 1687, 1687, + /* 570 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2238, + /* 580 */ 2196, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 590 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2062, + /* 600 */ 1687, 2221, 1687, 1687, 2236, 1687, 2240, 1687, 1687, 1687, + /* 610 */ 1687, 1687, 1687, 1687, 2173, 2169, 1687, 1687, 2165, 1687, + /* 620 */ 1687, 1687, 1687, 1687, 1687, 1687, 2070, 1687, 1687, 1687, + /* 630 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 640 */ 2061, 1687, 2124, 1687, 1687, 1687, 2158, 1687, 1687, 2109, + /* 650 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 2071, + /* 660 */ 1687, 2074, 1687, 1687, 1687, 1687, 1687, 1878, 1687, 1687, + /* 670 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 680 */ 1863, 1861, 1860, 1859, 1687, 1891, 1687, 1687, 1687, 1887, + /* 690 */ 1886, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 700 */ 1687, 1687, 1687, 1687, 1687, 1687, 1785, 1687, 1687, 1687, + /* 710 */ 1687, 1687, 1687, 1687, 1687, 1777, 1687, 1776, 1687, 1687, + /* 720 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 730 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, + /* 740 */ 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, 1687, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1080,7 +1078,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* NK_EQ => nothing */ 0, /* USING => nothing */ 0, /* TAGS => nothing */ - 0, /* COMMENT => nothing */ 0, /* BOOL => nothing */ 0, /* TINYINT => nothing */ 0, /* SMALLINT => nothing */ @@ -1098,6 +1095,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* BLOB => nothing */ 0, /* VARBINARY => nothing */ 0, /* DECIMAL => nothing */ + 0, /* COMMENT => nothing */ 0, /* MAX_DELAY => nothing */ 0, /* WATERMARK => nothing */ 0, /* ROLLUP => nothing */ @@ -1495,24 +1493,24 @@ static const char *const yyTokenName[] = { /* 109 */ "NK_EQ", /* 110 */ "USING", /* 111 */ "TAGS", - /* 112 */ "COMMENT", - /* 113 */ "BOOL", - /* 114 */ "TINYINT", - /* 115 */ "SMALLINT", - /* 116 */ "INT", - /* 117 */ "INTEGER", - /* 118 */ "BIGINT", - /* 119 */ "FLOAT", - /* 120 */ "DOUBLE", - /* 121 */ "BINARY", - /* 122 */ "NCHAR", - /* 123 */ "UNSIGNED", - /* 124 */ "JSON", - /* 125 */ "VARCHAR", - /* 126 */ "MEDIUMBLOB", - /* 127 */ "BLOB", - /* 128 */ "VARBINARY", - /* 129 */ "DECIMAL", + /* 112 */ "BOOL", + /* 113 */ "TINYINT", + /* 114 */ "SMALLINT", + /* 115 */ "INT", + /* 116 */ "INTEGER", + /* 117 */ "BIGINT", + /* 118 */ "FLOAT", + /* 119 */ "DOUBLE", + /* 120 */ "BINARY", + /* 121 */ "NCHAR", + /* 122 */ "UNSIGNED", + /* 123 */ "JSON", + /* 124 */ "VARCHAR", + /* 125 */ "MEDIUMBLOB", + /* 126 */ "BLOB", + /* 127 */ "VARBINARY", + /* 128 */ "DECIMAL", + /* 129 */ "COMMENT", /* 130 */ "MAX_DELAY", /* 131 */ "WATERMARK", /* 132 */ "ROLLUP", @@ -2029,410 +2027,409 @@ static const char *const yyRuleName[] = { /* 165 */ "column_def_list ::= column_def", /* 166 */ "column_def_list ::= column_def_list NK_COMMA column_def", /* 167 */ "column_def ::= column_name type_name", - /* 168 */ "column_def ::= column_name type_name COMMENT NK_STRING", - /* 169 */ "type_name ::= BOOL", - /* 170 */ "type_name ::= TINYINT", - /* 171 */ "type_name ::= SMALLINT", - /* 172 */ "type_name ::= INT", - /* 173 */ "type_name ::= INTEGER", - /* 174 */ "type_name ::= BIGINT", - /* 175 */ "type_name ::= FLOAT", - /* 176 */ "type_name ::= DOUBLE", - /* 177 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 178 */ "type_name ::= TIMESTAMP", - /* 179 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 180 */ "type_name ::= TINYINT UNSIGNED", - /* 181 */ "type_name ::= SMALLINT UNSIGNED", - /* 182 */ "type_name ::= INT UNSIGNED", - /* 183 */ "type_name ::= BIGINT UNSIGNED", - /* 184 */ "type_name ::= JSON", - /* 185 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 186 */ "type_name ::= MEDIUMBLOB", - /* 187 */ "type_name ::= BLOB", - /* 188 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 189 */ "type_name ::= DECIMAL", - /* 190 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 191 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 192 */ "tags_def_opt ::=", - /* 193 */ "tags_def_opt ::= tags_def", - /* 194 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", - /* 195 */ "table_options ::=", - /* 196 */ "table_options ::= table_options COMMENT NK_STRING", - /* 197 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 198 */ "table_options ::= table_options WATERMARK duration_list", - /* 199 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 200 */ "table_options ::= table_options TTL NK_INTEGER", - /* 201 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 202 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 203 */ "alter_table_options ::= alter_table_option", - /* 204 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 205 */ "alter_table_option ::= COMMENT NK_STRING", - /* 206 */ "alter_table_option ::= TTL NK_INTEGER", - /* 207 */ "duration_list ::= duration_literal", - /* 208 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 209 */ "rollup_func_list ::= rollup_func_name", - /* 210 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 211 */ "rollup_func_name ::= function_name", - /* 212 */ "rollup_func_name ::= FIRST", - /* 213 */ "rollup_func_name ::= LAST", - /* 214 */ "col_name_list ::= col_name", - /* 215 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 216 */ "col_name ::= column_name", - /* 217 */ "cmd ::= SHOW DNODES", - /* 218 */ "cmd ::= SHOW USERS", - /* 219 */ "cmd ::= SHOW USER PRIVILEGES", - /* 220 */ "cmd ::= SHOW DATABASES", - /* 221 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", - /* 222 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 223 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 224 */ "cmd ::= SHOW MNODES", - /* 225 */ "cmd ::= SHOW QNODES", - /* 226 */ "cmd ::= SHOW FUNCTIONS", - /* 227 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 228 */ "cmd ::= SHOW STREAMS", - /* 229 */ "cmd ::= SHOW ACCOUNTS", - /* 230 */ "cmd ::= SHOW APPS", - /* 231 */ "cmd ::= SHOW CONNECTIONS", - /* 232 */ "cmd ::= SHOW LICENCES", - /* 233 */ "cmd ::= SHOW GRANTS", - /* 234 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 235 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 236 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 237 */ "cmd ::= SHOW QUERIES", - /* 238 */ "cmd ::= SHOW SCORES", - /* 239 */ "cmd ::= SHOW TOPICS", - /* 240 */ "cmd ::= SHOW VARIABLES", - /* 241 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 242 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 243 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 244 */ "cmd ::= SHOW BNODES", - /* 245 */ "cmd ::= SHOW SNODES", - /* 246 */ "cmd ::= SHOW CLUSTER", - /* 247 */ "cmd ::= SHOW TRANSACTIONS", - /* 248 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 249 */ "cmd ::= SHOW CONSUMERS", - /* 250 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 251 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 252 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 253 */ "cmd ::= SHOW VNODES NK_INTEGER", - /* 254 */ "cmd ::= SHOW VNODES NK_STRING", - /* 255 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 256 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 257 */ "db_name_cond_opt ::=", - /* 258 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 259 */ "like_pattern_opt ::=", - /* 260 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 261 */ "table_name_cond ::= table_name", - /* 262 */ "from_db_opt ::=", - /* 263 */ "from_db_opt ::= FROM db_name", - /* 264 */ "tag_list_opt ::=", - /* 265 */ "tag_list_opt ::= tag_item", - /* 266 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 267 */ "tag_item ::= TBNAME", - /* 268 */ "tag_item ::= QTAGS", - /* 269 */ "tag_item ::= column_name", - /* 270 */ "tag_item ::= column_name column_alias", - /* 271 */ "tag_item ::= column_name AS column_alias", - /* 272 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", - /* 273 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", - /* 274 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 275 */ "full_index_name ::= index_name", - /* 276 */ "full_index_name ::= db_name NK_DOT index_name", - /* 277 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 278 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", - /* 279 */ "func_list ::= func", - /* 280 */ "func_list ::= func_list NK_COMMA func", - /* 281 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 282 */ "sma_func_name ::= function_name", - /* 283 */ "sma_func_name ::= COUNT", - /* 284 */ "sma_func_name ::= FIRST", - /* 285 */ "sma_func_name ::= LAST", - /* 286 */ "sma_func_name ::= LAST_ROW", - /* 287 */ "sma_stream_opt ::=", - /* 288 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 289 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 290 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 291 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 292 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 293 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", - /* 294 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 295 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", - /* 296 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 297 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 298 */ "cmd ::= DESC full_table_name", - /* 299 */ "cmd ::= DESCRIBE full_table_name", - /* 300 */ "cmd ::= RESET QUERY CACHE", - /* 301 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 302 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 303 */ "analyze_opt ::=", - /* 304 */ "analyze_opt ::= ANALYZE", - /* 305 */ "explain_options ::=", - /* 306 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 307 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 308 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 309 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 310 */ "agg_func_opt ::=", - /* 311 */ "agg_func_opt ::= AGGREGATE", - /* 312 */ "bufsize_opt ::=", - /* 313 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 314 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", - /* 315 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 316 */ "col_list_opt ::=", - /* 317 */ "col_list_opt ::= NK_LP col_name_list NK_RP", - /* 318 */ "tag_def_or_ref_opt ::=", - /* 319 */ "tag_def_or_ref_opt ::= tags_def", - /* 320 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", - /* 321 */ "stream_options ::=", - /* 322 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 323 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 324 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 325 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 326 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 327 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 328 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 329 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 330 */ "subtable_opt ::=", - /* 331 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 332 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 333 */ "cmd ::= KILL QUERY NK_STRING", - /* 334 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 335 */ "cmd ::= BALANCE VGROUP", - /* 336 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 337 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 338 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 339 */ "dnode_list ::= DNODE NK_INTEGER", - /* 340 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 341 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 342 */ "cmd ::= query_or_subquery", - /* 343 */ "cmd ::= insert_query", - /* 344 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 345 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 346 */ "literal ::= NK_INTEGER", - /* 347 */ "literal ::= NK_FLOAT", - /* 348 */ "literal ::= NK_STRING", - /* 349 */ "literal ::= NK_BOOL", - /* 350 */ "literal ::= TIMESTAMP NK_STRING", - /* 351 */ "literal ::= duration_literal", - /* 352 */ "literal ::= NULL", - /* 353 */ "literal ::= NK_QUESTION", - /* 354 */ "duration_literal ::= NK_VARIABLE", - /* 355 */ "signed ::= NK_INTEGER", - /* 356 */ "signed ::= NK_PLUS NK_INTEGER", - /* 357 */ "signed ::= NK_MINUS NK_INTEGER", - /* 358 */ "signed ::= NK_FLOAT", - /* 359 */ "signed ::= NK_PLUS NK_FLOAT", - /* 360 */ "signed ::= NK_MINUS NK_FLOAT", - /* 361 */ "signed_literal ::= signed", - /* 362 */ "signed_literal ::= NK_STRING", - /* 363 */ "signed_literal ::= NK_BOOL", - /* 364 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 365 */ "signed_literal ::= duration_literal", - /* 366 */ "signed_literal ::= NULL", - /* 367 */ "signed_literal ::= literal_func", - /* 368 */ "signed_literal ::= NK_QUESTION", - /* 369 */ "literal_list ::= signed_literal", - /* 370 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 371 */ "db_name ::= NK_ID", - /* 372 */ "table_name ::= NK_ID", - /* 373 */ "column_name ::= NK_ID", - /* 374 */ "function_name ::= NK_ID", - /* 375 */ "table_alias ::= NK_ID", - /* 376 */ "column_alias ::= NK_ID", - /* 377 */ "user_name ::= NK_ID", - /* 378 */ "topic_name ::= NK_ID", - /* 379 */ "stream_name ::= NK_ID", - /* 380 */ "cgroup_name ::= NK_ID", - /* 381 */ "index_name ::= NK_ID", - /* 382 */ "expr_or_subquery ::= expression", - /* 383 */ "expression ::= literal", - /* 384 */ "expression ::= pseudo_column", - /* 385 */ "expression ::= column_reference", - /* 386 */ "expression ::= function_expression", - /* 387 */ "expression ::= case_when_expression", - /* 388 */ "expression ::= NK_LP expression NK_RP", - /* 389 */ "expression ::= NK_PLUS expr_or_subquery", - /* 390 */ "expression ::= NK_MINUS expr_or_subquery", - /* 391 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 392 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 393 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 394 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 395 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 396 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 397 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 398 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 399 */ "expression_list ::= expr_or_subquery", - /* 400 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 401 */ "column_reference ::= column_name", - /* 402 */ "column_reference ::= table_name NK_DOT column_name", - /* 403 */ "pseudo_column ::= ROWTS", - /* 404 */ "pseudo_column ::= TBNAME", - /* 405 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 406 */ "pseudo_column ::= QSTART", - /* 407 */ "pseudo_column ::= QEND", - /* 408 */ "pseudo_column ::= QDURATION", - /* 409 */ "pseudo_column ::= WSTART", - /* 410 */ "pseudo_column ::= WEND", - /* 411 */ "pseudo_column ::= WDURATION", - /* 412 */ "pseudo_column ::= IROWTS", - /* 413 */ "pseudo_column ::= ISFILLED", - /* 414 */ "pseudo_column ::= QTAGS", - /* 415 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 416 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 417 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 418 */ "function_expression ::= literal_func", - /* 419 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 420 */ "literal_func ::= NOW", - /* 421 */ "noarg_func ::= NOW", - /* 422 */ "noarg_func ::= TODAY", - /* 423 */ "noarg_func ::= TIMEZONE", - /* 424 */ "noarg_func ::= DATABASE", - /* 425 */ "noarg_func ::= CLIENT_VERSION", - /* 426 */ "noarg_func ::= SERVER_VERSION", - /* 427 */ "noarg_func ::= SERVER_STATUS", - /* 428 */ "noarg_func ::= CURRENT_USER", - /* 429 */ "noarg_func ::= USER", - /* 430 */ "star_func ::= COUNT", - /* 431 */ "star_func ::= FIRST", - /* 432 */ "star_func ::= LAST", - /* 433 */ "star_func ::= LAST_ROW", - /* 434 */ "star_func_para_list ::= NK_STAR", - /* 435 */ "star_func_para_list ::= other_para_list", - /* 436 */ "other_para_list ::= star_func_para", - /* 437 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 438 */ "star_func_para ::= expr_or_subquery", - /* 439 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 440 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 441 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 442 */ "when_then_list ::= when_then_expr", - /* 443 */ "when_then_list ::= when_then_list when_then_expr", - /* 444 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 445 */ "case_when_else_opt ::=", - /* 446 */ "case_when_else_opt ::= ELSE common_expression", - /* 447 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 448 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 449 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 450 */ "predicate ::= expr_or_subquery IS NULL", - /* 451 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 452 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 453 */ "compare_op ::= NK_LT", - /* 454 */ "compare_op ::= NK_GT", - /* 455 */ "compare_op ::= NK_LE", - /* 456 */ "compare_op ::= NK_GE", - /* 457 */ "compare_op ::= NK_NE", - /* 458 */ "compare_op ::= NK_EQ", - /* 459 */ "compare_op ::= LIKE", - /* 460 */ "compare_op ::= NOT LIKE", - /* 461 */ "compare_op ::= MATCH", - /* 462 */ "compare_op ::= NMATCH", - /* 463 */ "compare_op ::= CONTAINS", - /* 464 */ "in_op ::= IN", - /* 465 */ "in_op ::= NOT IN", - /* 466 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 467 */ "boolean_value_expression ::= boolean_primary", - /* 468 */ "boolean_value_expression ::= NOT boolean_primary", - /* 469 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 470 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 471 */ "boolean_primary ::= predicate", - /* 472 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 473 */ "common_expression ::= expr_or_subquery", - /* 474 */ "common_expression ::= boolean_value_expression", - /* 475 */ "from_clause_opt ::=", - /* 476 */ "from_clause_opt ::= FROM table_reference_list", - /* 477 */ "table_reference_list ::= table_reference", - /* 478 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 479 */ "table_reference ::= table_primary", - /* 480 */ "table_reference ::= joined_table", - /* 481 */ "table_primary ::= table_name alias_opt", - /* 482 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 483 */ "table_primary ::= subquery alias_opt", - /* 484 */ "table_primary ::= parenthesized_joined_table", - /* 485 */ "alias_opt ::=", - /* 486 */ "alias_opt ::= table_alias", - /* 487 */ "alias_opt ::= AS table_alias", - /* 488 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 489 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 490 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 491 */ "join_type ::=", - /* 492 */ "join_type ::= INNER", - /* 493 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 494 */ "set_quantifier_opt ::=", - /* 495 */ "set_quantifier_opt ::= DISTINCT", - /* 496 */ "set_quantifier_opt ::= ALL", - /* 497 */ "select_list ::= select_item", - /* 498 */ "select_list ::= select_list NK_COMMA select_item", - /* 499 */ "select_item ::= NK_STAR", - /* 500 */ "select_item ::= common_expression", - /* 501 */ "select_item ::= common_expression column_alias", - /* 502 */ "select_item ::= common_expression AS column_alias", - /* 503 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 504 */ "where_clause_opt ::=", - /* 505 */ "where_clause_opt ::= WHERE search_condition", - /* 506 */ "partition_by_clause_opt ::=", - /* 507 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 508 */ "partition_list ::= partition_item", - /* 509 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 510 */ "partition_item ::= expr_or_subquery", - /* 511 */ "partition_item ::= expr_or_subquery column_alias", - /* 512 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 513 */ "twindow_clause_opt ::=", - /* 514 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 515 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 516 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 517 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 518 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 519 */ "sliding_opt ::=", - /* 520 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 521 */ "fill_opt ::=", - /* 522 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 523 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 524 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", - /* 525 */ "fill_mode ::= NONE", - /* 526 */ "fill_mode ::= PREV", - /* 527 */ "fill_mode ::= NULL", - /* 528 */ "fill_mode ::= NULL_F", - /* 529 */ "fill_mode ::= LINEAR", - /* 530 */ "fill_mode ::= NEXT", - /* 531 */ "group_by_clause_opt ::=", - /* 532 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 533 */ "group_by_list ::= expr_or_subquery", - /* 534 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 535 */ "having_clause_opt ::=", - /* 536 */ "having_clause_opt ::= HAVING search_condition", - /* 537 */ "range_opt ::=", - /* 538 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 539 */ "every_opt ::=", - /* 540 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 541 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 542 */ "query_simple ::= query_specification", - /* 543 */ "query_simple ::= union_query_expression", - /* 544 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 545 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 546 */ "query_simple_or_subquery ::= query_simple", - /* 547 */ "query_simple_or_subquery ::= subquery", - /* 548 */ "query_or_subquery ::= query_expression", - /* 549 */ "query_or_subquery ::= subquery", - /* 550 */ "order_by_clause_opt ::=", - /* 551 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 552 */ "slimit_clause_opt ::=", - /* 553 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 554 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 555 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 556 */ "limit_clause_opt ::=", - /* 557 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 558 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 559 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 560 */ "subquery ::= NK_LP query_expression NK_RP", - /* 561 */ "subquery ::= NK_LP subquery NK_RP", - /* 562 */ "search_condition ::= common_expression", - /* 563 */ "sort_specification_list ::= sort_specification", - /* 564 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 565 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 566 */ "ordering_specification_opt ::=", - /* 567 */ "ordering_specification_opt ::= ASC", - /* 568 */ "ordering_specification_opt ::= DESC", - /* 569 */ "null_ordering_opt ::=", - /* 570 */ "null_ordering_opt ::= NULLS FIRST", - /* 571 */ "null_ordering_opt ::= NULLS LAST", + /* 168 */ "type_name ::= BOOL", + /* 169 */ "type_name ::= TINYINT", + /* 170 */ "type_name ::= SMALLINT", + /* 171 */ "type_name ::= INT", + /* 172 */ "type_name ::= INTEGER", + /* 173 */ "type_name ::= BIGINT", + /* 174 */ "type_name ::= FLOAT", + /* 175 */ "type_name ::= DOUBLE", + /* 176 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 177 */ "type_name ::= TIMESTAMP", + /* 178 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 179 */ "type_name ::= TINYINT UNSIGNED", + /* 180 */ "type_name ::= SMALLINT UNSIGNED", + /* 181 */ "type_name ::= INT UNSIGNED", + /* 182 */ "type_name ::= BIGINT UNSIGNED", + /* 183 */ "type_name ::= JSON", + /* 184 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 185 */ "type_name ::= MEDIUMBLOB", + /* 186 */ "type_name ::= BLOB", + /* 187 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 188 */ "type_name ::= DECIMAL", + /* 189 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 190 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 191 */ "tags_def_opt ::=", + /* 192 */ "tags_def_opt ::= tags_def", + /* 193 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", + /* 194 */ "table_options ::=", + /* 195 */ "table_options ::= table_options COMMENT NK_STRING", + /* 196 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 197 */ "table_options ::= table_options WATERMARK duration_list", + /* 198 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 199 */ "table_options ::= table_options TTL NK_INTEGER", + /* 200 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 201 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 202 */ "alter_table_options ::= alter_table_option", + /* 203 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 204 */ "alter_table_option ::= COMMENT NK_STRING", + /* 205 */ "alter_table_option ::= TTL NK_INTEGER", + /* 206 */ "duration_list ::= duration_literal", + /* 207 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 208 */ "rollup_func_list ::= rollup_func_name", + /* 209 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 210 */ "rollup_func_name ::= function_name", + /* 211 */ "rollup_func_name ::= FIRST", + /* 212 */ "rollup_func_name ::= LAST", + /* 213 */ "col_name_list ::= col_name", + /* 214 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 215 */ "col_name ::= column_name", + /* 216 */ "cmd ::= SHOW DNODES", + /* 217 */ "cmd ::= SHOW USERS", + /* 218 */ "cmd ::= SHOW USER PRIVILEGES", + /* 219 */ "cmd ::= SHOW DATABASES", + /* 220 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", + /* 221 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 222 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 223 */ "cmd ::= SHOW MNODES", + /* 224 */ "cmd ::= SHOW QNODES", + /* 225 */ "cmd ::= SHOW FUNCTIONS", + /* 226 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 227 */ "cmd ::= SHOW STREAMS", + /* 228 */ "cmd ::= SHOW ACCOUNTS", + /* 229 */ "cmd ::= SHOW APPS", + /* 230 */ "cmd ::= SHOW CONNECTIONS", + /* 231 */ "cmd ::= SHOW LICENCES", + /* 232 */ "cmd ::= SHOW GRANTS", + /* 233 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 234 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 235 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 236 */ "cmd ::= SHOW QUERIES", + /* 237 */ "cmd ::= SHOW SCORES", + /* 238 */ "cmd ::= SHOW TOPICS", + /* 239 */ "cmd ::= SHOW VARIABLES", + /* 240 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 241 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 242 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 243 */ "cmd ::= SHOW BNODES", + /* 244 */ "cmd ::= SHOW SNODES", + /* 245 */ "cmd ::= SHOW CLUSTER", + /* 246 */ "cmd ::= SHOW TRANSACTIONS", + /* 247 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 248 */ "cmd ::= SHOW CONSUMERS", + /* 249 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 250 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 251 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 252 */ "cmd ::= SHOW VNODES NK_INTEGER", + /* 253 */ "cmd ::= SHOW VNODES NK_STRING", + /* 254 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 255 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 256 */ "db_name_cond_opt ::=", + /* 257 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 258 */ "like_pattern_opt ::=", + /* 259 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 260 */ "table_name_cond ::= table_name", + /* 261 */ "from_db_opt ::=", + /* 262 */ "from_db_opt ::= FROM db_name", + /* 263 */ "tag_list_opt ::=", + /* 264 */ "tag_list_opt ::= tag_item", + /* 265 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 266 */ "tag_item ::= TBNAME", + /* 267 */ "tag_item ::= QTAGS", + /* 268 */ "tag_item ::= column_name", + /* 269 */ "tag_item ::= column_name column_alias", + /* 270 */ "tag_item ::= column_name AS column_alias", + /* 271 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options", + /* 272 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP", + /* 273 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 274 */ "full_index_name ::= index_name", + /* 275 */ "full_index_name ::= db_name NK_DOT index_name", + /* 276 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 277 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", + /* 278 */ "func_list ::= func", + /* 279 */ "func_list ::= func_list NK_COMMA func", + /* 280 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 281 */ "sma_func_name ::= function_name", + /* 282 */ "sma_func_name ::= COUNT", + /* 283 */ "sma_func_name ::= FIRST", + /* 284 */ "sma_func_name ::= LAST", + /* 285 */ "sma_func_name ::= LAST_ROW", + /* 286 */ "sma_stream_opt ::=", + /* 287 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 288 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 289 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 290 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 291 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 292 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", + /* 293 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 294 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", + /* 295 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 296 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 297 */ "cmd ::= DESC full_table_name", + /* 298 */ "cmd ::= DESCRIBE full_table_name", + /* 299 */ "cmd ::= RESET QUERY CACHE", + /* 300 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 301 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 302 */ "analyze_opt ::=", + /* 303 */ "analyze_opt ::= ANALYZE", + /* 304 */ "explain_options ::=", + /* 305 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 306 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 307 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 308 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 309 */ "agg_func_opt ::=", + /* 310 */ "agg_func_opt ::= AGGREGATE", + /* 311 */ "bufsize_opt ::=", + /* 312 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 313 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery", + /* 314 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 315 */ "col_list_opt ::=", + /* 316 */ "col_list_opt ::= NK_LP col_name_list NK_RP", + /* 317 */ "tag_def_or_ref_opt ::=", + /* 318 */ "tag_def_or_ref_opt ::= tags_def", + /* 319 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP", + /* 320 */ "stream_options ::=", + /* 321 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 322 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 323 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 324 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 325 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 326 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 327 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 328 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 329 */ "subtable_opt ::=", + /* 330 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 331 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 332 */ "cmd ::= KILL QUERY NK_STRING", + /* 333 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 334 */ "cmd ::= BALANCE VGROUP", + /* 335 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 336 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 337 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 338 */ "dnode_list ::= DNODE NK_INTEGER", + /* 339 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 340 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 341 */ "cmd ::= query_or_subquery", + /* 342 */ "cmd ::= insert_query", + /* 343 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 344 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 345 */ "literal ::= NK_INTEGER", + /* 346 */ "literal ::= NK_FLOAT", + /* 347 */ "literal ::= NK_STRING", + /* 348 */ "literal ::= NK_BOOL", + /* 349 */ "literal ::= TIMESTAMP NK_STRING", + /* 350 */ "literal ::= duration_literal", + /* 351 */ "literal ::= NULL", + /* 352 */ "literal ::= NK_QUESTION", + /* 353 */ "duration_literal ::= NK_VARIABLE", + /* 354 */ "signed ::= NK_INTEGER", + /* 355 */ "signed ::= NK_PLUS NK_INTEGER", + /* 356 */ "signed ::= NK_MINUS NK_INTEGER", + /* 357 */ "signed ::= NK_FLOAT", + /* 358 */ "signed ::= NK_PLUS NK_FLOAT", + /* 359 */ "signed ::= NK_MINUS NK_FLOAT", + /* 360 */ "signed_literal ::= signed", + /* 361 */ "signed_literal ::= NK_STRING", + /* 362 */ "signed_literal ::= NK_BOOL", + /* 363 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 364 */ "signed_literal ::= duration_literal", + /* 365 */ "signed_literal ::= NULL", + /* 366 */ "signed_literal ::= literal_func", + /* 367 */ "signed_literal ::= NK_QUESTION", + /* 368 */ "literal_list ::= signed_literal", + /* 369 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 370 */ "db_name ::= NK_ID", + /* 371 */ "table_name ::= NK_ID", + /* 372 */ "column_name ::= NK_ID", + /* 373 */ "function_name ::= NK_ID", + /* 374 */ "table_alias ::= NK_ID", + /* 375 */ "column_alias ::= NK_ID", + /* 376 */ "user_name ::= NK_ID", + /* 377 */ "topic_name ::= NK_ID", + /* 378 */ "stream_name ::= NK_ID", + /* 379 */ "cgroup_name ::= NK_ID", + /* 380 */ "index_name ::= NK_ID", + /* 381 */ "expr_or_subquery ::= expression", + /* 382 */ "expression ::= literal", + /* 383 */ "expression ::= pseudo_column", + /* 384 */ "expression ::= column_reference", + /* 385 */ "expression ::= function_expression", + /* 386 */ "expression ::= case_when_expression", + /* 387 */ "expression ::= NK_LP expression NK_RP", + /* 388 */ "expression ::= NK_PLUS expr_or_subquery", + /* 389 */ "expression ::= NK_MINUS expr_or_subquery", + /* 390 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 391 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 392 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 393 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 394 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 395 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 396 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 397 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 398 */ "expression_list ::= expr_or_subquery", + /* 399 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 400 */ "column_reference ::= column_name", + /* 401 */ "column_reference ::= table_name NK_DOT column_name", + /* 402 */ "pseudo_column ::= ROWTS", + /* 403 */ "pseudo_column ::= TBNAME", + /* 404 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 405 */ "pseudo_column ::= QSTART", + /* 406 */ "pseudo_column ::= QEND", + /* 407 */ "pseudo_column ::= QDURATION", + /* 408 */ "pseudo_column ::= WSTART", + /* 409 */ "pseudo_column ::= WEND", + /* 410 */ "pseudo_column ::= WDURATION", + /* 411 */ "pseudo_column ::= IROWTS", + /* 412 */ "pseudo_column ::= ISFILLED", + /* 413 */ "pseudo_column ::= QTAGS", + /* 414 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 415 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 416 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 417 */ "function_expression ::= literal_func", + /* 418 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 419 */ "literal_func ::= NOW", + /* 420 */ "noarg_func ::= NOW", + /* 421 */ "noarg_func ::= TODAY", + /* 422 */ "noarg_func ::= TIMEZONE", + /* 423 */ "noarg_func ::= DATABASE", + /* 424 */ "noarg_func ::= CLIENT_VERSION", + /* 425 */ "noarg_func ::= SERVER_VERSION", + /* 426 */ "noarg_func ::= SERVER_STATUS", + /* 427 */ "noarg_func ::= CURRENT_USER", + /* 428 */ "noarg_func ::= USER", + /* 429 */ "star_func ::= COUNT", + /* 430 */ "star_func ::= FIRST", + /* 431 */ "star_func ::= LAST", + /* 432 */ "star_func ::= LAST_ROW", + /* 433 */ "star_func_para_list ::= NK_STAR", + /* 434 */ "star_func_para_list ::= other_para_list", + /* 435 */ "other_para_list ::= star_func_para", + /* 436 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 437 */ "star_func_para ::= expr_or_subquery", + /* 438 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 439 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 440 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 441 */ "when_then_list ::= when_then_expr", + /* 442 */ "when_then_list ::= when_then_list when_then_expr", + /* 443 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 444 */ "case_when_else_opt ::=", + /* 445 */ "case_when_else_opt ::= ELSE common_expression", + /* 446 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 447 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 448 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 449 */ "predicate ::= expr_or_subquery IS NULL", + /* 450 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 451 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 452 */ "compare_op ::= NK_LT", + /* 453 */ "compare_op ::= NK_GT", + /* 454 */ "compare_op ::= NK_LE", + /* 455 */ "compare_op ::= NK_GE", + /* 456 */ "compare_op ::= NK_NE", + /* 457 */ "compare_op ::= NK_EQ", + /* 458 */ "compare_op ::= LIKE", + /* 459 */ "compare_op ::= NOT LIKE", + /* 460 */ "compare_op ::= MATCH", + /* 461 */ "compare_op ::= NMATCH", + /* 462 */ "compare_op ::= CONTAINS", + /* 463 */ "in_op ::= IN", + /* 464 */ "in_op ::= NOT IN", + /* 465 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 466 */ "boolean_value_expression ::= boolean_primary", + /* 467 */ "boolean_value_expression ::= NOT boolean_primary", + /* 468 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 469 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 470 */ "boolean_primary ::= predicate", + /* 471 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 472 */ "common_expression ::= expr_or_subquery", + /* 473 */ "common_expression ::= boolean_value_expression", + /* 474 */ "from_clause_opt ::=", + /* 475 */ "from_clause_opt ::= FROM table_reference_list", + /* 476 */ "table_reference_list ::= table_reference", + /* 477 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 478 */ "table_reference ::= table_primary", + /* 479 */ "table_reference ::= joined_table", + /* 480 */ "table_primary ::= table_name alias_opt", + /* 481 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 482 */ "table_primary ::= subquery alias_opt", + /* 483 */ "table_primary ::= parenthesized_joined_table", + /* 484 */ "alias_opt ::=", + /* 485 */ "alias_opt ::= table_alias", + /* 486 */ "alias_opt ::= AS table_alias", + /* 487 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 488 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 489 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 490 */ "join_type ::=", + /* 491 */ "join_type ::= INNER", + /* 492 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 493 */ "set_quantifier_opt ::=", + /* 494 */ "set_quantifier_opt ::= DISTINCT", + /* 495 */ "set_quantifier_opt ::= ALL", + /* 496 */ "select_list ::= select_item", + /* 497 */ "select_list ::= select_list NK_COMMA select_item", + /* 498 */ "select_item ::= NK_STAR", + /* 499 */ "select_item ::= common_expression", + /* 500 */ "select_item ::= common_expression column_alias", + /* 501 */ "select_item ::= common_expression AS column_alias", + /* 502 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 503 */ "where_clause_opt ::=", + /* 504 */ "where_clause_opt ::= WHERE search_condition", + /* 505 */ "partition_by_clause_opt ::=", + /* 506 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 507 */ "partition_list ::= partition_item", + /* 508 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 509 */ "partition_item ::= expr_or_subquery", + /* 510 */ "partition_item ::= expr_or_subquery column_alias", + /* 511 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 512 */ "twindow_clause_opt ::=", + /* 513 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 514 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 515 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 516 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 517 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 518 */ "sliding_opt ::=", + /* 519 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 520 */ "fill_opt ::=", + /* 521 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 522 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 523 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", + /* 524 */ "fill_mode ::= NONE", + /* 525 */ "fill_mode ::= PREV", + /* 526 */ "fill_mode ::= NULL", + /* 527 */ "fill_mode ::= NULL_F", + /* 528 */ "fill_mode ::= LINEAR", + /* 529 */ "fill_mode ::= NEXT", + /* 530 */ "group_by_clause_opt ::=", + /* 531 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 532 */ "group_by_list ::= expr_or_subquery", + /* 533 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 534 */ "having_clause_opt ::=", + /* 535 */ "having_clause_opt ::= HAVING search_condition", + /* 536 */ "range_opt ::=", + /* 537 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 538 */ "every_opt ::=", + /* 539 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 540 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 541 */ "query_simple ::= query_specification", + /* 542 */ "query_simple ::= union_query_expression", + /* 543 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 544 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 545 */ "query_simple_or_subquery ::= query_simple", + /* 546 */ "query_simple_or_subquery ::= subquery", + /* 547 */ "query_or_subquery ::= query_expression", + /* 548 */ "query_or_subquery ::= subquery", + /* 549 */ "order_by_clause_opt ::=", + /* 550 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 551 */ "slimit_clause_opt ::=", + /* 552 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 553 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 554 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 555 */ "limit_clause_opt ::=", + /* 556 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 557 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 558 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 559 */ "subquery ::= NK_LP query_expression NK_RP", + /* 560 */ "subquery ::= NK_LP subquery NK_RP", + /* 561 */ "search_condition ::= common_expression", + /* 562 */ "sort_specification_list ::= sort_specification", + /* 563 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 564 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 565 */ "ordering_specification_opt ::=", + /* 566 */ "ordering_specification_opt ::= ASC", + /* 567 */ "ordering_specification_opt ::= DESC", + /* 568 */ "null_ordering_opt ::=", + /* 569 */ "null_ordering_opt ::= NULLS FIRST", + /* 570 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3220,410 +3217,409 @@ static const struct { { 356, -1 }, /* (165) column_def_list ::= column_def */ { 356, -3 }, /* (166) column_def_list ::= column_def_list NK_COMMA column_def */ { 373, -2 }, /* (167) column_def ::= column_name type_name */ - { 373, -4 }, /* (168) column_def ::= column_name type_name COMMENT NK_STRING */ - { 365, -1 }, /* (169) type_name ::= BOOL */ - { 365, -1 }, /* (170) type_name ::= TINYINT */ - { 365, -1 }, /* (171) type_name ::= SMALLINT */ - { 365, -1 }, /* (172) type_name ::= INT */ - { 365, -1 }, /* (173) type_name ::= INTEGER */ - { 365, -1 }, /* (174) type_name ::= BIGINT */ - { 365, -1 }, /* (175) type_name ::= FLOAT */ - { 365, -1 }, /* (176) type_name ::= DOUBLE */ - { 365, -4 }, /* (177) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 365, -1 }, /* (178) type_name ::= TIMESTAMP */ - { 365, -4 }, /* (179) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 365, -2 }, /* (180) type_name ::= TINYINT UNSIGNED */ - { 365, -2 }, /* (181) type_name ::= SMALLINT UNSIGNED */ - { 365, -2 }, /* (182) type_name ::= INT UNSIGNED */ - { 365, -2 }, /* (183) type_name ::= BIGINT UNSIGNED */ - { 365, -1 }, /* (184) type_name ::= JSON */ - { 365, -4 }, /* (185) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 365, -1 }, /* (186) type_name ::= MEDIUMBLOB */ - { 365, -1 }, /* (187) type_name ::= BLOB */ - { 365, -4 }, /* (188) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 365, -1 }, /* (189) type_name ::= DECIMAL */ - { 365, -4 }, /* (190) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 365, -6 }, /* (191) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 357, 0 }, /* (192) tags_def_opt ::= */ - { 357, -1 }, /* (193) tags_def_opt ::= tags_def */ - { 360, -4 }, /* (194) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 358, 0 }, /* (195) table_options ::= */ - { 358, -3 }, /* (196) table_options ::= table_options COMMENT NK_STRING */ - { 358, -3 }, /* (197) table_options ::= table_options MAX_DELAY duration_list */ - { 358, -3 }, /* (198) table_options ::= table_options WATERMARK duration_list */ - { 358, -5 }, /* (199) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 358, -3 }, /* (200) table_options ::= table_options TTL NK_INTEGER */ - { 358, -5 }, /* (201) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 358, -3 }, /* (202) table_options ::= table_options DELETE_MARK duration_list */ - { 363, -1 }, /* (203) alter_table_options ::= alter_table_option */ - { 363, -2 }, /* (204) alter_table_options ::= alter_table_options alter_table_option */ - { 376, -2 }, /* (205) alter_table_option ::= COMMENT NK_STRING */ - { 376, -2 }, /* (206) alter_table_option ::= TTL NK_INTEGER */ - { 374, -1 }, /* (207) duration_list ::= duration_literal */ - { 374, -3 }, /* (208) duration_list ::= duration_list NK_COMMA duration_literal */ - { 375, -1 }, /* (209) rollup_func_list ::= rollup_func_name */ - { 375, -3 }, /* (210) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 378, -1 }, /* (211) rollup_func_name ::= function_name */ - { 378, -1 }, /* (212) rollup_func_name ::= FIRST */ - { 378, -1 }, /* (213) rollup_func_name ::= LAST */ - { 371, -1 }, /* (214) col_name_list ::= col_name */ - { 371, -3 }, /* (215) col_name_list ::= col_name_list NK_COMMA col_name */ - { 380, -1 }, /* (216) col_name ::= column_name */ - { 328, -2 }, /* (217) cmd ::= SHOW DNODES */ - { 328, -2 }, /* (218) cmd ::= SHOW USERS */ - { 328, -3 }, /* (219) cmd ::= SHOW USER PRIVILEGES */ - { 328, -2 }, /* (220) cmd ::= SHOW DATABASES */ - { 328, -4 }, /* (221) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 328, -4 }, /* (222) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 328, -3 }, /* (223) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 328, -2 }, /* (224) cmd ::= SHOW MNODES */ - { 328, -2 }, /* (225) cmd ::= SHOW QNODES */ - { 328, -2 }, /* (226) cmd ::= SHOW FUNCTIONS */ - { 328, -5 }, /* (227) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 328, -2 }, /* (228) cmd ::= SHOW STREAMS */ - { 328, -2 }, /* (229) cmd ::= SHOW ACCOUNTS */ - { 328, -2 }, /* (230) cmd ::= SHOW APPS */ - { 328, -2 }, /* (231) cmd ::= SHOW CONNECTIONS */ - { 328, -2 }, /* (232) cmd ::= SHOW LICENCES */ - { 328, -2 }, /* (233) cmd ::= SHOW GRANTS */ - { 328, -4 }, /* (234) cmd ::= SHOW CREATE DATABASE db_name */ - { 328, -4 }, /* (235) cmd ::= SHOW CREATE TABLE full_table_name */ - { 328, -4 }, /* (236) cmd ::= SHOW CREATE STABLE full_table_name */ - { 328, -2 }, /* (237) cmd ::= SHOW QUERIES */ - { 328, -2 }, /* (238) cmd ::= SHOW SCORES */ - { 328, -2 }, /* (239) cmd ::= SHOW TOPICS */ - { 328, -2 }, /* (240) cmd ::= SHOW VARIABLES */ - { 328, -3 }, /* (241) cmd ::= SHOW CLUSTER VARIABLES */ - { 328, -3 }, /* (242) cmd ::= SHOW LOCAL VARIABLES */ - { 328, -5 }, /* (243) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - { 328, -2 }, /* (244) cmd ::= SHOW BNODES */ - { 328, -2 }, /* (245) cmd ::= SHOW SNODES */ - { 328, -2 }, /* (246) cmd ::= SHOW CLUSTER */ - { 328, -2 }, /* (247) cmd ::= SHOW TRANSACTIONS */ - { 328, -4 }, /* (248) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 328, -2 }, /* (249) cmd ::= SHOW CONSUMERS */ - { 328, -2 }, /* (250) cmd ::= SHOW SUBSCRIPTIONS */ - { 328, -5 }, /* (251) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 328, -7 }, /* (252) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - { 328, -3 }, /* (253) cmd ::= SHOW VNODES NK_INTEGER */ - { 328, -3 }, /* (254) cmd ::= SHOW VNODES NK_STRING */ - { 328, -3 }, /* (255) cmd ::= SHOW db_name_cond_opt ALIVE */ - { 328, -3 }, /* (256) cmd ::= SHOW CLUSTER ALIVE */ - { 381, 0 }, /* (257) db_name_cond_opt ::= */ - { 381, -2 }, /* (258) db_name_cond_opt ::= db_name NK_DOT */ - { 382, 0 }, /* (259) like_pattern_opt ::= */ - { 382, -2 }, /* (260) like_pattern_opt ::= LIKE NK_STRING */ - { 383, -1 }, /* (261) table_name_cond ::= table_name */ - { 384, 0 }, /* (262) from_db_opt ::= */ - { 384, -2 }, /* (263) from_db_opt ::= FROM db_name */ - { 385, 0 }, /* (264) tag_list_opt ::= */ - { 385, -1 }, /* (265) tag_list_opt ::= tag_item */ - { 385, -3 }, /* (266) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - { 386, -1 }, /* (267) tag_item ::= TBNAME */ - { 386, -1 }, /* (268) tag_item ::= QTAGS */ - { 386, -1 }, /* (269) tag_item ::= column_name */ - { 386, -2 }, /* (270) tag_item ::= column_name column_alias */ - { 386, -3 }, /* (271) tag_item ::= column_name AS column_alias */ - { 328, -8 }, /* (272) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ - { 328, -9 }, /* (273) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ - { 328, -4 }, /* (274) cmd ::= DROP INDEX exists_opt full_index_name */ - { 388, -1 }, /* (275) full_index_name ::= index_name */ - { 388, -3 }, /* (276) full_index_name ::= db_name NK_DOT index_name */ - { 389, -10 }, /* (277) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 389, -12 }, /* (278) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - { 391, -1 }, /* (279) func_list ::= func */ - { 391, -3 }, /* (280) func_list ::= func_list NK_COMMA func */ - { 394, -4 }, /* (281) func ::= sma_func_name NK_LP expression_list NK_RP */ - { 395, -1 }, /* (282) sma_func_name ::= function_name */ - { 395, -1 }, /* (283) sma_func_name ::= COUNT */ - { 395, -1 }, /* (284) sma_func_name ::= FIRST */ - { 395, -1 }, /* (285) sma_func_name ::= LAST */ - { 395, -1 }, /* (286) sma_func_name ::= LAST_ROW */ - { 393, 0 }, /* (287) sma_stream_opt ::= */ - { 393, -3 }, /* (288) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 393, -3 }, /* (289) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 393, -3 }, /* (290) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 328, -6 }, /* (291) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 328, -7 }, /* (292) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 328, -9 }, /* (293) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 328, -7 }, /* (294) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 328, -9 }, /* (295) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 328, -4 }, /* (296) cmd ::= DROP TOPIC exists_opt topic_name */ - { 328, -7 }, /* (297) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 328, -2 }, /* (298) cmd ::= DESC full_table_name */ - { 328, -2 }, /* (299) cmd ::= DESCRIBE full_table_name */ - { 328, -3 }, /* (300) cmd ::= RESET QUERY CACHE */ - { 328, -4 }, /* (301) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 328, -4 }, /* (302) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - { 398, 0 }, /* (303) analyze_opt ::= */ - { 398, -1 }, /* (304) analyze_opt ::= ANALYZE */ - { 399, 0 }, /* (305) explain_options ::= */ - { 399, -3 }, /* (306) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 399, -3 }, /* (307) explain_options ::= explain_options RATIO NK_FLOAT */ - { 328, -10 }, /* (308) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 328, -4 }, /* (309) cmd ::= DROP FUNCTION exists_opt function_name */ - { 401, 0 }, /* (310) agg_func_opt ::= */ - { 401, -1 }, /* (311) agg_func_opt ::= AGGREGATE */ - { 402, 0 }, /* (312) bufsize_opt ::= */ - { 402, -2 }, /* (313) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 328, -12 }, /* (314) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - { 328, -4 }, /* (315) cmd ::= DROP STREAM exists_opt stream_name */ - { 405, 0 }, /* (316) col_list_opt ::= */ - { 405, -3 }, /* (317) col_list_opt ::= NK_LP col_name_list NK_RP */ - { 406, 0 }, /* (318) tag_def_or_ref_opt ::= */ - { 406, -1 }, /* (319) tag_def_or_ref_opt ::= tags_def */ - { 406, -4 }, /* (320) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - { 404, 0 }, /* (321) stream_options ::= */ - { 404, -3 }, /* (322) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 404, -3 }, /* (323) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 404, -4 }, /* (324) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 404, -3 }, /* (325) stream_options ::= stream_options WATERMARK duration_literal */ - { 404, -4 }, /* (326) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 404, -3 }, /* (327) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 404, -3 }, /* (328) stream_options ::= stream_options DELETE_MARK duration_literal */ - { 404, -4 }, /* (329) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - { 407, 0 }, /* (330) subtable_opt ::= */ - { 407, -4 }, /* (331) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 328, -3 }, /* (332) cmd ::= KILL CONNECTION NK_INTEGER */ - { 328, -3 }, /* (333) cmd ::= KILL QUERY NK_STRING */ - { 328, -3 }, /* (334) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 328, -2 }, /* (335) cmd ::= BALANCE VGROUP */ - { 328, -4 }, /* (336) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 328, -4 }, /* (337) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 328, -3 }, /* (338) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 409, -2 }, /* (339) dnode_list ::= DNODE NK_INTEGER */ - { 409, -3 }, /* (340) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 328, -4 }, /* (341) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 328, -1 }, /* (342) cmd ::= query_or_subquery */ - { 328, -1 }, /* (343) cmd ::= insert_query */ - { 400, -7 }, /* (344) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 400, -4 }, /* (345) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - { 331, -1 }, /* (346) literal ::= NK_INTEGER */ - { 331, -1 }, /* (347) literal ::= NK_FLOAT */ - { 331, -1 }, /* (348) literal ::= NK_STRING */ - { 331, -1 }, /* (349) literal ::= NK_BOOL */ - { 331, -2 }, /* (350) literal ::= TIMESTAMP NK_STRING */ - { 331, -1 }, /* (351) literal ::= duration_literal */ - { 331, -1 }, /* (352) literal ::= NULL */ - { 331, -1 }, /* (353) literal ::= NK_QUESTION */ - { 377, -1 }, /* (354) duration_literal ::= NK_VARIABLE */ - { 411, -1 }, /* (355) signed ::= NK_INTEGER */ - { 411, -2 }, /* (356) signed ::= NK_PLUS NK_INTEGER */ - { 411, -2 }, /* (357) signed ::= NK_MINUS NK_INTEGER */ - { 411, -1 }, /* (358) signed ::= NK_FLOAT */ - { 411, -2 }, /* (359) signed ::= NK_PLUS NK_FLOAT */ - { 411, -2 }, /* (360) signed ::= NK_MINUS NK_FLOAT */ - { 366, -1 }, /* (361) signed_literal ::= signed */ - { 366, -1 }, /* (362) signed_literal ::= NK_STRING */ - { 366, -1 }, /* (363) signed_literal ::= NK_BOOL */ - { 366, -2 }, /* (364) signed_literal ::= TIMESTAMP NK_STRING */ - { 366, -1 }, /* (365) signed_literal ::= duration_literal */ - { 366, -1 }, /* (366) signed_literal ::= NULL */ - { 366, -1 }, /* (367) signed_literal ::= literal_func */ - { 366, -1 }, /* (368) signed_literal ::= NK_QUESTION */ - { 413, -1 }, /* (369) literal_list ::= signed_literal */ - { 413, -3 }, /* (370) literal_list ::= literal_list NK_COMMA signed_literal */ - { 339, -1 }, /* (371) db_name ::= NK_ID */ - { 372, -1 }, /* (372) table_name ::= NK_ID */ - { 364, -1 }, /* (373) column_name ::= NK_ID */ - { 379, -1 }, /* (374) function_name ::= NK_ID */ - { 414, -1 }, /* (375) table_alias ::= NK_ID */ - { 387, -1 }, /* (376) column_alias ::= NK_ID */ - { 333, -1 }, /* (377) user_name ::= NK_ID */ - { 340, -1 }, /* (378) topic_name ::= NK_ID */ - { 403, -1 }, /* (379) stream_name ::= NK_ID */ - { 397, -1 }, /* (380) cgroup_name ::= NK_ID */ - { 390, -1 }, /* (381) index_name ::= NK_ID */ - { 415, -1 }, /* (382) expr_or_subquery ::= expression */ - { 408, -1 }, /* (383) expression ::= literal */ - { 408, -1 }, /* (384) expression ::= pseudo_column */ - { 408, -1 }, /* (385) expression ::= column_reference */ - { 408, -1 }, /* (386) expression ::= function_expression */ - { 408, -1 }, /* (387) expression ::= case_when_expression */ - { 408, -3 }, /* (388) expression ::= NK_LP expression NK_RP */ - { 408, -2 }, /* (389) expression ::= NK_PLUS expr_or_subquery */ - { 408, -2 }, /* (390) expression ::= NK_MINUS expr_or_subquery */ - { 408, -3 }, /* (391) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 408, -3 }, /* (392) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 408, -3 }, /* (393) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 408, -3 }, /* (394) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 408, -3 }, /* (395) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 408, -3 }, /* (396) expression ::= column_reference NK_ARROW NK_STRING */ - { 408, -3 }, /* (397) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 408, -3 }, /* (398) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 369, -1 }, /* (399) expression_list ::= expr_or_subquery */ - { 369, -3 }, /* (400) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 417, -1 }, /* (401) column_reference ::= column_name */ - { 417, -3 }, /* (402) column_reference ::= table_name NK_DOT column_name */ - { 416, -1 }, /* (403) pseudo_column ::= ROWTS */ - { 416, -1 }, /* (404) pseudo_column ::= TBNAME */ - { 416, -3 }, /* (405) pseudo_column ::= table_name NK_DOT TBNAME */ - { 416, -1 }, /* (406) pseudo_column ::= QSTART */ - { 416, -1 }, /* (407) pseudo_column ::= QEND */ - { 416, -1 }, /* (408) pseudo_column ::= QDURATION */ - { 416, -1 }, /* (409) pseudo_column ::= WSTART */ - { 416, -1 }, /* (410) pseudo_column ::= WEND */ - { 416, -1 }, /* (411) pseudo_column ::= WDURATION */ - { 416, -1 }, /* (412) pseudo_column ::= IROWTS */ - { 416, -1 }, /* (413) pseudo_column ::= ISFILLED */ - { 416, -1 }, /* (414) pseudo_column ::= QTAGS */ - { 418, -4 }, /* (415) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 418, -4 }, /* (416) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 418, -6 }, /* (417) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 418, -1 }, /* (418) function_expression ::= literal_func */ - { 412, -3 }, /* (419) literal_func ::= noarg_func NK_LP NK_RP */ - { 412, -1 }, /* (420) literal_func ::= NOW */ - { 422, -1 }, /* (421) noarg_func ::= NOW */ - { 422, -1 }, /* (422) noarg_func ::= TODAY */ - { 422, -1 }, /* (423) noarg_func ::= TIMEZONE */ - { 422, -1 }, /* (424) noarg_func ::= DATABASE */ - { 422, -1 }, /* (425) noarg_func ::= CLIENT_VERSION */ - { 422, -1 }, /* (426) noarg_func ::= SERVER_VERSION */ - { 422, -1 }, /* (427) noarg_func ::= SERVER_STATUS */ - { 422, -1 }, /* (428) noarg_func ::= CURRENT_USER */ - { 422, -1 }, /* (429) noarg_func ::= USER */ - { 420, -1 }, /* (430) star_func ::= COUNT */ - { 420, -1 }, /* (431) star_func ::= FIRST */ - { 420, -1 }, /* (432) star_func ::= LAST */ - { 420, -1 }, /* (433) star_func ::= LAST_ROW */ - { 421, -1 }, /* (434) star_func_para_list ::= NK_STAR */ - { 421, -1 }, /* (435) star_func_para_list ::= other_para_list */ - { 423, -1 }, /* (436) other_para_list ::= star_func_para */ - { 423, -3 }, /* (437) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 424, -1 }, /* (438) star_func_para ::= expr_or_subquery */ - { 424, -3 }, /* (439) star_func_para ::= table_name NK_DOT NK_STAR */ - { 419, -4 }, /* (440) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 419, -5 }, /* (441) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 425, -1 }, /* (442) when_then_list ::= when_then_expr */ - { 425, -2 }, /* (443) when_then_list ::= when_then_list when_then_expr */ - { 428, -4 }, /* (444) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 426, 0 }, /* (445) case_when_else_opt ::= */ - { 426, -2 }, /* (446) case_when_else_opt ::= ELSE common_expression */ - { 429, -3 }, /* (447) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 429, -5 }, /* (448) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 429, -6 }, /* (449) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 429, -3 }, /* (450) predicate ::= expr_or_subquery IS NULL */ - { 429, -4 }, /* (451) predicate ::= expr_or_subquery IS NOT NULL */ - { 429, -3 }, /* (452) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 430, -1 }, /* (453) compare_op ::= NK_LT */ - { 430, -1 }, /* (454) compare_op ::= NK_GT */ - { 430, -1 }, /* (455) compare_op ::= NK_LE */ - { 430, -1 }, /* (456) compare_op ::= NK_GE */ - { 430, -1 }, /* (457) compare_op ::= NK_NE */ - { 430, -1 }, /* (458) compare_op ::= NK_EQ */ - { 430, -1 }, /* (459) compare_op ::= LIKE */ - { 430, -2 }, /* (460) compare_op ::= NOT LIKE */ - { 430, -1 }, /* (461) compare_op ::= MATCH */ - { 430, -1 }, /* (462) compare_op ::= NMATCH */ - { 430, -1 }, /* (463) compare_op ::= CONTAINS */ - { 431, -1 }, /* (464) in_op ::= IN */ - { 431, -2 }, /* (465) in_op ::= NOT IN */ - { 432, -3 }, /* (466) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 433, -1 }, /* (467) boolean_value_expression ::= boolean_primary */ - { 433, -2 }, /* (468) boolean_value_expression ::= NOT boolean_primary */ - { 433, -3 }, /* (469) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 433, -3 }, /* (470) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 434, -1 }, /* (471) boolean_primary ::= predicate */ - { 434, -3 }, /* (472) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 427, -1 }, /* (473) common_expression ::= expr_or_subquery */ - { 427, -1 }, /* (474) common_expression ::= boolean_value_expression */ - { 435, 0 }, /* (475) from_clause_opt ::= */ - { 435, -2 }, /* (476) from_clause_opt ::= FROM table_reference_list */ - { 436, -1 }, /* (477) table_reference_list ::= table_reference */ - { 436, -3 }, /* (478) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 437, -1 }, /* (479) table_reference ::= table_primary */ - { 437, -1 }, /* (480) table_reference ::= joined_table */ - { 438, -2 }, /* (481) table_primary ::= table_name alias_opt */ - { 438, -4 }, /* (482) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 438, -2 }, /* (483) table_primary ::= subquery alias_opt */ - { 438, -1 }, /* (484) table_primary ::= parenthesized_joined_table */ - { 440, 0 }, /* (485) alias_opt ::= */ - { 440, -1 }, /* (486) alias_opt ::= table_alias */ - { 440, -2 }, /* (487) alias_opt ::= AS table_alias */ - { 442, -3 }, /* (488) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 442, -3 }, /* (489) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 439, -6 }, /* (490) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 443, 0 }, /* (491) join_type ::= */ - { 443, -1 }, /* (492) join_type ::= INNER */ - { 445, -12 }, /* (493) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 446, 0 }, /* (494) set_quantifier_opt ::= */ - { 446, -1 }, /* (495) set_quantifier_opt ::= DISTINCT */ - { 446, -1 }, /* (496) set_quantifier_opt ::= ALL */ - { 447, -1 }, /* (497) select_list ::= select_item */ - { 447, -3 }, /* (498) select_list ::= select_list NK_COMMA select_item */ - { 455, -1 }, /* (499) select_item ::= NK_STAR */ - { 455, -1 }, /* (500) select_item ::= common_expression */ - { 455, -2 }, /* (501) select_item ::= common_expression column_alias */ - { 455, -3 }, /* (502) select_item ::= common_expression AS column_alias */ - { 455, -3 }, /* (503) select_item ::= table_name NK_DOT NK_STAR */ - { 410, 0 }, /* (504) where_clause_opt ::= */ - { 410, -2 }, /* (505) where_clause_opt ::= WHERE search_condition */ - { 448, 0 }, /* (506) partition_by_clause_opt ::= */ - { 448, -3 }, /* (507) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 456, -1 }, /* (508) partition_list ::= partition_item */ - { 456, -3 }, /* (509) partition_list ::= partition_list NK_COMMA partition_item */ - { 457, -1 }, /* (510) partition_item ::= expr_or_subquery */ - { 457, -2 }, /* (511) partition_item ::= expr_or_subquery column_alias */ - { 457, -3 }, /* (512) partition_item ::= expr_or_subquery AS column_alias */ - { 452, 0 }, /* (513) twindow_clause_opt ::= */ - { 452, -6 }, /* (514) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 452, -4 }, /* (515) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 452, -6 }, /* (516) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 452, -8 }, /* (517) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 452, -7 }, /* (518) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - { 392, 0 }, /* (519) sliding_opt ::= */ - { 392, -4 }, /* (520) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 451, 0 }, /* (521) fill_opt ::= */ - { 451, -4 }, /* (522) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 451, -6 }, /* (523) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 451, -6 }, /* (524) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ - { 458, -1 }, /* (525) fill_mode ::= NONE */ - { 458, -1 }, /* (526) fill_mode ::= PREV */ - { 458, -1 }, /* (527) fill_mode ::= NULL */ - { 458, -1 }, /* (528) fill_mode ::= NULL_F */ - { 458, -1 }, /* (529) fill_mode ::= LINEAR */ - { 458, -1 }, /* (530) fill_mode ::= NEXT */ - { 453, 0 }, /* (531) group_by_clause_opt ::= */ - { 453, -3 }, /* (532) group_by_clause_opt ::= GROUP BY group_by_list */ - { 459, -1 }, /* (533) group_by_list ::= expr_or_subquery */ - { 459, -3 }, /* (534) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 454, 0 }, /* (535) having_clause_opt ::= */ - { 454, -2 }, /* (536) having_clause_opt ::= HAVING search_condition */ - { 449, 0 }, /* (537) range_opt ::= */ - { 449, -6 }, /* (538) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 450, 0 }, /* (539) every_opt ::= */ - { 450, -4 }, /* (540) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 460, -4 }, /* (541) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 461, -1 }, /* (542) query_simple ::= query_specification */ - { 461, -1 }, /* (543) query_simple ::= union_query_expression */ - { 465, -4 }, /* (544) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 465, -3 }, /* (545) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 466, -1 }, /* (546) query_simple_or_subquery ::= query_simple */ - { 466, -1 }, /* (547) query_simple_or_subquery ::= subquery */ - { 396, -1 }, /* (548) query_or_subquery ::= query_expression */ - { 396, -1 }, /* (549) query_or_subquery ::= subquery */ - { 462, 0 }, /* (550) order_by_clause_opt ::= */ - { 462, -3 }, /* (551) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 463, 0 }, /* (552) slimit_clause_opt ::= */ - { 463, -2 }, /* (553) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 463, -4 }, /* (554) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 463, -4 }, /* (555) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 464, 0 }, /* (556) limit_clause_opt ::= */ - { 464, -2 }, /* (557) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 464, -4 }, /* (558) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 464, -4 }, /* (559) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 441, -3 }, /* (560) subquery ::= NK_LP query_expression NK_RP */ - { 441, -3 }, /* (561) subquery ::= NK_LP subquery NK_RP */ - { 444, -1 }, /* (562) search_condition ::= common_expression */ - { 467, -1 }, /* (563) sort_specification_list ::= sort_specification */ - { 467, -3 }, /* (564) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 468, -3 }, /* (565) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 469, 0 }, /* (566) ordering_specification_opt ::= */ - { 469, -1 }, /* (567) ordering_specification_opt ::= ASC */ - { 469, -1 }, /* (568) ordering_specification_opt ::= DESC */ - { 470, 0 }, /* (569) null_ordering_opt ::= */ - { 470, -2 }, /* (570) null_ordering_opt ::= NULLS FIRST */ - { 470, -2 }, /* (571) null_ordering_opt ::= NULLS LAST */ + { 365, -1 }, /* (168) type_name ::= BOOL */ + { 365, -1 }, /* (169) type_name ::= TINYINT */ + { 365, -1 }, /* (170) type_name ::= SMALLINT */ + { 365, -1 }, /* (171) type_name ::= INT */ + { 365, -1 }, /* (172) type_name ::= INTEGER */ + { 365, -1 }, /* (173) type_name ::= BIGINT */ + { 365, -1 }, /* (174) type_name ::= FLOAT */ + { 365, -1 }, /* (175) type_name ::= DOUBLE */ + { 365, -4 }, /* (176) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (177) type_name ::= TIMESTAMP */ + { 365, -4 }, /* (178) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 365, -2 }, /* (179) type_name ::= TINYINT UNSIGNED */ + { 365, -2 }, /* (180) type_name ::= SMALLINT UNSIGNED */ + { 365, -2 }, /* (181) type_name ::= INT UNSIGNED */ + { 365, -2 }, /* (182) type_name ::= BIGINT UNSIGNED */ + { 365, -1 }, /* (183) type_name ::= JSON */ + { 365, -4 }, /* (184) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (185) type_name ::= MEDIUMBLOB */ + { 365, -1 }, /* (186) type_name ::= BLOB */ + { 365, -4 }, /* (187) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 365, -1 }, /* (188) type_name ::= DECIMAL */ + { 365, -4 }, /* (189) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 365, -6 }, /* (190) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 357, 0 }, /* (191) tags_def_opt ::= */ + { 357, -1 }, /* (192) tags_def_opt ::= tags_def */ + { 360, -4 }, /* (193) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 358, 0 }, /* (194) table_options ::= */ + { 358, -3 }, /* (195) table_options ::= table_options COMMENT NK_STRING */ + { 358, -3 }, /* (196) table_options ::= table_options MAX_DELAY duration_list */ + { 358, -3 }, /* (197) table_options ::= table_options WATERMARK duration_list */ + { 358, -5 }, /* (198) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 358, -3 }, /* (199) table_options ::= table_options TTL NK_INTEGER */ + { 358, -5 }, /* (200) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 358, -3 }, /* (201) table_options ::= table_options DELETE_MARK duration_list */ + { 363, -1 }, /* (202) alter_table_options ::= alter_table_option */ + { 363, -2 }, /* (203) alter_table_options ::= alter_table_options alter_table_option */ + { 376, -2 }, /* (204) alter_table_option ::= COMMENT NK_STRING */ + { 376, -2 }, /* (205) alter_table_option ::= TTL NK_INTEGER */ + { 374, -1 }, /* (206) duration_list ::= duration_literal */ + { 374, -3 }, /* (207) duration_list ::= duration_list NK_COMMA duration_literal */ + { 375, -1 }, /* (208) rollup_func_list ::= rollup_func_name */ + { 375, -3 }, /* (209) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 378, -1 }, /* (210) rollup_func_name ::= function_name */ + { 378, -1 }, /* (211) rollup_func_name ::= FIRST */ + { 378, -1 }, /* (212) rollup_func_name ::= LAST */ + { 371, -1 }, /* (213) col_name_list ::= col_name */ + { 371, -3 }, /* (214) col_name_list ::= col_name_list NK_COMMA col_name */ + { 380, -1 }, /* (215) col_name ::= column_name */ + { 328, -2 }, /* (216) cmd ::= SHOW DNODES */ + { 328, -2 }, /* (217) cmd ::= SHOW USERS */ + { 328, -3 }, /* (218) cmd ::= SHOW USER PRIVILEGES */ + { 328, -2 }, /* (219) cmd ::= SHOW DATABASES */ + { 328, -4 }, /* (220) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 328, -4 }, /* (221) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 328, -3 }, /* (222) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 328, -2 }, /* (223) cmd ::= SHOW MNODES */ + { 328, -2 }, /* (224) cmd ::= SHOW QNODES */ + { 328, -2 }, /* (225) cmd ::= SHOW FUNCTIONS */ + { 328, -5 }, /* (226) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 328, -2 }, /* (227) cmd ::= SHOW STREAMS */ + { 328, -2 }, /* (228) cmd ::= SHOW ACCOUNTS */ + { 328, -2 }, /* (229) cmd ::= SHOW APPS */ + { 328, -2 }, /* (230) cmd ::= SHOW CONNECTIONS */ + { 328, -2 }, /* (231) cmd ::= SHOW LICENCES */ + { 328, -2 }, /* (232) cmd ::= SHOW GRANTS */ + { 328, -4 }, /* (233) cmd ::= SHOW CREATE DATABASE db_name */ + { 328, -4 }, /* (234) cmd ::= SHOW CREATE TABLE full_table_name */ + { 328, -4 }, /* (235) cmd ::= SHOW CREATE STABLE full_table_name */ + { 328, -2 }, /* (236) cmd ::= SHOW QUERIES */ + { 328, -2 }, /* (237) cmd ::= SHOW SCORES */ + { 328, -2 }, /* (238) cmd ::= SHOW TOPICS */ + { 328, -2 }, /* (239) cmd ::= SHOW VARIABLES */ + { 328, -3 }, /* (240) cmd ::= SHOW CLUSTER VARIABLES */ + { 328, -3 }, /* (241) cmd ::= SHOW LOCAL VARIABLES */ + { 328, -5 }, /* (242) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + { 328, -2 }, /* (243) cmd ::= SHOW BNODES */ + { 328, -2 }, /* (244) cmd ::= SHOW SNODES */ + { 328, -2 }, /* (245) cmd ::= SHOW CLUSTER */ + { 328, -2 }, /* (246) cmd ::= SHOW TRANSACTIONS */ + { 328, -4 }, /* (247) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 328, -2 }, /* (248) cmd ::= SHOW CONSUMERS */ + { 328, -2 }, /* (249) cmd ::= SHOW SUBSCRIPTIONS */ + { 328, -5 }, /* (250) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 328, -7 }, /* (251) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + { 328, -3 }, /* (252) cmd ::= SHOW VNODES NK_INTEGER */ + { 328, -3 }, /* (253) cmd ::= SHOW VNODES NK_STRING */ + { 328, -3 }, /* (254) cmd ::= SHOW db_name_cond_opt ALIVE */ + { 328, -3 }, /* (255) cmd ::= SHOW CLUSTER ALIVE */ + { 381, 0 }, /* (256) db_name_cond_opt ::= */ + { 381, -2 }, /* (257) db_name_cond_opt ::= db_name NK_DOT */ + { 382, 0 }, /* (258) like_pattern_opt ::= */ + { 382, -2 }, /* (259) like_pattern_opt ::= LIKE NK_STRING */ + { 383, -1 }, /* (260) table_name_cond ::= table_name */ + { 384, 0 }, /* (261) from_db_opt ::= */ + { 384, -2 }, /* (262) from_db_opt ::= FROM db_name */ + { 385, 0 }, /* (263) tag_list_opt ::= */ + { 385, -1 }, /* (264) tag_list_opt ::= tag_item */ + { 385, -3 }, /* (265) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + { 386, -1 }, /* (266) tag_item ::= TBNAME */ + { 386, -1 }, /* (267) tag_item ::= QTAGS */ + { 386, -1 }, /* (268) tag_item ::= column_name */ + { 386, -2 }, /* (269) tag_item ::= column_name column_alias */ + { 386, -3 }, /* (270) tag_item ::= column_name AS column_alias */ + { 328, -8 }, /* (271) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + { 328, -9 }, /* (272) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + { 328, -4 }, /* (273) cmd ::= DROP INDEX exists_opt full_index_name */ + { 388, -1 }, /* (274) full_index_name ::= index_name */ + { 388, -3 }, /* (275) full_index_name ::= db_name NK_DOT index_name */ + { 389, -10 }, /* (276) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 389, -12 }, /* (277) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + { 391, -1 }, /* (278) func_list ::= func */ + { 391, -3 }, /* (279) func_list ::= func_list NK_COMMA func */ + { 394, -4 }, /* (280) func ::= sma_func_name NK_LP expression_list NK_RP */ + { 395, -1 }, /* (281) sma_func_name ::= function_name */ + { 395, -1 }, /* (282) sma_func_name ::= COUNT */ + { 395, -1 }, /* (283) sma_func_name ::= FIRST */ + { 395, -1 }, /* (284) sma_func_name ::= LAST */ + { 395, -1 }, /* (285) sma_func_name ::= LAST_ROW */ + { 393, 0 }, /* (286) sma_stream_opt ::= */ + { 393, -3 }, /* (287) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 393, -3 }, /* (288) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 393, -3 }, /* (289) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 328, -6 }, /* (290) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 328, -7 }, /* (291) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 328, -9 }, /* (292) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 328, -7 }, /* (293) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 328, -9 }, /* (294) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 328, -4 }, /* (295) cmd ::= DROP TOPIC exists_opt topic_name */ + { 328, -7 }, /* (296) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 328, -2 }, /* (297) cmd ::= DESC full_table_name */ + { 328, -2 }, /* (298) cmd ::= DESCRIBE full_table_name */ + { 328, -3 }, /* (299) cmd ::= RESET QUERY CACHE */ + { 328, -4 }, /* (300) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 328, -4 }, /* (301) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + { 398, 0 }, /* (302) analyze_opt ::= */ + { 398, -1 }, /* (303) analyze_opt ::= ANALYZE */ + { 399, 0 }, /* (304) explain_options ::= */ + { 399, -3 }, /* (305) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 399, -3 }, /* (306) explain_options ::= explain_options RATIO NK_FLOAT */ + { 328, -10 }, /* (307) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 328, -4 }, /* (308) cmd ::= DROP FUNCTION exists_opt function_name */ + { 401, 0 }, /* (309) agg_func_opt ::= */ + { 401, -1 }, /* (310) agg_func_opt ::= AGGREGATE */ + { 402, 0 }, /* (311) bufsize_opt ::= */ + { 402, -2 }, /* (312) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 328, -12 }, /* (313) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + { 328, -4 }, /* (314) cmd ::= DROP STREAM exists_opt stream_name */ + { 405, 0 }, /* (315) col_list_opt ::= */ + { 405, -3 }, /* (316) col_list_opt ::= NK_LP col_name_list NK_RP */ + { 406, 0 }, /* (317) tag_def_or_ref_opt ::= */ + { 406, -1 }, /* (318) tag_def_or_ref_opt ::= tags_def */ + { 406, -4 }, /* (319) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + { 404, 0 }, /* (320) stream_options ::= */ + { 404, -3 }, /* (321) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 404, -3 }, /* (322) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 404, -4 }, /* (323) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 404, -3 }, /* (324) stream_options ::= stream_options WATERMARK duration_literal */ + { 404, -4 }, /* (325) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 404, -3 }, /* (326) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 404, -3 }, /* (327) stream_options ::= stream_options DELETE_MARK duration_literal */ + { 404, -4 }, /* (328) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + { 407, 0 }, /* (329) subtable_opt ::= */ + { 407, -4 }, /* (330) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 328, -3 }, /* (331) cmd ::= KILL CONNECTION NK_INTEGER */ + { 328, -3 }, /* (332) cmd ::= KILL QUERY NK_STRING */ + { 328, -3 }, /* (333) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 328, -2 }, /* (334) cmd ::= BALANCE VGROUP */ + { 328, -4 }, /* (335) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 328, -4 }, /* (336) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 328, -3 }, /* (337) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 409, -2 }, /* (338) dnode_list ::= DNODE NK_INTEGER */ + { 409, -3 }, /* (339) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 328, -4 }, /* (340) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 328, -1 }, /* (341) cmd ::= query_or_subquery */ + { 328, -1 }, /* (342) cmd ::= insert_query */ + { 400, -7 }, /* (343) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 400, -4 }, /* (344) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + { 331, -1 }, /* (345) literal ::= NK_INTEGER */ + { 331, -1 }, /* (346) literal ::= NK_FLOAT */ + { 331, -1 }, /* (347) literal ::= NK_STRING */ + { 331, -1 }, /* (348) literal ::= NK_BOOL */ + { 331, -2 }, /* (349) literal ::= TIMESTAMP NK_STRING */ + { 331, -1 }, /* (350) literal ::= duration_literal */ + { 331, -1 }, /* (351) literal ::= NULL */ + { 331, -1 }, /* (352) literal ::= NK_QUESTION */ + { 377, -1 }, /* (353) duration_literal ::= NK_VARIABLE */ + { 411, -1 }, /* (354) signed ::= NK_INTEGER */ + { 411, -2 }, /* (355) signed ::= NK_PLUS NK_INTEGER */ + { 411, -2 }, /* (356) signed ::= NK_MINUS NK_INTEGER */ + { 411, -1 }, /* (357) signed ::= NK_FLOAT */ + { 411, -2 }, /* (358) signed ::= NK_PLUS NK_FLOAT */ + { 411, -2 }, /* (359) signed ::= NK_MINUS NK_FLOAT */ + { 366, -1 }, /* (360) signed_literal ::= signed */ + { 366, -1 }, /* (361) signed_literal ::= NK_STRING */ + { 366, -1 }, /* (362) signed_literal ::= NK_BOOL */ + { 366, -2 }, /* (363) signed_literal ::= TIMESTAMP NK_STRING */ + { 366, -1 }, /* (364) signed_literal ::= duration_literal */ + { 366, -1 }, /* (365) signed_literal ::= NULL */ + { 366, -1 }, /* (366) signed_literal ::= literal_func */ + { 366, -1 }, /* (367) signed_literal ::= NK_QUESTION */ + { 413, -1 }, /* (368) literal_list ::= signed_literal */ + { 413, -3 }, /* (369) literal_list ::= literal_list NK_COMMA signed_literal */ + { 339, -1 }, /* (370) db_name ::= NK_ID */ + { 372, -1 }, /* (371) table_name ::= NK_ID */ + { 364, -1 }, /* (372) column_name ::= NK_ID */ + { 379, -1 }, /* (373) function_name ::= NK_ID */ + { 414, -1 }, /* (374) table_alias ::= NK_ID */ + { 387, -1 }, /* (375) column_alias ::= NK_ID */ + { 333, -1 }, /* (376) user_name ::= NK_ID */ + { 340, -1 }, /* (377) topic_name ::= NK_ID */ + { 403, -1 }, /* (378) stream_name ::= NK_ID */ + { 397, -1 }, /* (379) cgroup_name ::= NK_ID */ + { 390, -1 }, /* (380) index_name ::= NK_ID */ + { 415, -1 }, /* (381) expr_or_subquery ::= expression */ + { 408, -1 }, /* (382) expression ::= literal */ + { 408, -1 }, /* (383) expression ::= pseudo_column */ + { 408, -1 }, /* (384) expression ::= column_reference */ + { 408, -1 }, /* (385) expression ::= function_expression */ + { 408, -1 }, /* (386) expression ::= case_when_expression */ + { 408, -3 }, /* (387) expression ::= NK_LP expression NK_RP */ + { 408, -2 }, /* (388) expression ::= NK_PLUS expr_or_subquery */ + { 408, -2 }, /* (389) expression ::= NK_MINUS expr_or_subquery */ + { 408, -3 }, /* (390) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 408, -3 }, /* (391) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 408, -3 }, /* (392) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 408, -3 }, /* (393) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 408, -3 }, /* (394) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 408, -3 }, /* (395) expression ::= column_reference NK_ARROW NK_STRING */ + { 408, -3 }, /* (396) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 408, -3 }, /* (397) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 369, -1 }, /* (398) expression_list ::= expr_or_subquery */ + { 369, -3 }, /* (399) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 417, -1 }, /* (400) column_reference ::= column_name */ + { 417, -3 }, /* (401) column_reference ::= table_name NK_DOT column_name */ + { 416, -1 }, /* (402) pseudo_column ::= ROWTS */ + { 416, -1 }, /* (403) pseudo_column ::= TBNAME */ + { 416, -3 }, /* (404) pseudo_column ::= table_name NK_DOT TBNAME */ + { 416, -1 }, /* (405) pseudo_column ::= QSTART */ + { 416, -1 }, /* (406) pseudo_column ::= QEND */ + { 416, -1 }, /* (407) pseudo_column ::= QDURATION */ + { 416, -1 }, /* (408) pseudo_column ::= WSTART */ + { 416, -1 }, /* (409) pseudo_column ::= WEND */ + { 416, -1 }, /* (410) pseudo_column ::= WDURATION */ + { 416, -1 }, /* (411) pseudo_column ::= IROWTS */ + { 416, -1 }, /* (412) pseudo_column ::= ISFILLED */ + { 416, -1 }, /* (413) pseudo_column ::= QTAGS */ + { 418, -4 }, /* (414) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 418, -4 }, /* (415) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 418, -6 }, /* (416) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 418, -1 }, /* (417) function_expression ::= literal_func */ + { 412, -3 }, /* (418) literal_func ::= noarg_func NK_LP NK_RP */ + { 412, -1 }, /* (419) literal_func ::= NOW */ + { 422, -1 }, /* (420) noarg_func ::= NOW */ + { 422, -1 }, /* (421) noarg_func ::= TODAY */ + { 422, -1 }, /* (422) noarg_func ::= TIMEZONE */ + { 422, -1 }, /* (423) noarg_func ::= DATABASE */ + { 422, -1 }, /* (424) noarg_func ::= CLIENT_VERSION */ + { 422, -1 }, /* (425) noarg_func ::= SERVER_VERSION */ + { 422, -1 }, /* (426) noarg_func ::= SERVER_STATUS */ + { 422, -1 }, /* (427) noarg_func ::= CURRENT_USER */ + { 422, -1 }, /* (428) noarg_func ::= USER */ + { 420, -1 }, /* (429) star_func ::= COUNT */ + { 420, -1 }, /* (430) star_func ::= FIRST */ + { 420, -1 }, /* (431) star_func ::= LAST */ + { 420, -1 }, /* (432) star_func ::= LAST_ROW */ + { 421, -1 }, /* (433) star_func_para_list ::= NK_STAR */ + { 421, -1 }, /* (434) star_func_para_list ::= other_para_list */ + { 423, -1 }, /* (435) other_para_list ::= star_func_para */ + { 423, -3 }, /* (436) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 424, -1 }, /* (437) star_func_para ::= expr_or_subquery */ + { 424, -3 }, /* (438) star_func_para ::= table_name NK_DOT NK_STAR */ + { 419, -4 }, /* (439) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 419, -5 }, /* (440) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 425, -1 }, /* (441) when_then_list ::= when_then_expr */ + { 425, -2 }, /* (442) when_then_list ::= when_then_list when_then_expr */ + { 428, -4 }, /* (443) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 426, 0 }, /* (444) case_when_else_opt ::= */ + { 426, -2 }, /* (445) case_when_else_opt ::= ELSE common_expression */ + { 429, -3 }, /* (446) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 429, -5 }, /* (447) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 429, -6 }, /* (448) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 429, -3 }, /* (449) predicate ::= expr_or_subquery IS NULL */ + { 429, -4 }, /* (450) predicate ::= expr_or_subquery IS NOT NULL */ + { 429, -3 }, /* (451) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 430, -1 }, /* (452) compare_op ::= NK_LT */ + { 430, -1 }, /* (453) compare_op ::= NK_GT */ + { 430, -1 }, /* (454) compare_op ::= NK_LE */ + { 430, -1 }, /* (455) compare_op ::= NK_GE */ + { 430, -1 }, /* (456) compare_op ::= NK_NE */ + { 430, -1 }, /* (457) compare_op ::= NK_EQ */ + { 430, -1 }, /* (458) compare_op ::= LIKE */ + { 430, -2 }, /* (459) compare_op ::= NOT LIKE */ + { 430, -1 }, /* (460) compare_op ::= MATCH */ + { 430, -1 }, /* (461) compare_op ::= NMATCH */ + { 430, -1 }, /* (462) compare_op ::= CONTAINS */ + { 431, -1 }, /* (463) in_op ::= IN */ + { 431, -2 }, /* (464) in_op ::= NOT IN */ + { 432, -3 }, /* (465) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 433, -1 }, /* (466) boolean_value_expression ::= boolean_primary */ + { 433, -2 }, /* (467) boolean_value_expression ::= NOT boolean_primary */ + { 433, -3 }, /* (468) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 433, -3 }, /* (469) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 434, -1 }, /* (470) boolean_primary ::= predicate */ + { 434, -3 }, /* (471) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 427, -1 }, /* (472) common_expression ::= expr_or_subquery */ + { 427, -1 }, /* (473) common_expression ::= boolean_value_expression */ + { 435, 0 }, /* (474) from_clause_opt ::= */ + { 435, -2 }, /* (475) from_clause_opt ::= FROM table_reference_list */ + { 436, -1 }, /* (476) table_reference_list ::= table_reference */ + { 436, -3 }, /* (477) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 437, -1 }, /* (478) table_reference ::= table_primary */ + { 437, -1 }, /* (479) table_reference ::= joined_table */ + { 438, -2 }, /* (480) table_primary ::= table_name alias_opt */ + { 438, -4 }, /* (481) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 438, -2 }, /* (482) table_primary ::= subquery alias_opt */ + { 438, -1 }, /* (483) table_primary ::= parenthesized_joined_table */ + { 440, 0 }, /* (484) alias_opt ::= */ + { 440, -1 }, /* (485) alias_opt ::= table_alias */ + { 440, -2 }, /* (486) alias_opt ::= AS table_alias */ + { 442, -3 }, /* (487) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 442, -3 }, /* (488) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 439, -6 }, /* (489) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 443, 0 }, /* (490) join_type ::= */ + { 443, -1 }, /* (491) join_type ::= INNER */ + { 445, -12 }, /* (492) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 446, 0 }, /* (493) set_quantifier_opt ::= */ + { 446, -1 }, /* (494) set_quantifier_opt ::= DISTINCT */ + { 446, -1 }, /* (495) set_quantifier_opt ::= ALL */ + { 447, -1 }, /* (496) select_list ::= select_item */ + { 447, -3 }, /* (497) select_list ::= select_list NK_COMMA select_item */ + { 455, -1 }, /* (498) select_item ::= NK_STAR */ + { 455, -1 }, /* (499) select_item ::= common_expression */ + { 455, -2 }, /* (500) select_item ::= common_expression column_alias */ + { 455, -3 }, /* (501) select_item ::= common_expression AS column_alias */ + { 455, -3 }, /* (502) select_item ::= table_name NK_DOT NK_STAR */ + { 410, 0 }, /* (503) where_clause_opt ::= */ + { 410, -2 }, /* (504) where_clause_opt ::= WHERE search_condition */ + { 448, 0 }, /* (505) partition_by_clause_opt ::= */ + { 448, -3 }, /* (506) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 456, -1 }, /* (507) partition_list ::= partition_item */ + { 456, -3 }, /* (508) partition_list ::= partition_list NK_COMMA partition_item */ + { 457, -1 }, /* (509) partition_item ::= expr_or_subquery */ + { 457, -2 }, /* (510) partition_item ::= expr_or_subquery column_alias */ + { 457, -3 }, /* (511) partition_item ::= expr_or_subquery AS column_alias */ + { 452, 0 }, /* (512) twindow_clause_opt ::= */ + { 452, -6 }, /* (513) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 452, -4 }, /* (514) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 452, -6 }, /* (515) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 452, -8 }, /* (516) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 452, -7 }, /* (517) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + { 392, 0 }, /* (518) sliding_opt ::= */ + { 392, -4 }, /* (519) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 451, 0 }, /* (520) fill_opt ::= */ + { 451, -4 }, /* (521) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 451, -6 }, /* (522) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 451, -6 }, /* (523) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ + { 458, -1 }, /* (524) fill_mode ::= NONE */ + { 458, -1 }, /* (525) fill_mode ::= PREV */ + { 458, -1 }, /* (526) fill_mode ::= NULL */ + { 458, -1 }, /* (527) fill_mode ::= NULL_F */ + { 458, -1 }, /* (528) fill_mode ::= LINEAR */ + { 458, -1 }, /* (529) fill_mode ::= NEXT */ + { 453, 0 }, /* (530) group_by_clause_opt ::= */ + { 453, -3 }, /* (531) group_by_clause_opt ::= GROUP BY group_by_list */ + { 459, -1 }, /* (532) group_by_list ::= expr_or_subquery */ + { 459, -3 }, /* (533) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 454, 0 }, /* (534) having_clause_opt ::= */ + { 454, -2 }, /* (535) having_clause_opt ::= HAVING search_condition */ + { 449, 0 }, /* (536) range_opt ::= */ + { 449, -6 }, /* (537) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 450, 0 }, /* (538) every_opt ::= */ + { 450, -4 }, /* (539) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 460, -4 }, /* (540) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 461, -1 }, /* (541) query_simple ::= query_specification */ + { 461, -1 }, /* (542) query_simple ::= union_query_expression */ + { 465, -4 }, /* (543) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 465, -3 }, /* (544) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 466, -1 }, /* (545) query_simple_or_subquery ::= query_simple */ + { 466, -1 }, /* (546) query_simple_or_subquery ::= subquery */ + { 396, -1 }, /* (547) query_or_subquery ::= query_expression */ + { 396, -1 }, /* (548) query_or_subquery ::= subquery */ + { 462, 0 }, /* (549) order_by_clause_opt ::= */ + { 462, -3 }, /* (550) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 463, 0 }, /* (551) slimit_clause_opt ::= */ + { 463, -2 }, /* (552) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 463, -4 }, /* (553) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 463, -4 }, /* (554) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 464, 0 }, /* (555) limit_clause_opt ::= */ + { 464, -2 }, /* (556) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 464, -4 }, /* (557) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 464, -4 }, /* (558) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 441, -3 }, /* (559) subquery ::= NK_LP query_expression NK_RP */ + { 441, -3 }, /* (560) subquery ::= NK_LP subquery NK_RP */ + { 444, -1 }, /* (561) search_condition ::= common_expression */ + { 467, -1 }, /* (562) sort_specification_list ::= sort_specification */ + { 467, -3 }, /* (563) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 468, -3 }, /* (564) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 469, 0 }, /* (565) ordering_specification_opt ::= */ + { 469, -1 }, /* (566) ordering_specification_opt ::= ASC */ + { 469, -1 }, /* (567) ordering_specification_opt ::= DESC */ + { 470, 0 }, /* (568) null_ordering_opt ::= */ + { 470, -2 }, /* (569) null_ordering_opt ::= NULLS FIRST */ + { 470, -2 }, /* (570) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3816,8 +3812,8 @@ static YYACTIONTYPE yy_reduce( yymsp[-2].minor.yy881 = yylhsminor.yy881; break; case 42: /* priv_level ::= topic_name */ - case 282: /* sma_func_name ::= function_name */ yytestcase(yyruleno==282); - case 486: /* alias_opt ::= table_alias */ yytestcase(yyruleno==486); + case 281: /* sma_func_name ::= function_name */ yytestcase(yyruleno==281); + case 485: /* alias_opt ::= table_alias */ yytestcase(yyruleno==485); { yylhsminor.yy881 = yymsp[0].minor.yy881; } yymsp[0].minor.yy881 = yylhsminor.yy881; break; @@ -3848,49 +3844,49 @@ static YYACTIONTYPE yy_reduce( case 51: /* dnode_endpoint ::= NK_STRING */ case 52: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==52); case 53: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==53); - case 283: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==283); - case 284: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==284); - case 285: /* sma_func_name ::= LAST */ yytestcase(yyruleno==285); - case 286: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==286); - case 371: /* db_name ::= NK_ID */ yytestcase(yyruleno==371); - case 372: /* table_name ::= NK_ID */ yytestcase(yyruleno==372); - case 373: /* column_name ::= NK_ID */ yytestcase(yyruleno==373); - case 374: /* function_name ::= NK_ID */ yytestcase(yyruleno==374); - case 375: /* table_alias ::= NK_ID */ yytestcase(yyruleno==375); - case 376: /* column_alias ::= NK_ID */ yytestcase(yyruleno==376); - case 377: /* user_name ::= NK_ID */ yytestcase(yyruleno==377); - case 378: /* topic_name ::= NK_ID */ yytestcase(yyruleno==378); - case 379: /* stream_name ::= NK_ID */ yytestcase(yyruleno==379); - case 380: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==380); - case 381: /* index_name ::= NK_ID */ yytestcase(yyruleno==381); - case 421: /* noarg_func ::= NOW */ yytestcase(yyruleno==421); - case 422: /* noarg_func ::= TODAY */ yytestcase(yyruleno==422); - case 423: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==423); - case 424: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==424); - case 425: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==425); - case 426: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==426); - case 427: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==427); - case 428: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==428); - case 429: /* noarg_func ::= USER */ yytestcase(yyruleno==429); - case 430: /* star_func ::= COUNT */ yytestcase(yyruleno==430); - case 431: /* star_func ::= FIRST */ yytestcase(yyruleno==431); - case 432: /* star_func ::= LAST */ yytestcase(yyruleno==432); - case 433: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==433); + case 282: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==282); + case 283: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==283); + case 284: /* sma_func_name ::= LAST */ yytestcase(yyruleno==284); + case 285: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==285); + case 370: /* db_name ::= NK_ID */ yytestcase(yyruleno==370); + case 371: /* table_name ::= NK_ID */ yytestcase(yyruleno==371); + case 372: /* column_name ::= NK_ID */ yytestcase(yyruleno==372); + case 373: /* function_name ::= NK_ID */ yytestcase(yyruleno==373); + case 374: /* table_alias ::= NK_ID */ yytestcase(yyruleno==374); + case 375: /* column_alias ::= NK_ID */ yytestcase(yyruleno==375); + case 376: /* user_name ::= NK_ID */ yytestcase(yyruleno==376); + case 377: /* topic_name ::= NK_ID */ yytestcase(yyruleno==377); + case 378: /* stream_name ::= NK_ID */ yytestcase(yyruleno==378); + case 379: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==379); + case 380: /* index_name ::= NK_ID */ yytestcase(yyruleno==380); + case 420: /* noarg_func ::= NOW */ yytestcase(yyruleno==420); + case 421: /* noarg_func ::= TODAY */ yytestcase(yyruleno==421); + case 422: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==422); + case 423: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==423); + case 424: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==424); + case 425: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==425); + case 426: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==426); + case 427: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==427); + case 428: /* noarg_func ::= USER */ yytestcase(yyruleno==428); + case 429: /* star_func ::= COUNT */ yytestcase(yyruleno==429); + case 430: /* star_func ::= FIRST */ yytestcase(yyruleno==430); + case 431: /* star_func ::= LAST */ yytestcase(yyruleno==431); + case 432: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==432); { yylhsminor.yy881 = yymsp[0].minor.yy0; } yymsp[0].minor.yy881 = yylhsminor.yy881; break; case 54: /* force_opt ::= */ case 74: /* not_exists_opt ::= */ yytestcase(yyruleno==74); case 76: /* exists_opt ::= */ yytestcase(yyruleno==76); - case 303: /* analyze_opt ::= */ yytestcase(yyruleno==303); - case 310: /* agg_func_opt ::= */ yytestcase(yyruleno==310); - case 494: /* set_quantifier_opt ::= */ yytestcase(yyruleno==494); + case 302: /* analyze_opt ::= */ yytestcase(yyruleno==302); + case 309: /* agg_func_opt ::= */ yytestcase(yyruleno==309); + case 493: /* set_quantifier_opt ::= */ yytestcase(yyruleno==493); { yymsp[1].minor.yy587 = false; } break; case 55: /* force_opt ::= FORCE */ - case 304: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==304); - case 311: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==311); - case 495: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==495); + case 303: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==303); + case 310: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==310); + case 494: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==494); { yymsp[0].minor.yy587 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ @@ -4119,7 +4115,7 @@ static YYACTIONTYPE yy_reduce( yymsp[0].minor.yy220 = yylhsminor.yy220; break; case 122: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 340: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==340); + case 339: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==339); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; @@ -4135,31 +4131,31 @@ static YYACTIONTYPE yy_reduce( case 155: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==155); case 158: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==158); case 165: /* column_def_list ::= column_def */ yytestcase(yyruleno==165); - case 209: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==209); - case 214: /* col_name_list ::= col_name */ yytestcase(yyruleno==214); - case 265: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==265); - case 279: /* func_list ::= func */ yytestcase(yyruleno==279); - case 369: /* literal_list ::= signed_literal */ yytestcase(yyruleno==369); - case 436: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==436); - case 442: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==442); - case 497: /* select_list ::= select_item */ yytestcase(yyruleno==497); - case 508: /* partition_list ::= partition_item */ yytestcase(yyruleno==508); - case 563: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==563); + case 208: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==208); + case 213: /* col_name_list ::= col_name */ yytestcase(yyruleno==213); + case 264: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==264); + case 278: /* func_list ::= func */ yytestcase(yyruleno==278); + case 368: /* literal_list ::= signed_literal */ yytestcase(yyruleno==368); + case 435: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==435); + case 441: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==441); + case 496: /* select_list ::= select_item */ yytestcase(yyruleno==496); + case 507: /* partition_list ::= partition_item */ yytestcase(yyruleno==507); + case 562: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==562); { yylhsminor.yy220 = createNodeList(pCxt, yymsp[0].minor.yy140); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; case 126: /* retention_list ::= retention_list NK_COMMA retention */ case 159: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==159); case 166: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==166); - case 210: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==210); - case 215: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==215); - case 266: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==266); - case 280: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==280); - case 370: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==370); - case 437: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==437); - case 498: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==498); - case 509: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==509); - case 564: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==564); + case 209: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==209); + case 214: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==214); + case 265: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==265); + case 279: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==279); + case 369: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==369); + case 436: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==436); + case 497: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==497); + case 508: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==508); + case 563: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==563); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; @@ -4168,28 +4164,28 @@ static YYACTIONTYPE yy_reduce( yymsp[-2].minor.yy140 = yylhsminor.yy140; break; case 128: /* speed_opt ::= */ - case 312: /* bufsize_opt ::= */ yytestcase(yyruleno==312); + case 311: /* bufsize_opt ::= */ yytestcase(yyruleno==311); { yymsp[1].minor.yy214 = 0; } break; case 129: /* speed_opt ::= MAX_SPEED NK_INTEGER */ - case 313: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==313); + case 312: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==312); { yymsp[-1].minor.yy214 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 130: /* start_opt ::= */ case 134: /* end_opt ::= */ yytestcase(yyruleno==134); - case 259: /* like_pattern_opt ::= */ yytestcase(yyruleno==259); - case 330: /* subtable_opt ::= */ yytestcase(yyruleno==330); - case 445: /* case_when_else_opt ::= */ yytestcase(yyruleno==445); - case 475: /* from_clause_opt ::= */ yytestcase(yyruleno==475); - case 504: /* where_clause_opt ::= */ yytestcase(yyruleno==504); - case 513: /* twindow_clause_opt ::= */ yytestcase(yyruleno==513); - case 519: /* sliding_opt ::= */ yytestcase(yyruleno==519); - case 521: /* fill_opt ::= */ yytestcase(yyruleno==521); - case 535: /* having_clause_opt ::= */ yytestcase(yyruleno==535); - case 537: /* range_opt ::= */ yytestcase(yyruleno==537); - case 539: /* every_opt ::= */ yytestcase(yyruleno==539); - case 552: /* slimit_clause_opt ::= */ yytestcase(yyruleno==552); - case 556: /* limit_clause_opt ::= */ yytestcase(yyruleno==556); + case 258: /* like_pattern_opt ::= */ yytestcase(yyruleno==258); + case 329: /* subtable_opt ::= */ yytestcase(yyruleno==329); + case 444: /* case_when_else_opt ::= */ yytestcase(yyruleno==444); + case 474: /* from_clause_opt ::= */ yytestcase(yyruleno==474); + case 503: /* where_clause_opt ::= */ yytestcase(yyruleno==503); + case 512: /* twindow_clause_opt ::= */ yytestcase(yyruleno==512); + case 518: /* sliding_opt ::= */ yytestcase(yyruleno==518); + case 520: /* fill_opt ::= */ yytestcase(yyruleno==520); + case 534: /* having_clause_opt ::= */ yytestcase(yyruleno==534); + case 536: /* range_opt ::= */ yytestcase(yyruleno==536); + case 538: /* every_opt ::= */ yytestcase(yyruleno==538); + case 551: /* slimit_clause_opt ::= */ yytestcase(yyruleno==551); + case 555: /* limit_clause_opt ::= */ yytestcase(yyruleno==555); { yymsp[1].minor.yy140 = NULL; } break; case 131: /* start_opt ::= START WITH NK_INTEGER */ @@ -4218,8 +4214,8 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } break; case 143: /* cmd ::= ALTER TABLE alter_table_clause */ - case 342: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==342); - case 343: /* cmd ::= insert_query */ yytestcase(yyruleno==343); + case 341: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==341); + case 342: /* cmd ::= insert_query */ yytestcase(yyruleno==342); { pCxt->pRootNode = yymsp[0].minor.yy140; } break; case 144: /* cmd ::= ALTER STABLE alter_table_clause */ @@ -4266,7 +4262,7 @@ static YYACTIONTYPE yy_reduce( yymsp[-5].minor.yy140 = yylhsminor.yy140; break; case 156: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 443: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==443); + case 442: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==442); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-1].minor.yy220, yymsp[0].minor.yy140); } yymsp[-1].minor.yy220 = yylhsminor.yy220; break; @@ -4279,17 +4275,17 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy140 = yylhsminor.yy140; break; case 161: /* specific_cols_opt ::= */ - case 192: /* tags_def_opt ::= */ yytestcase(yyruleno==192); - case 264: /* tag_list_opt ::= */ yytestcase(yyruleno==264); - case 316: /* col_list_opt ::= */ yytestcase(yyruleno==316); - case 318: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==318); - case 506: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==506); - case 531: /* group_by_clause_opt ::= */ yytestcase(yyruleno==531); - case 550: /* order_by_clause_opt ::= */ yytestcase(yyruleno==550); + case 191: /* tags_def_opt ::= */ yytestcase(yyruleno==191); + case 263: /* tag_list_opt ::= */ yytestcase(yyruleno==263); + case 315: /* col_list_opt ::= */ yytestcase(yyruleno==315); + case 317: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==317); + case 505: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==505); + case 530: /* group_by_clause_opt ::= */ yytestcase(yyruleno==530); + case 549: /* order_by_clause_opt ::= */ yytestcase(yyruleno==549); { yymsp[1].minor.yy220 = NULL; } break; case 162: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 317: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==317); + case 316: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==316); { yymsp[-2].minor.yy220 = yymsp[-1].minor.yy220; } break; case 163: /* full_table_name ::= table_name */ @@ -4304,532 +4300,528 @@ static YYACTIONTYPE yy_reduce( { yylhsminor.yy140 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy881, yymsp[0].minor.yy682, NULL); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 168: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy140 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-2].minor.yy682, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy140 = yylhsminor.yy140; - break; - case 169: /* type_name ::= BOOL */ + case 168: /* type_name ::= BOOL */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 170: /* type_name ::= TINYINT */ + case 169: /* type_name ::= TINYINT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 171: /* type_name ::= SMALLINT */ + case 170: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 172: /* type_name ::= INT */ - case 173: /* type_name ::= INTEGER */ yytestcase(yyruleno==173); + case 171: /* type_name ::= INT */ + case 172: /* type_name ::= INTEGER */ yytestcase(yyruleno==172); { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 174: /* type_name ::= BIGINT */ + case 173: /* type_name ::= BIGINT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 175: /* type_name ::= FLOAT */ + case 174: /* type_name ::= FLOAT */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 176: /* type_name ::= DOUBLE */ + case 175: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 177: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + case 176: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 178: /* type_name ::= TIMESTAMP */ + case 177: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 179: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + case 178: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 180: /* type_name ::= TINYINT UNSIGNED */ + case 179: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 181: /* type_name ::= SMALLINT UNSIGNED */ + case 180: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 182: /* type_name ::= INT UNSIGNED */ + case 181: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 183: /* type_name ::= BIGINT UNSIGNED */ + case 182: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy682 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 184: /* type_name ::= JSON */ + case 183: /* type_name ::= JSON */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 185: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + case 184: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 186: /* type_name ::= MEDIUMBLOB */ + case 185: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 187: /* type_name ::= BLOB */ + case 186: /* type_name ::= BLOB */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 188: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + case 187: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 189: /* type_name ::= DECIMAL */ + case 188: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 190: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + case 189: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 191: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + case 190: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy682 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 193: /* tags_def_opt ::= tags_def */ - case 319: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==319); - case 435: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==435); + case 192: /* tags_def_opt ::= tags_def */ + case 318: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==318); + case 434: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==434); { yylhsminor.yy220 = yymsp[0].minor.yy220; } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 194: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ - case 320: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==320); + case 193: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ + case 319: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==319); { yymsp[-3].minor.yy220 = yymsp[-1].minor.yy220; } break; - case 195: /* table_options ::= */ + case 194: /* table_options ::= */ { yymsp[1].minor.yy140 = createDefaultTableOptions(pCxt); } break; - case 196: /* table_options ::= table_options COMMENT NK_STRING */ + case 195: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 197: /* table_options ::= table_options MAX_DELAY duration_list */ + case 196: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy220); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 198: /* table_options ::= table_options WATERMARK duration_list */ + case 197: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy220); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 199: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + case 198: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-4].minor.yy140, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy220); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 200: /* table_options ::= table_options TTL NK_INTEGER */ + case 199: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 201: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + case 200: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-4].minor.yy140, TABLE_OPTION_SMA, yymsp[-1].minor.yy220); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 202: /* table_options ::= table_options DELETE_MARK duration_list */ + case 201: /* table_options ::= table_options DELETE_MARK duration_list */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-2].minor.yy140, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy220); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 203: /* alter_table_options ::= alter_table_option */ + case 202: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy140 = createAlterTableOptions(pCxt); yylhsminor.yy140 = setTableOption(pCxt, yylhsminor.yy140, yymsp[0].minor.yy809.type, &yymsp[0].minor.yy809.val); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 204: /* alter_table_options ::= alter_table_options alter_table_option */ + case 203: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy140 = setTableOption(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy809.type, &yymsp[0].minor.yy809.val); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 205: /* alter_table_option ::= COMMENT NK_STRING */ + case 204: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy809.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; - case 206: /* alter_table_option ::= TTL NK_INTEGER */ + case 205: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy809.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy809.val = yymsp[0].minor.yy0; } break; - case 207: /* duration_list ::= duration_literal */ - case 399: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==399); + case 206: /* duration_list ::= duration_literal */ + case 398: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==398); { yylhsminor.yy220 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 208: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 400: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==400); + case 207: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 399: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==399); { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 211: /* rollup_func_name ::= function_name */ + case 210: /* rollup_func_name ::= function_name */ { yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[0].minor.yy881, NULL); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 212: /* rollup_func_name ::= FIRST */ - case 213: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==213); - case 268: /* tag_item ::= QTAGS */ yytestcase(yyruleno==268); + case 211: /* rollup_func_name ::= FIRST */ + case 212: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==212); + case 267: /* tag_item ::= QTAGS */ yytestcase(yyruleno==267); { yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 216: /* col_name ::= column_name */ - case 269: /* tag_item ::= column_name */ yytestcase(yyruleno==269); + case 215: /* col_name ::= column_name */ + case 268: /* tag_item ::= column_name */ yytestcase(yyruleno==268); { yylhsminor.yy140 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy881); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 217: /* cmd ::= SHOW DNODES */ + case 216: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 218: /* cmd ::= SHOW USERS */ + case 217: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 219: /* cmd ::= SHOW USER PRIVILEGES */ + case 218: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 220: /* cmd ::= SHOW DATABASES */ + case 219: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; - case 221: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + case 220: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, OP_TYPE_LIKE); } break; - case 222: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + case 221: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, OP_TYPE_LIKE); } break; - case 223: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ + case 222: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy140, NULL, OP_TYPE_LIKE); } break; - case 224: /* cmd ::= SHOW MNODES */ + case 223: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 225: /* cmd ::= SHOW QNODES */ + case 224: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 226: /* cmd ::= SHOW FUNCTIONS */ + case 225: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 227: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + case 226: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy140, yymsp[-1].minor.yy140, OP_TYPE_EQUAL); } break; - case 228: /* cmd ::= SHOW STREAMS */ + case 227: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 229: /* cmd ::= SHOW ACCOUNTS */ + case 228: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 230: /* cmd ::= SHOW APPS */ + case 229: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 231: /* cmd ::= SHOW CONNECTIONS */ + case 230: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 232: /* cmd ::= SHOW LICENCES */ - case 233: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==233); + case 231: /* cmd ::= SHOW LICENCES */ + case 232: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==232); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 234: /* cmd ::= SHOW CREATE DATABASE db_name */ + case 233: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy881); } break; - case 235: /* cmd ::= SHOW CREATE TABLE full_table_name */ + case 234: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy140); } break; - case 236: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 235: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy140); } break; - case 237: /* cmd ::= SHOW QUERIES */ + case 236: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 238: /* cmd ::= SHOW SCORES */ + case 237: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 239: /* cmd ::= SHOW TOPICS */ + case 238: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 240: /* cmd ::= SHOW VARIABLES */ - case 241: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==241); + case 239: /* cmd ::= SHOW VARIABLES */ + case 240: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==240); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 242: /* cmd ::= SHOW LOCAL VARIABLES */ + case 241: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 243: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + case 242: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ { pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy140); } break; - case 244: /* cmd ::= SHOW BNODES */ + case 243: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 245: /* cmd ::= SHOW SNODES */ + case 244: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 246: /* cmd ::= SHOW CLUSTER */ + case 245: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 247: /* cmd ::= SHOW TRANSACTIONS */ + case 246: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 248: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + case 247: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy140); } break; - case 249: /* cmd ::= SHOW CONSUMERS */ + case 248: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 250: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 249: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 251: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + case 250: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy140, yymsp[-1].minor.yy140, OP_TYPE_EQUAL); } break; - case 252: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + case 251: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140, yymsp[-3].minor.yy220); } break; - case 253: /* cmd ::= SHOW VNODES NK_INTEGER */ + case 252: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 254: /* cmd ::= SHOW VNODES NK_STRING */ + case 253: /* cmd ::= SHOW VNODES NK_STRING */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } break; - case 255: /* cmd ::= SHOW db_name_cond_opt ALIVE */ + case 254: /* cmd ::= SHOW db_name_cond_opt ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy140, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 256: /* cmd ::= SHOW CLUSTER ALIVE */ + case 255: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 257: /* db_name_cond_opt ::= */ - case 262: /* from_db_opt ::= */ yytestcase(yyruleno==262); + case 256: /* db_name_cond_opt ::= */ + case 261: /* from_db_opt ::= */ yytestcase(yyruleno==261); { yymsp[1].minor.yy140 = createDefaultDatabaseCondValue(pCxt); } break; - case 258: /* db_name_cond_opt ::= db_name NK_DOT */ + case 257: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy140 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 260: /* like_pattern_opt ::= LIKE NK_STRING */ + case 259: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 261: /* table_name_cond ::= table_name */ + case 260: /* table_name_cond ::= table_name */ { yylhsminor.yy140 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy881); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 263: /* from_db_opt ::= FROM db_name */ + case 262: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy140 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy881); } break; - case 267: /* tag_item ::= TBNAME */ + case 266: /* tag_item ::= TBNAME */ { yylhsminor.yy140 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 270: /* tag_item ::= column_name column_alias */ + case 269: /* tag_item ::= column_name column_alias */ { yylhsminor.yy140 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy881), &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 271: /* tag_item ::= column_name AS column_alias */ + case 270: /* tag_item ::= column_name AS column_alias */ { yylhsminor.yy140 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy881), &yymsp[0].minor.yy881); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 272: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + case 271: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy587, yymsp[-3].minor.yy140, yymsp[-1].minor.yy140, NULL, yymsp[0].minor.yy140); } break; - case 273: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + case 272: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy587, yymsp[-5].minor.yy140, yymsp[-3].minor.yy140, yymsp[-1].minor.yy220, NULL); } break; - case 274: /* cmd ::= DROP INDEX exists_opt full_index_name */ + case 273: /* cmd ::= DROP INDEX exists_opt full_index_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy587, yymsp[0].minor.yy140); } break; - case 275: /* full_index_name ::= index_name */ + case 274: /* full_index_name ::= index_name */ { yylhsminor.yy140 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy881); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 276: /* full_index_name ::= db_name NK_DOT index_name */ + case 275: /* full_index_name ::= db_name NK_DOT index_name */ { yylhsminor.yy140 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 277: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + case 276: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-9].minor.yy140 = createIndexOption(pCxt, yymsp[-7].minor.yy220, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 278: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + case 277: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ { yymsp[-11].minor.yy140 = createIndexOption(pCxt, yymsp[-9].minor.yy220, releaseRawExprNode(pCxt, yymsp[-5].minor.yy140), releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 281: /* func ::= sma_func_name NK_LP expression_list NK_RP */ + case 280: /* func ::= sma_func_name NK_LP expression_list NK_RP */ { yylhsminor.yy140 = createFunctionNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-1].minor.yy220); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 287: /* sma_stream_opt ::= */ - case 321: /* stream_options ::= */ yytestcase(yyruleno==321); + case 286: /* sma_stream_opt ::= */ + case 320: /* stream_options ::= */ yytestcase(yyruleno==320); { yymsp[1].minor.yy140 = createStreamOptions(pCxt); } break; - case 288: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + case 287: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy140)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 289: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + case 288: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy140)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 290: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + case 289: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy140)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = yymsp[-2].minor.yy140; } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 291: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + case 290: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ { pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy587, &yymsp[-2].minor.yy881, yymsp[0].minor.yy140); } break; - case 292: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + case 291: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy587, &yymsp[-3].minor.yy881, &yymsp[0].minor.yy881, false); } break; - case 293: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + case 292: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy587, &yymsp[-5].minor.yy881, &yymsp[0].minor.yy881, true); } break; - case 294: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + case 293: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy587, &yymsp[-3].minor.yy881, yymsp[0].minor.yy140, false); } break; - case 295: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + case 294: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy587, &yymsp[-5].minor.yy881, yymsp[0].minor.yy140, true); } break; - case 296: /* cmd ::= DROP TOPIC exists_opt topic_name */ + case 295: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 297: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + case 296: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy587, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881); } break; - case 298: /* cmd ::= DESC full_table_name */ - case 299: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==299); + case 297: /* cmd ::= DESC full_table_name */ + case 298: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==298); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy140); } break; - case 300: /* cmd ::= RESET QUERY CACHE */ + case 299: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 301: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 302: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==302); + case 300: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 301: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==301); { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy587, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 305: /* explain_options ::= */ + case 304: /* explain_options ::= */ { yymsp[1].minor.yy140 = createDefaultExplainOptions(pCxt); } break; - case 306: /* explain_options ::= explain_options VERBOSE NK_BOOL */ + case 305: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy140 = setExplainVerbose(pCxt, yymsp[-2].minor.yy140, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 307: /* explain_options ::= explain_options RATIO NK_FLOAT */ + case 306: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy140 = setExplainRatio(pCxt, yymsp[-2].minor.yy140, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 308: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + case 307: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy587, yymsp[-8].minor.yy587, &yymsp[-5].minor.yy881, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy682, yymsp[0].minor.yy214); } break; - case 309: /* cmd ::= DROP FUNCTION exists_opt function_name */ + case 308: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 314: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + case 313: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy587, &yymsp[-8].minor.yy881, yymsp[-5].minor.yy140, yymsp[-7].minor.yy140, yymsp[-3].minor.yy220, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, yymsp[-4].minor.yy220); } break; - case 315: /* cmd ::= DROP STREAM exists_opt stream_name */ + case 314: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy587, &yymsp[0].minor.yy881); } break; - case 322: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 323: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==323); + case 321: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 322: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==322); { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 324: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + case 323: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 325: /* stream_options ::= stream_options WATERMARK duration_literal */ + case 324: /* stream_options ::= stream_options WATERMARK duration_literal */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 326: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + case 325: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 327: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + case 326: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 328: /* stream_options ::= stream_options DELETE_MARK duration_literal */ + case 327: /* stream_options ::= stream_options DELETE_MARK duration_literal */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-2].minor.yy140, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 329: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + case 328: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ { yylhsminor.yy140 = setStreamOptions(pCxt, yymsp[-3].minor.yy140, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 331: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 520: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==520); - case 540: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==540); + case 330: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 519: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==519); + case 539: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==539); { yymsp[-3].minor.yy140 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy140); } break; - case 332: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 331: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 333: /* cmd ::= KILL QUERY NK_STRING */ + case 332: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 334: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 333: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 335: /* cmd ::= BALANCE VGROUP */ + case 334: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 336: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 335: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 337: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + case 336: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy220); } break; - case 338: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 337: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 339: /* dnode_list ::= DNODE NK_INTEGER */ + case 338: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy220 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 341: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ + case 340: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 344: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + case 343: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { yymsp[-6].minor.yy140 = createInsertStmt(pCxt, yymsp[-4].minor.yy140, yymsp[-2].minor.yy220, yymsp[0].minor.yy140); } break; - case 345: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ + case 344: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ { yymsp[-3].minor.yy140 = createInsertStmt(pCxt, yymsp[-1].minor.yy140, NULL, yymsp[0].minor.yy140); } break; - case 346: /* literal ::= NK_INTEGER */ + case 345: /* literal ::= NK_INTEGER */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 347: /* literal ::= NK_FLOAT */ + case 346: /* literal ::= NK_FLOAT */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 348: /* literal ::= NK_STRING */ + case 347: /* literal ::= NK_STRING */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 349: /* literal ::= NK_BOOL */ + case 348: /* literal ::= NK_BOOL */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 350: /* literal ::= TIMESTAMP NK_STRING */ + case 349: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 351: /* literal ::= duration_literal */ - case 361: /* signed_literal ::= signed */ yytestcase(yyruleno==361); - case 382: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==382); - case 383: /* expression ::= literal */ yytestcase(yyruleno==383); - case 384: /* expression ::= pseudo_column */ yytestcase(yyruleno==384); - case 385: /* expression ::= column_reference */ yytestcase(yyruleno==385); - case 386: /* expression ::= function_expression */ yytestcase(yyruleno==386); - case 387: /* expression ::= case_when_expression */ yytestcase(yyruleno==387); - case 418: /* function_expression ::= literal_func */ yytestcase(yyruleno==418); - case 467: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==467); - case 471: /* boolean_primary ::= predicate */ yytestcase(yyruleno==471); - case 473: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==473); - case 474: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==474); - case 477: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==477); - case 479: /* table_reference ::= table_primary */ yytestcase(yyruleno==479); - case 480: /* table_reference ::= joined_table */ yytestcase(yyruleno==480); - case 484: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==484); - case 542: /* query_simple ::= query_specification */ yytestcase(yyruleno==542); - case 543: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==543); - case 546: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==546); - case 548: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==548); + case 350: /* literal ::= duration_literal */ + case 360: /* signed_literal ::= signed */ yytestcase(yyruleno==360); + case 381: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==381); + case 382: /* expression ::= literal */ yytestcase(yyruleno==382); + case 383: /* expression ::= pseudo_column */ yytestcase(yyruleno==383); + case 384: /* expression ::= column_reference */ yytestcase(yyruleno==384); + case 385: /* expression ::= function_expression */ yytestcase(yyruleno==385); + case 386: /* expression ::= case_when_expression */ yytestcase(yyruleno==386); + case 417: /* function_expression ::= literal_func */ yytestcase(yyruleno==417); + case 466: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==466); + case 470: /* boolean_primary ::= predicate */ yytestcase(yyruleno==470); + case 472: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==472); + case 473: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==473); + case 476: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==476); + case 478: /* table_reference ::= table_primary */ yytestcase(yyruleno==478); + case 479: /* table_reference ::= joined_table */ yytestcase(yyruleno==479); + case 483: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==483); + case 541: /* query_simple ::= query_specification */ yytestcase(yyruleno==541); + case 542: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==542); + case 545: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==545); + case 547: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==547); { yylhsminor.yy140 = yymsp[0].minor.yy140; } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 352: /* literal ::= NULL */ + case 351: /* literal ::= NULL */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 353: /* literal ::= NK_QUESTION */ + case 352: /* literal ::= NK_QUESTION */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 354: /* duration_literal ::= NK_VARIABLE */ + case 353: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 355: /* signed ::= NK_INTEGER */ + case 354: /* signed ::= NK_INTEGER */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 356: /* signed ::= NK_PLUS NK_INTEGER */ + case 355: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 357: /* signed ::= NK_MINUS NK_INTEGER */ + case 356: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -4837,14 +4829,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 358: /* signed ::= NK_FLOAT */ + case 357: /* signed ::= NK_FLOAT */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 359: /* signed ::= NK_PLUS NK_FLOAT */ + case 358: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 360: /* signed ::= NK_MINUS NK_FLOAT */ + case 359: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -4852,57 +4844,57 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 362: /* signed_literal ::= NK_STRING */ + case 361: /* signed_literal ::= NK_STRING */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 363: /* signed_literal ::= NK_BOOL */ + case 362: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 364: /* signed_literal ::= TIMESTAMP NK_STRING */ + case 363: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 365: /* signed_literal ::= duration_literal */ - case 367: /* signed_literal ::= literal_func */ yytestcase(yyruleno==367); - case 438: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==438); - case 500: /* select_item ::= common_expression */ yytestcase(yyruleno==500); - case 510: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==510); - case 547: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==547); - case 549: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==549); - case 562: /* search_condition ::= common_expression */ yytestcase(yyruleno==562); + case 364: /* signed_literal ::= duration_literal */ + case 366: /* signed_literal ::= literal_func */ yytestcase(yyruleno==366); + case 437: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==437); + case 499: /* select_item ::= common_expression */ yytestcase(yyruleno==499); + case 509: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==509); + case 546: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==546); + case 548: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==548); + case 561: /* search_condition ::= common_expression */ yytestcase(yyruleno==561); { yylhsminor.yy140 = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 366: /* signed_literal ::= NULL */ + case 365: /* signed_literal ::= NULL */ { yylhsminor.yy140 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 368: /* signed_literal ::= NK_QUESTION */ + case 367: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy140 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 388: /* expression ::= NK_LP expression NK_RP */ - case 472: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==472); - case 561: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==561); + case 387: /* expression ::= NK_LP expression NK_RP */ + case 471: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==471); + case 560: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==560); { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 389: /* expression ::= NK_PLUS expr_or_subquery */ + case 388: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 390: /* expression ::= NK_MINUS expr_or_subquery */ + case 389: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy140), NULL)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 391: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 390: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4910,7 +4902,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 392: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 391: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4918,7 +4910,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 393: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 392: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4926,7 +4918,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 394: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 393: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4934,7 +4926,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 395: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 394: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4942,14 +4934,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 396: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 395: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 397: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 396: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4957,7 +4949,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 398: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 397: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -4965,71 +4957,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 401: /* column_reference ::= column_name */ + case 400: /* column_reference ::= column_name */ { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy881, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy881)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 402: /* column_reference ::= table_name NK_DOT column_name */ + case 401: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881, createColumnNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy881)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 403: /* pseudo_column ::= ROWTS */ - case 404: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==404); - case 406: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==406); - case 407: /* pseudo_column ::= QEND */ yytestcase(yyruleno==407); - case 408: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==408); - case 409: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==409); - case 410: /* pseudo_column ::= WEND */ yytestcase(yyruleno==410); - case 411: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==411); - case 412: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==412); - case 413: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==413); - case 414: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==414); - case 420: /* literal_func ::= NOW */ yytestcase(yyruleno==420); + case 402: /* pseudo_column ::= ROWTS */ + case 403: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==403); + case 405: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==405); + case 406: /* pseudo_column ::= QEND */ yytestcase(yyruleno==406); + case 407: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==407); + case 408: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==408); + case 409: /* pseudo_column ::= WEND */ yytestcase(yyruleno==409); + case 410: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==410); + case 411: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==411); + case 412: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==412); + case 413: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==413); + case 419: /* literal_func ::= NOW */ yytestcase(yyruleno==419); { yylhsminor.yy140 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 405: /* pseudo_column ::= table_name NK_DOT TBNAME */ + case 404: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy881)))); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 415: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 416: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==416); + case 414: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 415: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==415); { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy881, yymsp[-1].minor.yy220)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 417: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 416: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy682)); } yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 419: /* literal_func ::= noarg_func NK_LP NK_RP */ + case 418: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy881, NULL)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 434: /* star_func_para_list ::= NK_STAR */ + case 433: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy220 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 439: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 503: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==503); + case 438: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 502: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==502); { yylhsminor.yy140 = createColumnNode(pCxt, &yymsp[-2].minor.yy881, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 440: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ + case 439: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy220, yymsp[-1].minor.yy140)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 441: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + case 440: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-2].minor.yy220, yymsp[-1].minor.yy140)); } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 444: /* when_then_expr ::= WHEN common_expression THEN common_expression */ + case 443: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy140 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), releaseRawExprNode(pCxt, yymsp[0].minor.yy140)); } break; - case 446: /* case_when_else_opt ::= ELSE common_expression */ + case 445: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy140 = releaseRawExprNode(pCxt, yymsp[0].minor.yy140); } break; - case 447: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 452: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==452); + case 446: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 451: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==451); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5037,7 +5029,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 448: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 447: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5045,7 +5037,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy140 = yylhsminor.yy140; break; - case 449: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 448: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5053,71 +5045,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 450: /* predicate ::= expr_or_subquery IS NULL */ + case 449: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), NULL)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 451: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 450: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL)); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 453: /* compare_op ::= NK_LT */ + case 452: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy794 = OP_TYPE_LOWER_THAN; } break; - case 454: /* compare_op ::= NK_GT */ + case 453: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy794 = OP_TYPE_GREATER_THAN; } break; - case 455: /* compare_op ::= NK_LE */ + case 454: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy794 = OP_TYPE_LOWER_EQUAL; } break; - case 456: /* compare_op ::= NK_GE */ + case 455: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy794 = OP_TYPE_GREATER_EQUAL; } break; - case 457: /* compare_op ::= NK_NE */ + case 456: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy794 = OP_TYPE_NOT_EQUAL; } break; - case 458: /* compare_op ::= NK_EQ */ + case 457: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy794 = OP_TYPE_EQUAL; } break; - case 459: /* compare_op ::= LIKE */ + case 458: /* compare_op ::= LIKE */ { yymsp[0].minor.yy794 = OP_TYPE_LIKE; } break; - case 460: /* compare_op ::= NOT LIKE */ + case 459: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy794 = OP_TYPE_NOT_LIKE; } break; - case 461: /* compare_op ::= MATCH */ + case 460: /* compare_op ::= MATCH */ { yymsp[0].minor.yy794 = OP_TYPE_MATCH; } break; - case 462: /* compare_op ::= NMATCH */ + case 461: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy794 = OP_TYPE_NMATCH; } break; - case 463: /* compare_op ::= CONTAINS */ + case 462: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy794 = OP_TYPE_JSON_CONTAINS; } break; - case 464: /* in_op ::= IN */ + case 463: /* in_op ::= IN */ { yymsp[0].minor.yy794 = OP_TYPE_IN; } break; - case 465: /* in_op ::= NOT IN */ + case 464: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy794 = OP_TYPE_NOT_IN; } break; - case 466: /* in_predicate_value ::= NK_LP literal_list NK_RP */ + case 465: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 468: /* boolean_value_expression ::= NOT boolean_primary */ + case 467: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy140), NULL)); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 469: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 468: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5125,7 +5117,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 470: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 469: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy140); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy140); @@ -5133,48 +5125,48 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 476: /* from_clause_opt ::= FROM table_reference_list */ - case 505: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==505); - case 536: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==536); + case 475: /* from_clause_opt ::= FROM table_reference_list */ + case 504: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==504); + case 535: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==535); { yymsp[-1].minor.yy140 = yymsp[0].minor.yy140; } break; - case 478: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ + case 477: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy140 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy140, yymsp[0].minor.yy140, NULL); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 481: /* table_primary ::= table_name alias_opt */ + case 480: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy140 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 482: /* table_primary ::= db_name NK_DOT table_name alias_opt */ + case 481: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy140 = createRealTableNode(pCxt, &yymsp[-3].minor.yy881, &yymsp[-1].minor.yy881, &yymsp[0].minor.yy881); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 483: /* table_primary ::= subquery alias_opt */ + case 482: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy140 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140), &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 485: /* alias_opt ::= */ + case 484: /* alias_opt ::= */ { yymsp[1].minor.yy881 = nil_token; } break; - case 487: /* alias_opt ::= AS table_alias */ + case 486: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy881 = yymsp[0].minor.yy881; } break; - case 488: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 489: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==489); + case 487: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 488: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==488); { yymsp[-2].minor.yy140 = yymsp[-1].minor.yy140; } break; - case 490: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + case 489: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy140 = createJoinTableNode(pCxt, yymsp[-4].minor.yy852, yymsp[-5].minor.yy140, yymsp[-2].minor.yy140, yymsp[0].minor.yy140); } yymsp[-5].minor.yy140 = yylhsminor.yy140; break; - case 491: /* join_type ::= */ + case 490: /* join_type ::= */ { yymsp[1].minor.yy852 = JOIN_TYPE_INNER; } break; - case 492: /* join_type ::= INNER */ + case 491: /* join_type ::= INNER */ { yymsp[0].minor.yy852 = JOIN_TYPE_INNER; } break; - case 493: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 492: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { yymsp[-11].minor.yy140 = createSelectStmt(pCxt, yymsp[-10].minor.yy587, yymsp[-9].minor.yy220, yymsp[-8].minor.yy140); yymsp[-11].minor.yy140 = addWhereClause(pCxt, yymsp[-11].minor.yy140, yymsp[-7].minor.yy140); @@ -5187,82 +5179,82 @@ static YYACTIONTYPE yy_reduce( yymsp[-11].minor.yy140 = addFillClause(pCxt, yymsp[-11].minor.yy140, yymsp[-3].minor.yy140); } break; - case 496: /* set_quantifier_opt ::= ALL */ + case 495: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy587 = false; } break; - case 499: /* select_item ::= NK_STAR */ + case 498: /* select_item ::= NK_STAR */ { yylhsminor.yy140 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy140 = yylhsminor.yy140; break; - case 501: /* select_item ::= common_expression column_alias */ - case 511: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==511); + case 500: /* select_item ::= common_expression column_alias */ + case 510: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==510); { yylhsminor.yy140 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140), &yymsp[0].minor.yy881); } yymsp[-1].minor.yy140 = yylhsminor.yy140; break; - case 502: /* select_item ::= common_expression AS column_alias */ - case 512: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==512); + case 501: /* select_item ::= common_expression AS column_alias */ + case 511: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==511); { yylhsminor.yy140 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), &yymsp[0].minor.yy881); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 507: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 532: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==532); - case 551: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==551); + case 506: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 531: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==531); + case 550: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==550); { yymsp[-2].minor.yy220 = yymsp[0].minor.yy220; } break; - case 514: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + case 513: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { yymsp[-5].minor.yy140 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 515: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + case 514: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy140 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 516: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + case 515: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy140 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), NULL, yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 517: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + case 516: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy140 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy140), releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), yymsp[-1].minor.yy140, yymsp[0].minor.yy140); } break; - case 518: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + case 517: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy140 = createEventWindowNode(pCxt, yymsp[-3].minor.yy140, yymsp[0].minor.yy140); } break; - case 522: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + case 521: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy140 = createFillNode(pCxt, yymsp[-1].minor.yy174, NULL); } break; - case 523: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + case 522: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy140 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } break; - case 524: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ + case 523: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy140 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy220)); } break; - case 525: /* fill_mode ::= NONE */ + case 524: /* fill_mode ::= NONE */ { yymsp[0].minor.yy174 = FILL_MODE_NONE; } break; - case 526: /* fill_mode ::= PREV */ + case 525: /* fill_mode ::= PREV */ { yymsp[0].minor.yy174 = FILL_MODE_PREV; } break; - case 527: /* fill_mode ::= NULL */ + case 526: /* fill_mode ::= NULL */ { yymsp[0].minor.yy174 = FILL_MODE_NULL; } break; - case 528: /* fill_mode ::= NULL_F */ + case 527: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy174 = FILL_MODE_NULL_F; } break; - case 529: /* fill_mode ::= LINEAR */ + case 528: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy174 = FILL_MODE_LINEAR; } break; - case 530: /* fill_mode ::= NEXT */ + case 529: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy174 = FILL_MODE_NEXT; } break; - case 533: /* group_by_list ::= expr_or_subquery */ + case 532: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy220 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } yymsp[0].minor.yy220 = yylhsminor.yy220; break; - case 534: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + case 533: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy220 = addNodeToList(pCxt, yymsp[-2].minor.yy220, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy140))); } yymsp[-2].minor.yy220 = yylhsminor.yy220; break; - case 538: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + case 537: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy140 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy140), releaseRawExprNode(pCxt, yymsp[-1].minor.yy140)); } break; - case 541: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 540: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy140 = addOrderByClause(pCxt, yymsp[-3].minor.yy140, yymsp[-2].minor.yy220); yylhsminor.yy140 = addSlimitClause(pCxt, yylhsminor.yy140, yymsp[-1].minor.yy140); @@ -5270,50 +5262,50 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 544: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + case 543: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy140 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy140, yymsp[0].minor.yy140); } yymsp[-3].minor.yy140 = yylhsminor.yy140; break; - case 545: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + case 544: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy140 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy140, yymsp[0].minor.yy140); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 553: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 557: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==557); + case 552: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 556: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==556); { yymsp[-1].minor.yy140 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 554: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 558: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==558); + case 553: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 557: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==557); { yymsp[-3].minor.yy140 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 555: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 559: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==559); + case 554: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 558: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==558); { yymsp[-3].minor.yy140 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 560: /* subquery ::= NK_LP query_expression NK_RP */ + case 559: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy140 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy140); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 565: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + case 564: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy140 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy140), yymsp[-1].minor.yy866, yymsp[0].minor.yy697); } yymsp[-2].minor.yy140 = yylhsminor.yy140; break; - case 566: /* ordering_specification_opt ::= */ + case 565: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy866 = ORDER_ASC; } break; - case 567: /* ordering_specification_opt ::= ASC */ + case 566: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy866 = ORDER_ASC; } break; - case 568: /* ordering_specification_opt ::= DESC */ + case 567: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy866 = ORDER_DESC; } break; - case 569: /* null_ordering_opt ::= */ + case 568: /* null_ordering_opt ::= */ { yymsp[1].minor.yy697 = NULL_ORDER_DEFAULT; } break; - case 570: /* null_ordering_opt ::= NULLS FIRST */ + case 569: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy697 = NULL_ORDER_FIRST; } break; - case 571: /* null_ordering_opt ::= NULLS LAST */ + case 570: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy697 = NULL_ORDER_LAST; } break; default: diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index c36402e8e00f54df91747097bd23c8cc98d1f6fb..6981f7991425f2f4293bbe05c3aa25c6aaba6223 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -742,10 +742,10 @@ TEST_F(ParserInitialCTest, createStable) { addFieldToCreateStbReq(false, "a15", TSDB_DATA_TYPE_VARCHAR, 50 + VARSTR_HEADER_SIZE); run("CREATE STABLE IF NOT EXISTS rollup_db.t1(" "ts TIMESTAMP, c1 INT, c2 INT UNSIGNED, c3 BIGINT, c4 BIGINT UNSIGNED, c5 FLOAT, c6 DOUBLE, c7 BINARY(20), " - "c8 SMALLINT, c9 SMALLINT UNSIGNED COMMENT 'test column comment', c10 TINYINT, c11 TINYINT UNSIGNED, c12 BOOL, " + "c8 SMALLINT, c9 SMALLINT UNSIGNED, c10 TINYINT, c11 TINYINT UNSIGNED, c12 BOOL, " "c13 NCHAR(30), c14 VARCHAR(50)) " "TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, " - "a8 BINARY(20), a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, " + "a8 BINARY(20), a9 SMALLINT, a10 SMALLINT UNSIGNED, a11 TINYINT, " "a12 TINYINT UNSIGNED, a13 BOOL, a14 NCHAR(30), a15 VARCHAR(50)) " "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN) MAX_DELAY 100s,10m WATERMARK 10a,1m " "DELETE_MARK 1000s,200m"); @@ -1005,16 +1005,16 @@ TEST_F(ParserInitialCTest, createTable) { run("CREATE TABLE IF NOT EXISTS test.t1(" "ts TIMESTAMP, c1 INT, c2 INT UNSIGNED, c3 BIGINT, c4 BIGINT UNSIGNED, c5 FLOAT, c6 DOUBLE, c7 BINARY(20), " - "c8 SMALLINT, c9 SMALLINT UNSIGNED COMMENT 'test column comment', c10 TINYINT, c11 TINYINT UNSIGNED, c12 BOOL, " + "c8 SMALLINT, c9 SMALLINT UNSIGNED, c10 TINYINT, c11 TINYINT UNSIGNED, c12 BOOL, " "c13 NCHAR(30), c15 VARCHAR(50)) " "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3)"); run("CREATE TABLE IF NOT EXISTS rollup_db.t1(" "ts TIMESTAMP, c1 INT, c2 INT UNSIGNED, c3 BIGINT, c4 BIGINT UNSIGNED, c5 FLOAT, c6 DOUBLE, c7 BINARY(20), " - "c8 SMALLINT, c9 SMALLINT UNSIGNED COMMENT 'test column comment', c10 TINYINT, c11 TINYINT UNSIGNED, c12 BOOL, " + "c8 SMALLINT, c9 SMALLINT UNSIGNED, c10 TINYINT, c11 TINYINT UNSIGNED, c12 BOOL, " "c13 NCHAR(30), c14 VARCHAR(50)) " "TAGS (a1 TIMESTAMP, a2 INT, a3 INT UNSIGNED, a4 BIGINT, a5 BIGINT UNSIGNED, a6 FLOAT, a7 DOUBLE, a8 BINARY(20), " - "a9 SMALLINT, a10 SMALLINT UNSIGNED COMMENT 'test column comment', a11 TINYINT, a12 TINYINT UNSIGNED, a13 BOOL, " + "a9 SMALLINT, a10 SMALLINT UNSIGNED, a11 TINYINT, a12 TINYINT UNSIGNED, a13 BOOL, " "a14 NCHAR(30), a15 VARCHAR(50)) " "TTL 100 COMMENT 'test create table' SMA(c1, c2, c3) ROLLUP (MIN)"); diff --git a/source/libs/stream/src/stream.c b/source/libs/stream/src/stream.c index a4a02b7d65b77a6b27539a9b9df513264c2ebcaf..361cd2cacc1d2ba963b65387d2ce90e6b1f77ab1 100644 --- a/source/libs/stream/src/stream.c +++ b/source/libs/stream/src/stream.c @@ -68,7 +68,7 @@ void streamSchedByTimer(void* param, void* tmrId) { atomic_store_8(&pTask->triggerStatus, TASK_TRIGGER_STATUS__INACTIVE); - if (streamTaskInput(pTask, (SStreamQueueItem*)trigger) < 0) { + if (tAppendDataForStream(pTask, (SStreamQueueItem*)trigger) < 0) { taosFreeQitem(trigger); taosTmrReset(streamSchedByTimer, (int32_t)pTask->triggerParam, pTask, streamEnv.timer, &pTask->timer); return; @@ -92,22 +92,22 @@ int32_t streamSetupTrigger(SStreamTask* pTask) { int32_t streamSchedExec(SStreamTask* pTask) { int8_t schedStatus = atomic_val_compare_exchange_8(&pTask->schedStatus, TASK_SCHED_STATUS__INACTIVE, TASK_SCHED_STATUS__WAITING); + if (schedStatus == TASK_SCHED_STATUS__INACTIVE) { SStreamTaskRunReq* pRunReq = rpcMallocCont(sizeof(SStreamTaskRunReq)); if (pRunReq == NULL) { atomic_store_8(&pTask->schedStatus, TASK_SCHED_STATUS__INACTIVE); return -1; } + pRunReq->head.vgId = pTask->nodeId; pRunReq->streamId = pTask->streamId; pRunReq->taskId = pTask->taskId; - SRpcMsg msg = { - .msgType = TDMT_STREAM_TASK_RUN, - .pCont = pRunReq, - .contLen = sizeof(SStreamTaskRunReq), - }; + + SRpcMsg msg = { .msgType = TDMT_STREAM_TASK_RUN, .pCont = pRunReq, .contLen = sizeof(SStreamTaskRunReq) }; tmsgPutToQueue(pTask->pMsgCb, STREAM_QUEUE, &msg); } + return 0; } @@ -123,7 +123,7 @@ int32_t streamTaskEnqueue(SStreamTask* pTask, const SStreamDispatchReq* pReq, SR /*pData->blocks = pReq->data;*/ /*pBlock->sourceVer = pReq->sourceVer;*/ streamDispatchReqToData(pReq, pData); - if (streamTaskInput(pTask, (SStreamQueueItem*)pData) == 0) { + if (tAppendDataForStream(pTask, (SStreamQueueItem*)pData) == 0) { status = TASK_INPUT_STATUS__NORMAL; } else { status = TASK_INPUT_STATUS__FAILED; @@ -164,7 +164,7 @@ int32_t streamTaskEnqueueRetrieve(SStreamTask* pTask, SStreamRetrieveReq* pReq, /*pData->blocks = pReq->data;*/ /*pBlock->sourceVer = pReq->sourceVer;*/ streamRetrieveReqToData(pReq, pData); - if (streamTaskInput(pTask, (SStreamQueueItem*)pData) == 0) { + if (tAppendDataForStream(pTask, (SStreamQueueItem*)pData) == 0) { status = TASK_INPUT_STATUS__NORMAL; } else { status = TASK_INPUT_STATUS__FAILED; @@ -275,7 +275,57 @@ int32_t streamProcessRetrieveReq(SStreamTask* pTask, SStreamRetrieveReq* pReq, S return 0; } -// int32_t streamProcessRetrieveRsp(SStreamTask* pTask, SStreamRetrieveRsp* pRsp) { -// // -// return 0; -// } +int32_t tAppendDataForStream(SStreamTask* pTask, SStreamQueueItem* pItem) { + int8_t type = pItem->type; + + if (type == STREAM_INPUT__DATA_SUBMIT) { + SStreamDataSubmit2* pSubmitBlock = streamSubmitBlockClone((SStreamDataSubmit2*)pItem); + if (pSubmitBlock == NULL) { + qDebug("task %d %p submit enqueue failed since out of memory", pTask->taskId, pTask); + terrno = TSDB_CODE_OUT_OF_MEMORY; + atomic_store_8(&pTask->inputStatus, TASK_INPUT_STATUS__FAILED); + return -1; + } + + int32_t total = taosQueueItemSize(pTask->inputQueue->queue) + 1; + qDebug("stream task:%d %p submit enqueue %p %p %p msgLen:%d ver:%" PRId64 ", total in queue:%d", pTask->taskId, + pTask, pItem, pSubmitBlock, pSubmitBlock->submit.msgStr, pSubmitBlock->submit.msgLen, + pSubmitBlock->submit.ver, total); + + taosWriteQitem(pTask->inputQueue->queue, pSubmitBlock); + } else if (type == STREAM_INPUT__DATA_BLOCK || type == STREAM_INPUT__DATA_RETRIEVE || + type == STREAM_INPUT__REF_DATA_BLOCK) { + taosWriteQitem(pTask->inputQueue->queue, pItem); + } else if (type == STREAM_INPUT__CHECKPOINT) { + taosWriteQitem(pTask->inputQueue->queue, pItem); + } else if (type == STREAM_INPUT__GET_RES) { + taosWriteQitem(pTask->inputQueue->queue, pItem); + } + + if (type != STREAM_INPUT__GET_RES && type != STREAM_INPUT__CHECKPOINT && pTask->triggerParam != 0) { + atomic_val_compare_exchange_8(&pTask->triggerStatus, TASK_TRIGGER_STATUS__INACTIVE, TASK_TRIGGER_STATUS__ACTIVE); + } + +#if 0 + // TODO: back pressure + atomic_store_8(&pTask->inputStatus, TASK_INPUT_STATUS__NORMAL); +#endif + + return 0; +} + +void* streamQueueNextItem(SStreamQueue* queue) { + int8_t dequeueFlag = atomic_exchange_8(&queue->status, STREAM_QUEUE__PROCESSING); + if (dequeueFlag == STREAM_QUEUE__FAILED) { + ASSERT(queue->qItem != NULL); + return streamQueueCurItem(queue); + } else { + queue->qItem = NULL; + taosGetQitem(queue->qall, &queue->qItem); + if (queue->qItem == NULL) { + taosReadAllQitems(queue->queue, queue->qall); + taosGetQitem(queue->qall, &queue->qItem); + } + return streamQueueCurItem(queue); + } +} \ No newline at end of file diff --git a/source/libs/stream/src/streamData.c b/source/libs/stream/src/streamData.c index 8baebaee4224e6b9af5d2eacf62910412171bc63..3fba1cb556a259b290dcca8764499d3d589e1da8 100644 --- a/source/libs/stream/src/streamData.c +++ b/source/libs/stream/src/streamData.c @@ -48,10 +48,12 @@ int32_t streamRetrieveReqToData(const SStreamRetrieveReq* pReq, SStreamDataBlock if (pArray == NULL) { return -1; } + taosArrayPush(pArray, &(SSDataBlock){0}); SRetrieveTableRsp* pRetrieve = pReq->pRetrieve; SSDataBlock* pDataBlock = taosArrayGet(pArray, 0); blockDecode(pDataBlock, pRetrieve->data); + // TODO: refactor pDataBlock->info.window.skey = be64toh(pRetrieve->skey); pDataBlock->info.window.ekey = be64toh(pRetrieve->ekey); @@ -68,32 +70,51 @@ int32_t streamRetrieveReqToData(const SStreamRetrieveReq* pReq, SStreamDataBlock SStreamDataSubmit2* streamDataSubmitNew(SPackedData submit) { SStreamDataSubmit2* pDataSubmit = (SStreamDataSubmit2*)taosAllocateQitem(sizeof(SStreamDataSubmit2), DEF_QITEM, 0); - if (pDataSubmit == NULL) return NULL; + if (pDataSubmit == NULL) { + return NULL; + } + pDataSubmit->dataRef = (int32_t*)taosMemoryMalloc(sizeof(int32_t)); - if (pDataSubmit->dataRef == NULL) goto FAIL; + if (pDataSubmit->dataRef == NULL) { + taosFreeQitem(pDataSubmit); + return NULL; + } + pDataSubmit->submit = submit; - *pDataSubmit->dataRef = 1; + *pDataSubmit->dataRef = 1; // initialize the reference count to be 1 pDataSubmit->type = STREAM_INPUT__DATA_SUBMIT; + return pDataSubmit; -FAIL: - taosFreeQitem(pDataSubmit); - return NULL; +} + +void streamDataSubmitDestroy(SStreamDataSubmit2* pDataSubmit) { + int32_t ref = atomic_sub_fetch_32(pDataSubmit->dataRef, 1); + ASSERT(ref >= 0 && pDataSubmit->type == STREAM_INPUT__DATA_SUBMIT); + + if (ref == 0) { + taosMemoryFree(pDataSubmit->submit.msgStr); + taosMemoryFree(pDataSubmit->dataRef); + } } SStreamMergedSubmit2* streamMergedSubmitNew() { SStreamMergedSubmit2* pMerged = (SStreamMergedSubmit2*)taosAllocateQitem(sizeof(SStreamMergedSubmit2), DEF_QITEM, 0); + if (pMerged == NULL) { + return NULL; + } - if (pMerged == NULL) return NULL; pMerged->submits = taosArrayInit(0, sizeof(SPackedData)); pMerged->dataRefs = taosArrayInit(0, sizeof(void*)); - if (pMerged->dataRefs == NULL || pMerged->submits == NULL) goto FAIL; + + if (pMerged->dataRefs == NULL || pMerged->submits == NULL) { + taosArrayDestroy(pMerged->submits); + taosArrayDestroy(pMerged->dataRefs); + taosFreeQitem(pMerged); + return NULL; + } + pMerged->type = STREAM_INPUT__MERGED_SUBMIT; return pMerged; -FAIL: - if (pMerged->submits) taosArrayDestroy(pMerged->submits); - if (pMerged->dataRefs) taosArrayDestroy(pMerged->dataRefs); - taosFreeQitem(pMerged); - return NULL; } int32_t streamMergeSubmit(SStreamMergedSubmit2* pMerged, SStreamDataSubmit2* pSubmit) { @@ -107,26 +128,17 @@ static FORCE_INLINE void streamDataSubmitRefInc(SStreamDataSubmit2* pDataSubmit) atomic_add_fetch_32(pDataSubmit->dataRef, 1); } -SStreamDataSubmit2* streamSubmitRefClone(SStreamDataSubmit2* pSubmit) { +SStreamDataSubmit2* streamSubmitBlockClone(SStreamDataSubmit2* pSubmit) { SStreamDataSubmit2* pSubmitClone = taosAllocateQitem(sizeof(SStreamDataSubmit2), DEF_QITEM, 0); - if (pSubmitClone == NULL) { return NULL; } + streamDataSubmitRefInc(pSubmit); memcpy(pSubmitClone, pSubmit, sizeof(SStreamDataSubmit2)); return pSubmitClone; } -void streamDataSubmitRefDec(SStreamDataSubmit2* pDataSubmit) { - int32_t ref = atomic_sub_fetch_32(pDataSubmit->dataRef, 1); - ASSERT(ref >= 0); - if (ref == 0) { - taosMemoryFree(pDataSubmit->submit.msgStr); - taosMemoryFree(pDataSubmit->dataRef); - } -} - SStreamQueueItem* streamMergeQueueItem(SStreamQueueItem* dst, SStreamQueueItem* elem) { ASSERT(elem); if (dst->type == STREAM_INPUT__DATA_BLOCK && elem->type == STREAM_INPUT__DATA_BLOCK) { @@ -164,7 +176,7 @@ void streamFreeQitem(SStreamQueueItem* data) { taosArrayDestroyEx(((SStreamDataBlock*)data)->blocks, (FDelete)blockDataFreeRes); taosFreeQitem(data); } else if (type == STREAM_INPUT__DATA_SUBMIT) { - streamDataSubmitRefDec((SStreamDataSubmit2*)data); + streamDataSubmitDestroy((SStreamDataSubmit2*)data); taosFreeQitem(data); } else if (type == STREAM_INPUT__MERGED_SUBMIT) { SStreamMergedSubmit2* pMerge = (SStreamMergedSubmit2*)data; diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 25b265636586bf74e6cb836b89308f6cd20d4122..6ef327049c954d886d2c04bb5cc14eeb8524112e 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -34,7 +34,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, const void* data, SArray* } else if (pItem->type == STREAM_INPUT__DATA_SUBMIT) { ASSERT(pTask->taskLevel == TASK_LEVEL__SOURCE); const SStreamDataSubmit2* pSubmit = (const SStreamDataSubmit2*)data; - qDebug("task %d %p set submit input %p %p %d %" PRId64, pTask->taskId, pTask, pSubmit, pSubmit->submit.msgStr, + qDebug("stream task:%d %p set submit input %p %p %d %" PRId64, pTask->taskId, pTask, pSubmit, pSubmit->submit.msgStr, pSubmit->submit.msgLen, pSubmit->submit.ver); qSetMultiStreamInput(exec, &pSubmit->submit, 1, STREAM_INPUT__DATA_SUBMIT); } else if (pItem->type == STREAM_INPUT__DATA_BLOCK || pItem->type == STREAM_INPUT__DATA_RETRIEVE) { @@ -268,9 +268,10 @@ int32_t streamExecForAll(SStreamTask* pTask) { SArray* pRes = taosArrayInit(0, sizeof(SSDataBlock)); - qDebug("stream task %d exec begin, msg batch: %d", pTask->taskId, batchCnt); + qDebug("stream task:%d exec begin, msg batch: %d", pTask->taskId, batchCnt); streamTaskExecImpl(pTask, input, pRes); - qDebug("stream task %d exec end", pTask->taskId); + + qDebug("stream task:%d exec end", pTask->taskId); if (taosArrayGetSize(pRes) != 0) { SStreamDataBlock* qRes = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, 0); diff --git a/source/libs/wal/src/walRead.c b/source/libs/wal/src/walRead.c index 3e1e36ccc1e7ac862aaad36ebc4d4a4c0a6a2c62..ad6127ead23d0713c9fa963741d460a30f50c249 100644 --- a/source/libs/wal/src/walRead.c +++ b/source/libs/wal/src/walRead.c @@ -33,7 +33,6 @@ SWalReader *walOpenReader(SWal *pWal, SWalFilterCond *cond) { pReader->pLogFile = NULL; pReader->curVersion = -1; pReader->curFileFirstVer = -1; - pReader->curInvalid = 1; pReader->capacity = 0; if (cond) { pReader->cond = *cond; @@ -81,7 +80,6 @@ int32_t walNextValidMsg(SWalReader *pReader) { wDebug("vgId:%d, wal start to fetch, index:%" PRId64 ", last index:%" PRId64 " commit index:%" PRId64 ", applied index:%" PRId64 ", end index:%" PRId64, pReader->pWal->cfg.vgId, fetchVer, lastVer, committedVer, appliedVer, endVer); - pReader->curStopped = 0; while (fetchVer <= endVer) { if (walFetchHeadNew(pReader, fetchVer) < 0) { return -1; @@ -99,7 +97,6 @@ int32_t walNextValidMsg(SWalReader *pReader) { fetchVer = pReader->curVersion; } } - pReader->curStopped = 1; return -1; } @@ -196,17 +193,16 @@ int32_t walReadSeekVerImpl(SWalReader *pReader, int64_t ver) { return -1; } - wDebug("vgId:%d, wal version reset from %" PRId64 "(invalid:%d) to %" PRId64, pReader->pWal->cfg.vgId, - pReader->curVersion, pReader->curInvalid, ver); + wDebug("vgId:%d, wal version reset from %" PRId64 " to %" PRId64, pReader->pWal->cfg.vgId, + pReader->curVersion, ver); pReader->curVersion = ver; - pReader->curInvalid = 0; return 0; } int32_t walReadSeekVer(SWalReader *pReader, int64_t ver) { SWal *pWal = pReader->pWal; - if (!pReader->curInvalid && ver == pReader->curVersion) { + if (ver == pReader->curVersion) { wDebug("vgId:%d, wal index:%" PRId64 " match, no need to reset", pReader->pWal->cfg.vgId, ver); return 0; } @@ -238,7 +234,7 @@ static int32_t walFetchHeadNew(SWalReader *pRead, int64_t fetchVer) { wDebug("vgId:%d, wal starts to fetch head, index:%" PRId64, pRead->pWal->cfg.vgId, fetchVer); - if (pRead->curInvalid || pRead->curVersion != fetchVer) { + if (pRead->curVersion != fetchVer) { if (walReadSeekVer(pRead, fetchVer) < 0) { // pRead->curVersion = fetchVer; // pRead->curInvalid = 1; @@ -344,7 +340,7 @@ int32_t walFetchHead(SWalReader *pRead, int64_t ver, SWalCkHead *pHead) { return -1; } - if (pRead->curInvalid || pRead->curVersion != ver) { + if (pRead->curVersion != ver) { code = walReadSeekVer(pRead, ver); if (code < 0) { // pRead->curVersion = ver; @@ -479,7 +475,7 @@ int32_t walReadVer(SWalReader *pReader, int64_t ver) { taosThreadMutexLock(&pReader->mutex); - if (pReader->curInvalid || pReader->curVersion != ver) { + if (pReader->curVersion != ver) { if (walReadSeekVer(pReader, ver) < 0) { wError("vgId:%d, unexpected wal log, index:%" PRId64 ", since %s", pReader->pWal->cfg.vgId, ver, terrstr()); taosThreadMutexUnlock(&pReader->mutex); @@ -575,7 +571,6 @@ void walReadReset(SWalReader *pReader) { taosThreadMutexLock(&pReader->mutex); taosCloseFile(&pReader->pIdxFile); taosCloseFile(&pReader->pLogFile); - pReader->curInvalid = 1; pReader->curFileFirstVer = -1; pReader->curVersion = -1; taosThreadMutexUnlock(&pReader->mutex); diff --git a/source/util/src/terror.c b/source/util/src/terror.c index b84d58bfe8b7a625fc566ef536d03862f03c0566..31ffbbf1771884e51c11dcc3c0b465c466f3d7bd 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -628,6 +628,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_INDEX_INVALID_FILE, "Index file is inval TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_INVALID_MSG, "Invalid message") TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_CONSUMER_MISMATCH, "Consumer mismatch") TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_CONSUMER_CLOSED, "Consumer closed") +TAOS_DEFINE_ERROR(TSDB_CODE_TMQ_CONSUMER_ERROR, "Consumer error, to see log") // stream TAOS_DEFINE_ERROR(TSDB_CODE_STREAM_TASK_NOT_EXIST, "Stream task not exist") diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 49f14191b13023ab63b161c02387559050e24cf8..d1fbacdadf0f1cb6d835eb89da775db2cae5a860 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -94,7 +94,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py -,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py +#,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py diff --git a/tests/script/tsim/tmq/basic1.sim b/tests/script/tsim/tmq/basic1.sim index 6880f290f5fda796cbf5b90f98cf5d40c1976eff..80a05ba45ce9de69ea27e6d723d44aa5f55ced68 100644 --- a/tests/script/tsim/tmq/basic1.sim +++ b/tests/script/tsim/tmq/basic1.sim @@ -111,8 +111,8 @@ endi $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -134,7 +134,7 @@ if $data[0][2] != $expectmsgcnt then print expect $expectmsgcnt , actual $data02 return -1 endi -if $data[0][3] != $expectmsgcnt then +if $data[0][3] != $totalMsgOfStb then return -1 endi $loop_cnt = $loop_cnt + 1 @@ -183,8 +183,8 @@ endi $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -202,7 +202,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfCtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfCtb then @@ -254,8 +254,8 @@ endi $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -273,7 +273,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfNtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfNtb then diff --git a/tests/script/tsim/tmq/basic1Of2Cons.sim b/tests/script/tsim/tmq/basic1Of2Cons.sim index 11b645c4d1a008dc82af07999b86ce32c5484947..21883418048c890c72ffe77000d31858ee3f0f41 100644 --- a/tests/script/tsim/tmq/basic1Of2Cons.sim +++ b/tests/script/tsim/tmq/basic1Of2Cons.sim @@ -111,11 +111,11 @@ endi $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -142,14 +142,14 @@ if $data[0][1] == 1 then endi endi -# either $data[0][2] == $totalMsgOfStb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfStb -if $data[0][2] == $totalMsgOfStb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_0 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfStb then + if $data[1][2] == $expectmsgcnt then goto check_ok_0 endi endi @@ -214,10 +214,10 @@ endi $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -244,14 +244,14 @@ if $data[0][1] == 1 then endi endi -# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb -if $data[0][2] == $totalMsgOfCtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_2 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfCtb then + if $data[1][2] == $expectmsgcnt then goto check_ok_2 endi endi @@ -316,10 +316,10 @@ endi $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -346,14 +346,14 @@ if $data[1][1] == 0 then endi endi -# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb -if $data[0][2] == $totalMsgOfNtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_4 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfNtb then + if $data[1][2] == $expectmsgcnt then goto check_ok_4 endi endi diff --git a/tests/script/tsim/tmq/basic2.sim b/tests/script/tsim/tmq/basic2.sim index dce73be592e459264916f67b4390141115c05bc8..a965645660948cc100f9d3a8fc7a20675d733606 100644 --- a/tests/script/tsim/tmq/basic2.sim +++ b/tests/script/tsim/tmq/basic2.sim @@ -83,8 +83,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $totalMsgOfStb * $topicNum -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -105,7 +105,7 @@ endi if $data[0][2] != $expectmsgcnt then return -1 endi -if $data[0][3] != $expectmsgcnt then +if $data[0][3] != $totalMsgOfStb then return -1 endi @@ -140,8 +140,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -159,7 +159,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfCtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfCtb then @@ -197,8 +197,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -216,7 +216,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfNtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfNtb then diff --git a/tests/script/tsim/tmq/basic2Of2Cons.sim b/tests/script/tsim/tmq/basic2Of2Cons.sim index 87559305ba19cb30b7c8f7928a1437f3246cc139..fd61c4b40f93df5e7924bb677a5f4ac5676d3aad 100644 --- a/tests/script/tsim/tmq/basic2Of2Cons.sim +++ b/tests/script/tsim/tmq/basic2Of2Cons.sim @@ -82,10 +82,10 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $totalMsgOfStb * $topicNum -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -112,14 +112,14 @@ if $data[0][1] == 1 then endi endi -# either $data[0][2] == $totalMsgOfStb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfStb -if $data[0][2] == $totalMsgOfStb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_0 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfStb then + if $data[1][2] == $expectmsgcnt then goto check_ok_0 endi endi @@ -169,10 +169,10 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -199,14 +199,14 @@ if $data[0][1] == 1 then endi endi -# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb -if $data[0][2] == $totalMsgOfCtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_2 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfCtb then + if $data[1][2] == $expectmsgcnt then goto check_ok_2 endi endi @@ -256,10 +256,10 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -286,14 +286,14 @@ if $data[1][1] == 0 then endi endi -# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb -if $data[0][2] == $totalMsgOfNtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_4 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfNtb then + if $data[1][2] == $expectmsgcnt then goto check_ok_4 endi endi diff --git a/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim b/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim index dda5e0059e5c760925e7944b13089b1d3897c0f8..180c8947db3a58c71f20d7cec9cb72193059d935 100644 --- a/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim +++ b/tests/script/tsim/tmq/basic2Of2ConsOverlap.sim @@ -80,8 +80,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfOneTopic = $ctbNum * $rowsPerCtb $totalMsgOfStb = $totalMsgOfOneTopic * $topicNum -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 3 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) $topicList = ' . topic_stb_all @@ -89,7 +89,7 @@ $topicList = $topicList . , $topicList = $topicList . topic_stb_function $topicList = $topicList . ' $consumerId = 1 -sql insert into consumeinfo values (now +1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now +1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -118,40 +118,40 @@ endi # $data[0][2]/$data[1][2] should be between $totalMsgOfOneTopic and $totalMsgOfStb. -if $data[0][2] < $totalMsgOfOneTopic then - return -1 -endi -if $data[0][2] > $totalMsgOfStb then - return -1 -endi -if $data[1][2] < $totalMsgOfOneTopic then +#if $data[0][2] < $totalMsgOfOneTopic then +# return -1 +#endi +if $data[0][2] > $expectmsgcnt then return -1 endi -if $data[1][2] > $totalMsgOfStb then +#if $data[1][2] < $totalMsgOfOneTopic then +# return -1 +#endi +if $data[1][2] > $expectmsgcnt then return -1 endi -$totalMsgCons = $totalMsgOfOneTopic + $totalMsgOfStb +#$totalMsgCons = $totalMsgOfOneTopic + $totalMsgOfStb $sumOfMsgCnt = $data[0][2] + $data[1][2] -if $sumOfMsgCnt != $totalMsgCons then - print total: $totalMsgCons +if $sumOfMsgCnt != $expectmsgcnt then + print total: $expectmsgcnt print sum: $sumOfMsgCnt return -1 endi # $data[0][3]/$data[1][3] should be between $totalMsgOfOneTopic and $totalMsgOfStb. -if $data[0][3] < $totalMsgOfOneTopic then - return -1 -endi -if $data[0][3] > $totalMsgOfStb then - return -1 -endi -if $data[1][3] < $totalMsgOfOneTopic then - return -1 -endi -if $data[1][3] > $totalMsgOfStb then - return -1 -endi +#if $data[0][3] < $totalMsgOfStb then +# return -1 +#endi +#if $data[0][3] > $totalMsgOfStb then +# return -1 +#endi +#if $data[1][3] < $totalMsgOfStb then +# return -1 +#endi +#if $data[1][3] > $totalMsgOfStb then +# return -1 +#endi $totalMsgCons = $totalMsgOfOneTopic + $totalMsgOfStb $sumOfRows = $data[0][3] + $data[1][3] @@ -189,15 +189,15 @@ $consumerId = 0 $totalMsgOfOneTopic = $rowsPerCtb $totalMsgOfCtb = $totalMsgOfOneTopic * $topicNum -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) $topicList = ' . topic_ctb_function $topicList = $topicList . , $topicList = $topicList . topic_ctb_all $topicList = $topicList . ' $consumerId = 1 -sql insert into consumeinfo values (now +1s, $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now +1s, $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start @@ -226,24 +226,24 @@ endi # either $data[0][2] $totalMsgOfOneTopic and $data[1][2] == $totalMsgOfCtb # or $data[0][2] $totalMsgOfCtb and $data[1][2] == $totalMsgOfOneTopic -if $data[0][2] == $totalMsgOfOneTopic then - if $data[1][2] == $totalMsgOfCtb then +if $data[0][2] == $topicNum then + if $data[1][2] == 1 then goto check_ok_0 endi -elif $data[1][2] == $totalMsgOfOneTopic then - if $data[0][2] == $totalMsgOfCtb then +elif $data[0][2] == 1 then + if $data[1][2] == $topicNum then goto check_ok_0 endi endi return -1 check_ok_0: -if $data[0][3] == $totalMsgOfOneTopic then - if $data[1][3] == $totalMsgOfCtb then +if $data[0][3] == $totalMsgOfCtb then + if $data[1][3] == $totalMsgOfOneTopic then goto check_ok_1 endi -elif $data[1][3] == $totalMsgOfOneTopic then - if $data[0][3] == $totalMsgOfCtb then +elif $data[0][3] == $totalMsgOfOneTopic then + if $data[1][3] == $totalMsgOfCtb then goto check_ok_1 endi endi @@ -280,8 +280,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfOneTopic = $rowsPerCtb $totalMsgOfNtb = $totalMsgOfOneTopic * $topicNum -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) $topicList = ' . topic_ntb_function @@ -289,7 +289,7 @@ $topicList = $topicList . , $topicList = $topicList . topic_ntb_all $topicList = $topicList . ' $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -318,12 +318,12 @@ endi # either $data[0][2] $totalMsgOfOneTopic and $data[1][2] == $totalMsgOfNtb # or $data[0][2] $totalMsgOfNtb and $data[1][2] == $totalMsgOfOneTopic -if $data[0][2] == $totalMsgOfOneTopic then - if $data[1][2] == $totalMsgOfNtb then +if $data[0][2] == $expectmsgcnt then + if $data[1][2] == 1 then goto check_ok_2 endi -elif $data[1][2] == $totalMsgOfOneTopic then - if $data[0][2] == $totalMsgOfNtb then +elif $data[0][2] == 1 then + if $data[1][2] == $expectmsgcnt then goto check_ok_2 endi endi @@ -334,8 +334,8 @@ if $data[0][3] == $totalMsgOfOneTopic then if $data[1][3] == $totalMsgOfNtb then goto check_ok_3 endi -elif $data[1][3] == $totalMsgOfOneTopic then - if $data[0][3] == $totalMsgOfNtb then +elif $data[0][3] == $totalMsgOfNtb then + if $data[1][3] == $totalMsgOfOneTopic then goto check_ok_3 endi endi diff --git a/tests/script/tsim/tmq/basic3.sim b/tests/script/tsim/tmq/basic3.sim index 8d677766d74371209e53bab94b62a524318146ee..63b3665cd044d8e9327b25aebe27d7c8c37708fe 100644 --- a/tests/script/tsim/tmq/basic3.sim +++ b/tests/script/tsim/tmq/basic3.sim @@ -111,8 +111,8 @@ endi $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -130,10 +130,10 @@ 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 +#if $data[0][2] != $expectmsgcnt then +# return -1 +#endi +if $data[0][3] != $totalMsgOfStb then return -1 endi $loop_cnt = $loop_cnt + 1 @@ -182,8 +182,8 @@ endi $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -201,7 +201,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfCtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfCtb then @@ -253,8 +253,8 @@ endi $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -272,7 +272,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfNtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfNtb then diff --git a/tests/script/tsim/tmq/basic3Of2Cons.sim b/tests/script/tsim/tmq/basic3Of2Cons.sim index 4921c86c4574174b06af4d906b9a3e74e8ee9c3c..fb3091642c78809928d6861c9060c64db099c038 100644 --- a/tests/script/tsim/tmq/basic3Of2Cons.sim +++ b/tests/script/tsim/tmq/basic3Of2Cons.sim @@ -110,10 +110,10 @@ endi $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 3 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -163,19 +163,19 @@ endi if $data[0][3] <= 0 then return -1 endi -if $data[0][3] >= $expectmsgcnt then +if $data[0][3] >= $totalMsgOfStb then return -1 endi if $data[1][3] <= 0 then return -1 endi -if $data[1][3] >= $expectmsgcnt then +if $data[1][3] >= $totalMsgOfStb then return -1 endi $sumOfMsgRows = $data[0][3] + $data[1][3] -if $sumOfMsgRows != $expectmsgcnt then +if $sumOfMsgRows != $totalMsgOfStb then return -1 endi @@ -225,10 +225,10 @@ endi $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -255,13 +255,13 @@ if $data[0][1] == 1 then endi endi -# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb -if $data[0][2] == $totalMsgOfCtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_0 endi -elif $data[1][2] == $totalMsgOfCtb then +elif $data[1][2] == $expectmsgcnt then if $data[0][2] == 0 then goto check_ok_0 endi @@ -327,10 +327,10 @@ endi $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 1 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -357,13 +357,13 @@ if $data[1][1] == 0 then endi endi -# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb -if $data[0][2] == $totalMsgOfNtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_2 endi -elif $data[1][2] == $totalMsgOfNtb then +elif $data[1][2] == $expectmsgcnt then if $data[0][2] == 0 then goto check_ok_2 endi diff --git a/tests/script/tsim/tmq/basic4.sim b/tests/script/tsim/tmq/basic4.sim index 9b418f12f2b95410994cf52fd4e140a8dcc73889..2cac9beea6b3778b02d32c9b1e2f0081a9a249d1 100644 --- a/tests/script/tsim/tmq/basic4.sim +++ b/tests/script/tsim/tmq/basic4.sim @@ -80,8 +80,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $totalMsgOfStb * $topicNum -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 9 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -102,7 +102,7 @@ endi if $data[0][2] != $expectmsgcnt then return -1 endi -if $data[0][3] != $expectmsgcnt then +if $data[0][3] != $totalMsgOfStb then return -1 endi @@ -137,8 +137,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -156,7 +156,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfCtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfCtb then @@ -194,8 +194,8 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -213,7 +213,7 @@ endi if $data[0][1] != $consumerId then return -1 endi -if $data[0][2] != $totalMsgOfNtb then +if $data[0][2] != $expectmsgcnt then return -1 endi if $data[0][3] != $totalMsgOfNtb then diff --git a/tests/script/tsim/tmq/basic4Of2Cons.sim b/tests/script/tsim/tmq/basic4Of2Cons.sim index f1755f732baa365689653d83e117d2780c40f621..1d0b8f17a3b525ff18b8b260c040758dc60d396d 100644 --- a/tests/script/tsim/tmq/basic4Of2Cons.sim +++ b/tests/script/tsim/tmq/basic4Of2Cons.sim @@ -79,10 +79,10 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $totalMsgOfStb * $topicNum -$expectmsgcnt = $totalMsgOfStb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = 9 +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit ) 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 @@ -131,19 +131,19 @@ endi if $data[0][3] <= 0 then return -1 endi -if $data[0][3] >= $expectmsgcnt then +if $data[0][3] >= $totalMsgOfStb then return -1 endi if $data[1][3] <= 0 then return -1 endi -if $data[1][3] >= $expectmsgcnt then +if $data[1][3] >= $totalMsgOfStb then return -1 endi $sumOfConsRow = $data[0][3] + $data[1][3] -if $sumOfConsRow != $expectmsgcnt then +if $sumOfConsRow != $totalMsgOfStb then return -1 endi @@ -178,10 +178,10 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfCtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfCtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ctb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -208,14 +208,14 @@ if $data[0][1] == 1 then endi endi -# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb -if $data[0][2] == $totalMsgOfCtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_0 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfCtb then + if $data[1][2] == $expectmsgcnt then goto check_ok_0 endi endi @@ -266,10 +266,10 @@ $topicList = $topicList . ' $consumerId = 0 $totalMsgOfNtb = $rowsPerCtb * $topicNum -$expectmsgcnt = $totalMsgOfNtb -sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +$expectmsgcnt = $topicNum +sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) $consumerId = 1 -sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) +sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit ) print == start consumer to pull msgs from ntb print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start @@ -296,14 +296,14 @@ if $data[1][1] == 0 then endi endi -# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 -# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb -if $data[0][2] == $totalMsgOfNtb then +# either $data[0][2] == $expectmsgcnt and $data[1][2] == 0 +# or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt +if $data[0][2] == $expectmsgcnt then if $data[1][2] == 0 then goto check_ok_2 endi elif $data[0][2] == 0 then - if $data[1][2] == $totalMsgOfNtb then + if $data[1][2] == $expectmsgcnt then goto check_ok_2 endi endi diff --git a/tests/system-test/7-tmq/subscribeStb.py b/tests/system-test/7-tmq/subscribeStb.py index 3ff0b25ff6b4585a8abc4061e7e46abced77d15e..b9a6e7667de24c5377c9bdbd01f9ffc2cad58370 100644 --- a/tests/system-test/7-tmq/subscribeStb.py +++ b/tests/system-test/7-tmq/subscribeStb.py @@ -226,7 +226,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -307,7 +307,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) diff --git a/tests/system-test/7-tmq/subscribeStb0.py b/tests/system-test/7-tmq/subscribeStb0.py index 1463cad627a23dd106d6afb78a4ee274345a840f..bac1646457867fc62be16f7ceb1fd68ccfd94624 100644 --- a/tests/system-test/7-tmq/subscribeStb0.py +++ b/tests/system-test/7-tmq/subscribeStb0.py @@ -228,7 +228,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -303,7 +303,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt/4,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -315,7 +315,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt/4: + if totalConsumeRows < expectrowcnt/4: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt/4)) tdLog.exit("tmq consume rows error!") @@ -333,7 +333,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt: + if totalConsumeRows < expectrowcnt: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt)) tdLog.exit("tmq consume rows error!") @@ -386,7 +386,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt/4,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -398,7 +398,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt/4: + if totalConsumeRows < expectrowcnt/4: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt/4)) tdLog.exit("tmq consume rows error!") @@ -416,7 +416,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != (expectrowcnt * (1 + 1/4)): + if totalConsumeRows < (expectrowcnt * (1 + 1/4)): tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt)) tdLog.exit("tmq consume rows error!") diff --git a/tests/system-test/7-tmq/subscribeStb1.py b/tests/system-test/7-tmq/subscribeStb1.py index 3dc3528d047cd5f8685193374d214418c1b6b929..63ba2c8c1647a7450139a9013ab13233a016f1b6 100644 --- a/tests/system-test/7-tmq/subscribeStb1.py +++ b/tests/system-test/7-tmq/subscribeStb1.py @@ -233,7 +233,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt/4,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -320,7 +320,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) diff --git a/tests/system-test/7-tmq/subscribeStb2.py b/tests/system-test/7-tmq/subscribeStb2.py index 6c3e122902cc907dacd8297d95f27c6289cad176..dbfbc6f7bc1dd0a24084ee32b8f06289580b94e2 100644 --- a/tests/system-test/7-tmq/subscribeStb2.py +++ b/tests/system-test/7-tmq/subscribeStb2.py @@ -233,7 +233,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume 0 processor") - pollDelay = 100 + pollDelay = 10 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -251,6 +251,7 @@ class TDTestCase: tdLog.info("start consume 1 processor") self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) + tdLog.sleep(2) tdLog.info("start one new thread to insert data") parameterDict['actionType'] = actionType.INSERT_DATA @@ -271,6 +272,7 @@ class TDTestCase: tdLog.info("start consume 2 processor") self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) + tdLog.sleep(2) tdLog.info("start one new thread to insert data") parameterDict['actionType'] = actionType.INSERT_DATA @@ -338,7 +340,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume 0 processor") - pollDelay = 100 + pollDelay = 20 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -380,6 +382,7 @@ class TDTestCase: tdLog.info("start consume 2 processor") self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) + tdLog.sleep(2) tdLog.info("start one new thread to insert data") parameterDict['actionType'] = actionType.INSERT_DATA @@ -394,7 +397,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt*2: + if totalConsumeRows < expectrowcnt*2: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt*2)) tdLog.exit("tmq consume rows error!") diff --git a/tests/system-test/7-tmq/subscribeStb3.py b/tests/system-test/7-tmq/subscribeStb3.py index 025f403282e46eab4893062069bcea820124203b..ef7ca8ff5d79080882b36e27226a6c90df992f57 100644 --- a/tests/system-test/7-tmq/subscribeStb3.py +++ b/tests/system-test/7-tmq/subscribeStb3.py @@ -215,7 +215,8 @@ class TDTestCase: parameterDict["stbName"],\ parameterDict["ctbNum"],\ parameterDict["rowsPerTbl"],\ - parameterDict["batchNum"]) + parameterDict["batchNum"],\ + parameterDict["startTs"]) tdLog.info("create topics from stb1") topicFromStb1 = 'topic_stb1' @@ -233,7 +234,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume 0 processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -269,7 +270,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt-10000: + if totalConsumeRows < expectrowcnt-10000: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt-10000)) tdLog.exit("tmq consume rows error!") @@ -328,7 +329,8 @@ class TDTestCase: parameterDict["stbName"],\ parameterDict["ctbNum"],\ parameterDict["rowsPerTbl"],\ - parameterDict["batchNum"]) + parameterDict["batchNum"],\ + parameterDict["startTs"]) tdLog.info("create topics from stb1") topicFromStb1 = 'topic_stb1' @@ -346,7 +348,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt/4,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -415,7 +417,8 @@ class TDTestCase: parameterDict["stbName"],\ parameterDict["ctbNum"],\ parameterDict["rowsPerTbl"],\ - parameterDict["batchNum"]) + parameterDict["batchNum"],\ + parameterDict["startTs"]) tdLog.info("create topics from stb1") topicFromStb1 = 'topic_stb1' @@ -433,7 +436,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt/4,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -445,7 +448,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt/4: + if totalConsumeRows < expectrowcnt/4: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt/4)) tdLog.exit("tmq consume rows error!") @@ -467,7 +470,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt/4: + if totalConsumeRows < expectrowcnt/4: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt/4)) tdLog.exit("tmq consume rows error!") @@ -502,7 +505,8 @@ class TDTestCase: parameterDict["stbName"],\ parameterDict["ctbNum"],\ parameterDict["rowsPerTbl"],\ - parameterDict["batchNum"]) + parameterDict["batchNum"],\ + parameterDict["startTs"]) tdLog.info("create topics from stb1") topicFromStb1 = 'topic_stb1' @@ -520,7 +524,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt/4,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -532,7 +536,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt/4: + if totalConsumeRows < expectrowcnt/4: tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt/4)) tdLog.exit("tmq consume rows error!") @@ -555,7 +559,7 @@ class TDTestCase: for i in range(expectRows): totalConsumeRows += resultList[i] - if totalConsumeRows != expectrowcnt*(1/2+1/4): + if totalConsumeRows < expectrowcnt*(1/2+1/4): tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt*(1/2+1/4))) tdLog.exit("tmq consume rows error!") diff --git a/tests/system-test/7-tmq/subscribeStb4.py b/tests/system-test/7-tmq/subscribeStb4.py index 6aa3da66a46b316c55b2586bfc4c82f96fc33a8c..c0feb8fdbae0db690d00c89c9ece335db9eef8a7 100644 --- a/tests/system-test/7-tmq/subscribeStb4.py +++ b/tests/system-test/7-tmq/subscribeStb4.py @@ -231,7 +231,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) @@ -305,7 +305,7 @@ class TDTestCase: self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit) tdLog.info("start consume processor") - pollDelay = 100 + pollDelay = 5 showMsg = 1 showRow = 1 self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow) diff --git a/tests/system-test/7-tmq/tmqDelete-1ctb.py b/tests/system-test/7-tmq/tmqDelete-1ctb.py index 69d2f5e3472da93d3bdce64c3387a7383af85143..16aa402a6d2aae2bf4eb0000abfc9922750b6b42 100644 --- a/tests/system-test/7-tmq/tmqDelete-1ctb.py +++ b/tests/system-test/7-tmq/tmqDelete-1ctb.py @@ -53,7 +53,7 @@ class TDTestCase: paraDict['rowsPerTbl'] = self.rowsPerTbl tmqCom.initConsumerTable() - tdCom.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], vgroups=paraDict["vgroups"],replica=1,wal_retention_size=-1, wal_retention_period=-1) + tdCom.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], vgroups=paraDict["vgroups"],replica=1) tdLog.info("create stb") tmqCom.create_stable(tdSql, dbName=paraDict["dbName"],stbName=paraDict["stbName"]) tdLog.info("create ctb") @@ -237,10 +237,10 @@ class TDTestCase: if self.snapshot == 0: consumerId = 2 - expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 + 1/4 + 3/4)) + expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"]) elif self.snapshot == 1: consumerId = 3 - expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 - 1/4 + 1/4 + 3/4)) + expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 + 1/4)) topicList = topicFromStb1 ifcheckdata = 1 @@ -270,7 +270,7 @@ class TDTestCase: if totalConsumeRows != expectrowcnt: tdLog.exit("tmq consume rows error with snapshot = 0!") elif self.snapshot == 1: - if totalConsumeRows != totalRowsFromQuery: + if totalConsumeRows != expectrowcnt: tdLog.exit("tmq consume rows error with snapshot = 1!") # tmqCom.checkFileContent(consumerId, queryString) @@ -323,7 +323,7 @@ class TDTestCase: if self.snapshot == 0: consumerId = 4 - expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1/4 + 3/4)) + expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"]) elif self.snapshot == 1: consumerId = 5 expectrowcnt = int(paraDict["rowsPerTbl"] * paraDict["ctbNum"] * (1 - 1/4 + 1/4 + 3/4)) @@ -369,11 +369,7 @@ class TDTestCase: tdLog.info("act consume rows: %d, act query rows: %d, expect consume rows: %d, "%(totalConsumeRows, totalRowsFromQuery, expectrowcnt)) if self.snapshot == 0: - # If data writing is completed before consumer get snapshot, will consume 7500 from wal; - # If data writing has not started before consumer get snapshot, will consume 10000 from wal; - minRows = int(expectrowcnt * (1 - 1/4)) # 7500 - tdLog.info("consume rows should be between %d and %d, "%(minRows, expectrowcnt)) - if not ((totalConsumeRows >= minRows) and (totalConsumeRows <= expectrowcnt)): + if (totalConsumeRows != expectrowcnt): tdLog.exit("tmq consume rows error with snapshot = 0!") elif self.snapshot == 1: tdLog.info("consume rows should be between %d and %d, "%(totalRowsFromQuery, expectrowcnt)) @@ -494,7 +490,7 @@ class TDTestCase: tdLog.printNoPrefix("======== test case 4 end ...... ") def run(self): - # tdSql.prepare() + tdSql.prepare() tdLog.printNoPrefix("=============================================") tdLog.printNoPrefix("======== snapshot is 0: only consume from wal") self.snapshot = 0 @@ -520,11 +516,11 @@ class TDTestCase: self.prepareTestEnv() self.tmqCase3() - tdLog.printNoPrefix("=============================================") - tdLog.printNoPrefix("======== snapshot is 0: only consume from wal") - self.snapshot = 0 - self.prepareTestEnv() - self.tmqCase4() + # tdLog.printNoPrefix("=============================================") + # tdLog.printNoPrefix("======== snapshot is 0: only consume from wal") + # self.snapshot = 0 + # self.prepareTestEnv() + # self.tmqCase4() tdLog.printNoPrefix("====================================================================") tdLog.printNoPrefix("======== snapshot is 1: firstly consume from tsbs, and then from wal") self.snapshot = 1