diff --git a/include/common/tmsg.h b/include/common/tmsg.h
index f4502030fd..d78e771fcf 100644
--- a/include/common/tmsg.h
+++ b/include/common/tmsg.h
@@ -2009,10 +2009,8 @@ typedef struct {
int8_t withMeta;
char* sql;
char subDbName[TSDB_DB_FNAME_LEN];
- union {
- char* ast;
- char subStbName[TSDB_TABLE_FNAME_LEN];
- };
+ char* ast;
+ char subStbName[TSDB_TABLE_FNAME_LEN];
} SCMCreateTopicReq;
int32_t tSerializeSCMCreateTopicReq(void* buf, int32_t bufLen, const SCMCreateTopicReq* pReq);
@@ -2809,37 +2807,49 @@ typedef struct {
int64_t suid;
} SMqRebVgReq;
-static FORCE_INLINE int32_t tEncodeSMqRebVgReq(void** buf, const SMqRebVgReq* pReq) {
- int32_t tlen = 0;
- tlen += taosEncodeFixedI64(buf, pReq->leftForVer);
- tlen += taosEncodeFixedI32(buf, pReq->vgId);
- tlen += taosEncodeFixedI64(buf, pReq->oldConsumerId);
- tlen += taosEncodeFixedI64(buf, pReq->newConsumerId);
- tlen += taosEncodeString(buf, pReq->subKey);
- tlen += taosEncodeFixedI8(buf, pReq->subType);
- tlen += taosEncodeFixedI8(buf, pReq->withMeta);
+static FORCE_INLINE int tEncodeSMqRebVgReq(SEncoder *pCoder, const SMqRebVgReq* pReq) {
+ if (tStartEncode(pCoder) < 0) return -1;
+ if (tEncodeI64(pCoder, pReq->leftForVer) < 0) return -1;
+ if (tEncodeI32(pCoder, pReq->vgId) < 0) return -1;
+ if (tEncodeI64(pCoder, pReq->oldConsumerId) < 0) return -1;
+ if (tEncodeI64(pCoder, pReq->newConsumerId) < 0) return -1;
+ if (tEncodeCStr(pCoder, pReq->subKey) < 0) return -1;
+ if (tEncodeI8(pCoder, pReq->subType) < 0) return -1;
+ if (tEncodeI8(pCoder, pReq->withMeta) < 0) return -1;
+
if (pReq->subType == TOPIC_SUB_TYPE__COLUMN) {
- tlen += taosEncodeString(buf, pReq->qmsg);
+ if (tEncodeCStr(pCoder, pReq->qmsg) < 0) return -1;
} else if (pReq->subType == TOPIC_SUB_TYPE__TABLE) {
- tlen += taosEncodeFixedI64(buf, pReq->suid);
+ if (tEncodeI64(pCoder, pReq->suid) < 0) return -1;
+ if (tEncodeCStr(pCoder, pReq->qmsg) < 0) return -1;
}
- return tlen;
+ tEndEncode(pCoder);
+ return 0;
}
-static FORCE_INLINE void* tDecodeSMqRebVgReq(const void* buf, SMqRebVgReq* pReq) {
- buf = taosDecodeFixedI64(buf, &pReq->leftForVer);
- buf = taosDecodeFixedI32(buf, &pReq->vgId);
- buf = taosDecodeFixedI64(buf, &pReq->oldConsumerId);
- buf = taosDecodeFixedI64(buf, &pReq->newConsumerId);
- buf = taosDecodeStringTo(buf, pReq->subKey);
- buf = taosDecodeFixedI8(buf, &pReq->subType);
- buf = taosDecodeFixedI8(buf, &pReq->withMeta);
+static FORCE_INLINE int tDecodeSMqRebVgReq(SDecoder *pCoder, SMqRebVgReq* pReq) {
+ if (tStartDecode(pCoder) < 0) return -1;
+
+ if (tDecodeI64(pCoder, &pReq->leftForVer) < 0) return -1;
+
+ if (tDecodeI32(pCoder, &pReq->vgId) < 0) return -1;
+ if (tDecodeI64(pCoder, &pReq->oldConsumerId) < 0) return -1;
+ if (tDecodeI64(pCoder, &pReq->newConsumerId) < 0) return -1;
+ if (tDecodeCStrTo(pCoder, pReq->subKey) < 0) return -1;
+ if (tDecodeI8(pCoder, &pReq->subType) < 0) return -1;
+ if (tDecodeI8(pCoder, &pReq->withMeta) < 0) return -1;
+
if (pReq->subType == TOPIC_SUB_TYPE__COLUMN) {
- buf = taosDecodeString(buf, &pReq->qmsg);
+ if (tDecodeCStr(pCoder, &pReq->qmsg) < 0) return -1;
} else if (pReq->subType == TOPIC_SUB_TYPE__TABLE) {
- buf = taosDecodeFixedI64(buf, &pReq->suid);
+ if (tDecodeI64(pCoder, &pReq->suid) < 0) return -1;
+ if (!tDecodeIsEnd(pCoder)){
+ if (tDecodeCStr(pCoder, &pReq->qmsg) < 0) return -1;
+ }
}
- return (void*)buf;
+
+ tEndDecode(pCoder);
+ return 0;
}
typedef struct {
diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h
index 8e6c014be9..5410e9af88 100644
--- a/include/common/ttokendef.h
+++ b/include/common/ttokendef.h
@@ -354,6 +354,7 @@
#define TK_WAL 336
+
#define TK_NK_SPACE 600
#define TK_NK_COMMENT 601
#define TK_NK_ILLEGAL 602
diff --git a/include/libs/executor/executor.h b/include/libs/executor/executor.h
index 5101079ff7..3f53976c67 100644
--- a/include/libs/executor/executor.h
+++ b/include/libs/executor/executor.h
@@ -82,6 +82,8 @@ qTaskInfo_t qCreateStreamExecTaskInfo(void* msg, SReadHandle* readers, int32_t v
qTaskInfo_t qCreateQueueExecTaskInfo(void* msg, SReadHandle* pReaderHandle, int32_t vgId, int32_t* numOfCols,
uint64_t id);
+int32_t qGetTableList(int64_t suid, void* pVnode, void* node, SArray **tableList, void* pTaskInfo);
+
/**
* set the task Id, usually used by message queue process
* @param tinfo
diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h
index 9e0cac066d..c8ce9634f5 100644
--- a/include/libs/nodes/cmdnodes.h
+++ b/include/libs/nodes/cmdnodes.h
@@ -364,6 +364,7 @@ typedef struct SCreateTopicStmt {
bool ignoreExists;
bool withMeta;
SNode* pQuery;
+ SNode* pWhere;
} SCreateTopicStmt;
typedef struct SDropTopicStmt {
diff --git a/include/libs/qcom/query.h b/include/libs/qcom/query.h
index e4282c3f34..de3eba599d 100644
--- a/include/libs/qcom/query.h
+++ b/include/libs/qcom/query.h
@@ -51,6 +51,12 @@ typedef enum {
TARGET_TYPE_OTHER,
} ETargetType;
+typedef enum {
+ TCOL_TYPE_COLUMN = 1,
+ TCOL_TYPE_TAG,
+ TCOL_TYPE_NONE,
+} ETableColumnType;
+
#define QUERY_POLICY_VNODE 1
#define QUERY_POLICY_HYBRID 2
#define QUERY_POLICY_QNODE 3
@@ -253,6 +259,7 @@ void destroyQueryExecRes(SExecResult* pRes);
int32_t dataConverToStr(char* str, int type, void* buf, int32_t bufSize, int32_t* len);
char* parseTagDatatoJson(void* p);
int32_t cloneTableMeta(STableMeta* pSrc, STableMeta** pDst);
+void getColumnTypeFromMeta(STableMeta* pMeta, char* pName, ETableColumnType* pType);
int32_t cloneDbVgInfo(SDBVgInfo* pSrc, SDBVgInfo** pDst);
int32_t cloneSVreateTbReq(SVCreateTbReq* pSrc, SVCreateTbReq** pDst);
void freeVgInfo(SDBVgInfo* vgInfo);
diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h
index 1d4bbf073e..8316e6ef50 100644
--- a/include/libs/stream/tstream.h
+++ b/include/libs/stream/tstream.h
@@ -206,7 +206,7 @@ static FORCE_INLINE void streamQueueProcessFail(SStreamQueue* queue) {
void* streamQueueNextItem(SStreamQueue* queue);
SStreamDataSubmit* streamDataSubmitNew(SPackedData* pData, int32_t type);
-void streamDataSubmitDestroy(SStreamDataSubmit* pDataSubmit);
+void streamDataSubmitDestroy(SStreamDataSubmit* pDataSubmit);
SStreamDataSubmit* streamSubmitBlockClone(SStreamDataSubmit* pSubmit);
@@ -284,7 +284,7 @@ struct SStreamTask {
int16_t dispatchMsgType;
SStreamStatus status;
int32_t selfChildId;
- int32_t nodeId; // vgroup id
+ int32_t nodeId; // vgroup id
SEpSet epSet;
SCheckpointInfo chkInfo;
STaskExec exec;
@@ -346,12 +346,14 @@ typedef struct SStreamMeta {
void* streamBackend;
int32_t streamBackendId;
int64_t streamBackendRid;
+ SHashObj* pTaskBackendUnique;
} SStreamMeta;
int32_t tEncodeStreamEpInfo(SEncoder* pEncoder, const SStreamChildEpInfo* pInfo);
int32_t tDecodeStreamEpInfo(SDecoder* pDecoder, SStreamChildEpInfo* pInfo);
-SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, int8_t fillHistory, int64_t triggerParam, SArray* pTaskList);
+SStreamTask* tNewStreamTask(int64_t streamId, int8_t taskLevel, int8_t fillHistory, int64_t triggerParam,
+ SArray* pTaskList);
int32_t tEncodeStreamTask(SEncoder* pEncoder, const SStreamTask* pTask);
int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask);
void tFreeStreamTask(SStreamTask* pTask);
diff --git a/packaging/deb/DEBIAN/preinst b/packaging/deb/DEBIAN/preinst
index f2f98952db..d6558d5b3b 100644
--- a/packaging/deb/DEBIAN/preinst
+++ b/packaging/deb/DEBIAN/preinst
@@ -80,5 +80,5 @@ fi
# there can not libtaos.so*, otherwise ln -s error
${csudo}rm -f ${install_main_dir}/driver/libtaos.* || :
-[ -f ${install_main_dir}/driver/librocksdb.* ] && ${csudo}rm -f ${install_main_dir}/driver/librocksdb.* || :
+[ -f ${install_main_dir}/driver/librocksdb.* ] && ${csudo}rm -f ${install_main_dir}/driver/librocksdb.* || :
[ -f ${install_main_dir}/driver/libtaosws.so ] && ${csudo}rm -f ${install_main_dir}/driver/libtaosws.so || :
diff --git a/packaging/deb/DEBIAN/prerm b/packaging/deb/DEBIAN/prerm
index 7cee258606..8f8d472867 100644
--- a/packaging/deb/DEBIAN/prerm
+++ b/packaging/deb/DEBIAN/prerm
@@ -40,7 +40,7 @@ else
${csudo}rm -f ${inc_link_dir}/taosudf.h || :
[ -f ${inc_link_dir}/taosws.h ] && ${csudo}rm -f ${inc_link_dir}/taosws.h || :
${csudo}rm -f ${lib_link_dir}/libtaos.* || :
- [ -f ${lib_link_dir}/librocksdb.* ] && ${csudo}rm -f ${lib_link_dir}/librocksdb.* || :
+ [ -f ${lib_link_dir}/librocksdb.* ] && ${csudo}rm -f ${lib_link_dir}/librocksdb.* || :
[ -f ${lib_link_dir}/libtaosws.so ] && ${csudo}rm -f ${lib_link_dir}/libtaosws.so || :
${csudo}rm -f ${log_link_dir} || :
diff --git a/packaging/deb/makedeb.sh b/packaging/deb/makedeb.sh
index d5dbd9e4b8..024c69deb1 100755
--- a/packaging/deb/makedeb.sh
+++ b/packaging/deb/makedeb.sh
@@ -95,7 +95,7 @@ fi
cp ${compile_dir}/build/bin/taos ${pkg_dir}${install_home_path}/bin
cp ${compile_dir}/build/lib/${libfile} ${pkg_dir}${install_home_path}/driver
-[ -f ${compile_dir}/build/lib/${rocksdblib} ] && cp ${compile_dir}/build/lib/${rocksdblib} ${pkg_dir}${install_home_path}/driver ||:
+[ -f ${compile_dir}/build/lib/${rocksdblib} ] && cp ${compile_dir}/build/lib/${rocksdblib} ${pkg_dir}${install_home_path}/driver ||:
[ -f ${compile_dir}/build/lib/${wslibfile} ] && cp ${compile_dir}/build/lib/${wslibfile} ${pkg_dir}${install_home_path}/driver ||:
cp ${compile_dir}/../include/client/taos.h ${pkg_dir}${install_home_path}/include
cp ${compile_dir}/../include/common/taosdef.h ${pkg_dir}${install_home_path}/include
diff --git a/packaging/rpm/tdengine.spec b/packaging/rpm/tdengine.spec
index 144cb0cfb2..2b056c376a 100644
--- a/packaging/rpm/tdengine.spec
+++ b/packaging/rpm/tdengine.spec
@@ -93,7 +93,7 @@ if [ -f %{_compiledir}/build/bin/taosadapter ]; then
fi
cp %{_compiledir}/build/lib/${libfile} %{buildroot}%{homepath}/driver
[ -f %{_compiledir}/build/lib/${wslibfile} ] && cp %{_compiledir}/build/lib/${wslibfile} %{buildroot}%{homepath}/driver ||:
-[ -f %{_compiledir}/build/lib/${rocksdblib} ] && cp %{_compiledir}/build/lib/${rocksdblib} %{buildroot}%{homepath}/driver ||:
+[ -f %{_compiledir}/build/lib/${rocksdblib} ] && cp %{_compiledir}/build/lib/${rocksdblib} %{buildroot}%{homepath}/driver ||:
cp %{_compiledir}/../include/client/taos.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/common/taosdef.h %{buildroot}%{homepath}/include
cp %{_compiledir}/../include/util/taoserror.h %{buildroot}%{homepath}/include
@@ -176,7 +176,7 @@ fi
# there can not libtaos.so*, otherwise ln -s error
${csudo}rm -f %{homepath}/driver/libtaos* || :
-${csudo}rm -f %{homepath}/driver/librocksdb* || :
+${csudo}rm -f %{homepath}/driver/librocksdb* || :
#Scripts executed after installation
%post
@@ -222,7 +222,8 @@ if [ $1 -eq 0 ];then
${csudo}rm -f ${inc_link_dir}/taoserror.h || :
${csudo}rm -f ${inc_link_dir}/taosudf.h || :
${csudo}rm -f ${lib_link_dir}/libtaos.* || :
- ${csudo}rm -f ${lib_link_dir}/librocksdb.* || :
+ ${csudo}rm -f ${lib_link_dir}/librocksdb.* || :
+
${csudo}rm -f ${log_link_dir} || :
${csudo}rm -f ${data_link_dir} || :
diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh
index 1501b15196..9aa019f218 100755
--- a/packaging/tools/install.sh
+++ b/packaging/tools/install.sh
@@ -257,11 +257,14 @@ function install_lib() {
${csudo}ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.so.1
${csudo}ln -sf ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so
-
+
${csudo}ln -sf ${install_main_dir}/driver/librocksdb.* ${lib_link_dir}/librocksdb.so.8
${csudo}ln -sf ${lib_link_dir}/librocksdb.so.8 ${lib_link_dir}/librocksdb.so
-
+ ${csudo}ln -sf ${install_main_dir}/driver/librocksdb.* ${lib_link_dir}/librocksdb.so.8
+ ${csudo}ln -sf ${lib_link_dir}/librocksdb.so.8 ${lib_link_dir}/librocksdb.so
+
+
[ -f ${install_main_dir}/driver/libtaosws.so ] && ${csudo}ln -sf ${install_main_dir}/driver/libtaosws.so ${lib_link_dir}/libtaosws.so || :
if [[ -d ${lib64_link_dir} && ! -e ${lib64_link_dir}/libtaos.so ]]; then
diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh
index bf35734da3..ab45c684c4 100755
--- a/packaging/tools/makepkg.sh
+++ b/packaging/tools/makepkg.sh
@@ -111,7 +111,7 @@ fi
if [ "$osType" == "Darwin" ]; then
lib_files="${build_dir}/lib/libtaos.${version}.dylib"
wslib_files="${build_dir}/lib/libtaosws.dylib"
- rocksdb_lib_files="${build_dir}/lib/librocksdb.so.8.1.1"
+ rocksdb_lib_files="${build_dir}/lib/librocksdb.dylib.8.1.1"
else
lib_files="${build_dir}/lib/libtaos.so.${version}"
wslib_files="${build_dir}/lib/libtaosws.so"
diff --git a/packaging/tools/post.sh b/packaging/tools/post.sh
index 1b5eb45f66..10de87966f 100755
--- a/packaging/tools/post.sh
+++ b/packaging/tools/post.sh
@@ -202,6 +202,10 @@ function install_lib() {
log_print "start install lib from ${lib_dir} to ${lib_link_dir}"
${csudo}rm -f ${lib_link_dir}/libtaos* || :
${csudo}rm -f ${lib64_link_dir}/libtaos* || :
+
+ #rocksdb
+ [ -f ${lib_link_dir}/librocksdb* ] && ${csudo}rm -f ${lib_link_dir}/librocksdb* || :
+ [ -f ${lib64_link_dir}/librocksdb* ] && ${csudo}rm -f ${lib64_link_dir}/librocksdb* || :
#rocksdb
[ -f ${lib_link_dir}/librocksdb* ] && ${csudo}rm -f ${lib_link_dir}/librocksdb* || :
diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c
index d7d393becc..ac035e0a2b 100644
--- a/source/common/src/tmsg.c
+++ b/source/common/src/tmsg.c
@@ -4002,11 +4002,16 @@ int32_t tSerializeSCMCreateTopicReq(void *buf, int32_t bufLen, const SCMCreateTo
if (tEncodeI8(&encoder, pReq->withMeta) < 0) return -1;
if (tEncodeCStr(&encoder, pReq->subDbName) < 0) return -1;
if (TOPIC_SUB_TYPE__DB == pReq->subType) {
- } else if (TOPIC_SUB_TYPE__TABLE == pReq->subType) {
- if (tEncodeCStr(&encoder, pReq->subStbName) < 0) return -1;
} else {
- if (tEncodeI32(&encoder, strlen(pReq->ast)) < 0) return -1;
- if (tEncodeCStr(&encoder, pReq->ast) < 0) return -1;
+ if (TOPIC_SUB_TYPE__TABLE == pReq->subType) {
+ if (tEncodeCStr(&encoder, pReq->subStbName) < 0) return -1;
+ }
+ if (pReq->ast && strlen(pReq->ast) > 0) {
+ if (tEncodeI32(&encoder, strlen(pReq->ast)) < 0) return -1;
+ if (tEncodeCStr(&encoder, pReq->ast) < 0) return -1;
+ } else {
+ if (tEncodeI32(&encoder, 0) < 0) return -1;
+ }
}
if (tEncodeI32(&encoder, strlen(pReq->sql)) < 0) return -1;
if (tEncodeCStr(&encoder, pReq->sql) < 0) return -1;
@@ -4032,9 +4037,10 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR
if (tDecodeI8(&decoder, &pReq->withMeta) < 0) return -1;
if (tDecodeCStrTo(&decoder, pReq->subDbName) < 0) return -1;
if (TOPIC_SUB_TYPE__DB == pReq->subType) {
- } else if (TOPIC_SUB_TYPE__TABLE == pReq->subType) {
- if (tDecodeCStrTo(&decoder, pReq->subStbName) < 0) return -1;
} else {
+ if (TOPIC_SUB_TYPE__TABLE == pReq->subType) {
+ if (tDecodeCStrTo(&decoder, pReq->subStbName) < 0) return -1;
+ }
if (tDecodeI32(&decoder, &astLen) < 0) return -1;
if (astLen > 0) {
pReq->ast = taosMemoryCalloc(1, astLen + 1);
@@ -4057,7 +4063,7 @@ int32_t tDeserializeSCMCreateTopicReq(void *buf, int32_t bufLen, SCMCreateTopicR
void tFreeSCMCreateTopicReq(SCMCreateTopicReq *pReq) {
taosMemoryFreeClear(pReq->sql);
- if (TOPIC_SUB_TYPE__COLUMN == pReq->subType) {
+ if (TOPIC_SUB_TYPE__DB != pReq->subType) {
taosMemoryFreeClear(pReq->ast);
}
}
diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c
index df8c11a6f6..64082536da 100644
--- a/source/dnode/mnode/impl/src/mndScheduler.c
+++ b/source/dnode/mnode/impl/src/mndScheduler.c
@@ -513,7 +513,23 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib
terrno = TSDB_CODE_QRY_INVALID_INPUT;
return -1;
}
+ }else if(pTopic->subType == TOPIC_SUB_TYPE__TABLE && pTopic->ast != NULL){
+ SNode *pAst = NULL;
+ if (nodesStringToNode(pTopic->ast, &pAst) != 0) {
+ mError("topic:%s, failed to create since %s", pTopic->name, terrstr());
+ return -1;
+ }
+ SPlanContext cxt = {.pAstRoot = pAst, .topicQuery = true};
+ if (qCreateQueryPlan(&cxt, &pPlan, NULL) != 0) {
+ mError("failed to create topic:%s since %s", pTopic->name, terrstr());
+ nodesDestroyNode(pAst);
+ return -1;
+ }
+ nodesDestroyNode(pAst);
+ }
+
+ if(pPlan){
int32_t levelNum = LIST_LENGTH(pPlan->pSubplans);
if (levelNum != 1) {
qDestroyQueryPlan(pPlan);
@@ -554,7 +570,7 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib
mDebug("init subscription %s for topic:%s assign vgId:%d", pSub->key, pTopic->name, pVgEp->vgId);
- if (pTopic->subType == TOPIC_SUB_TYPE__COLUMN) {
+ if (pSubplan) {
int32_t msgLen;
pSubplan->execNode.epSet = pVgEp->epSet;
diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c
index 03616aaace..d58b9fd4bf 100644
--- a/source/dnode/mnode/impl/src/mndStb.c
+++ b/source/dnode/mnode/impl/src/mndStb.c
@@ -1230,7 +1230,7 @@ static int32_t mndCheckAlterColForTopic(SMnode *pMnode, const char *stbFullName,
mInfo("topic:%s, check tag and column modifiable, stb:%s suid:%" PRId64 " colId:%d, subType:%d sql:%s",
pTopic->name, stbFullName, suid, colId, pTopic->subType, pTopic->sql);
- if (pTopic->subType != TOPIC_SUB_TYPE__COLUMN) {
+ if (pTopic->ast == NULL) {
sdbRelease(pSdb, pTopic);
continue;
}
@@ -2272,7 +2272,7 @@ static int32_t mndCheckDropStbForTopic(SMnode *pMnode, const char *stbFullName,
}
}
- if (pTopic->subType != TOPIC_SUB_TYPE__COLUMN) {
+ if (pTopic->ast == NULL) {
sdbRelease(pSdb, pTopic);
continue;
}
diff --git a/source/dnode/mnode/impl/src/mndSubscribe.c b/source/dnode/mnode/impl/src/mndSubscribe.c
index e62102fa77..74421afa33 100644
--- a/source/dnode/mnode/impl/src/mndSubscribe.c
+++ b/source/dnode/mnode/impl/src/mndSubscribe.c
@@ -111,7 +111,14 @@ static int32_t mndBuildSubChangeReq(void **pBuf, int32_t *pLen, const SMqSubscri
req.suid = pSub->stbUid;
tstrncpy(req.subKey, pSub->key, TSDB_SUBSCRIBE_KEY_LEN);
- int32_t tlen = sizeof(SMsgHead) + tEncodeSMqRebVgReq(NULL, &req);
+ int32_t tlen = 0;
+ int32_t ret = 0;
+ tEncodeSize(tEncodeSMqRebVgReq, &req, tlen, ret);
+ if (ret < 0) {
+ return -1;
+ }
+
+ tlen += sizeof(SMsgHead);
void *buf = taosMemoryMalloc(tlen);
if (buf == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
@@ -123,8 +130,14 @@ static int32_t mndBuildSubChangeReq(void **pBuf, int32_t *pLen, const SMqSubscri
pMsgHead->contLen = htonl(tlen);
pMsgHead->vgId = htonl(pRebVg->pVgEp->vgId);
- void *abuf = POINTER_SHIFT(buf, sizeof(SMsgHead));
- tEncodeSMqRebVgReq(&abuf, &req);
+ SEncoder encoder = {0};
+ tEncoderInit(&encoder, POINTER_SHIFT(buf, sizeof(SMsgHead)), tlen);
+ if (tEncodeSMqRebVgReq(&encoder, &req) < 0) {
+ taosMemoryFreeClear(buf);
+ tEncoderClear(&encoder);
+ return -1;
+ }
+ tEncoderClear(&encoder);
*pBuf = buf;
*pLen = tlen;
diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c
index 95524c0323..f1ee7bca3b 100644
--- a/source/dnode/mnode/impl/src/mndTopic.c
+++ b/source/dnode/mnode/impl/src/mndTopic.c
@@ -28,7 +28,7 @@
#include "parser.h"
#include "tname.h"
-#define MND_TOPIC_VER_NUMBER 2
+#define MND_TOPIC_VER_NUMBER 3
#define MND_TOPIC_RESERVE_SIZE 64
SSdbRaw *mndTopicActionEncode(SMqTopicObj *pTopic);
@@ -170,7 +170,7 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
int8_t sver = 0;
if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto TOPIC_DECODE_OVER;
- if (sver != 1 && sver != 2) {
+ if (sver < 1 || sver > MND_TOPIC_VER_NUMBER) {
terrno = TSDB_CODE_SDB_INVALID_DATA_VER;
goto TOPIC_DECODE_OVER;
}
@@ -197,7 +197,9 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT8(pRaw, dataPos, &pTopic->withMeta, TOPIC_DECODE_OVER);
SDB_GET_INT64(pRaw, dataPos, &pTopic->stbUid, TOPIC_DECODE_OVER);
- SDB_GET_BINARY(pRaw, dataPos, pTopic->stbName, TSDB_TABLE_FNAME_LEN, TOPIC_DECODE_OVER);
+ if (sver >= 3) {
+ SDB_GET_BINARY(pRaw, dataPos, pTopic->stbName, TSDB_TABLE_FNAME_LEN, TOPIC_DECODE_OVER);
+ }
SDB_GET_INT32(pRaw, dataPos, &pTopic->sqlLen, TOPIC_DECODE_OVER);
pTopic->sql = taosMemoryCalloc(pTopic->sqlLen, sizeof(char));
if (pTopic->sql == NULL) {
@@ -422,6 +424,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
mError("failed to create topic:%s since %s", pCreate->name, terrstr());
taosMemoryFree(topicObj.ast);
taosMemoryFree(topicObj.sql);
+ nodesDestroyNode(pAst);
return -1;
}
@@ -429,6 +432,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
if (topicObj.ntbColIds == NULL) {
taosMemoryFree(topicObj.ast);
taosMemoryFree(topicObj.sql);
+ nodesDestroyNode(pAst);
terrno = TSDB_CODE_OUT_OF_MEMORY;
return -1;
}
@@ -444,6 +448,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
mError("topic:%s, failed to create since %s", pCreate->name, terrstr());
taosMemoryFree(topicObj.ast);
taosMemoryFree(topicObj.sql);
+ nodesDestroyNode(pAst);
return -1;
}
@@ -465,6 +470,11 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
strcpy(topicObj.stbName, pCreate->subStbName);
topicObj.stbUid = pStb->uid;
mndReleaseStb(pMnode, pStb);
+ if(pCreate->ast != NULL){
+ qDebugL("topic:%s ast %s", topicObj.name, pCreate->ast);
+ topicObj.ast = taosStrdup(pCreate->ast);
+ topicObj.astLen = strlen(pCreate->ast) + 1;
+ }
}
/*} else if (pCreate->subType == TOPIC_SUB_TYPE__DB) {*/
/*topicObj.ast = NULL;*/
@@ -914,13 +924,12 @@ static int32_t mndRetrieveTopic(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
}else if(pTopic->subType == TOPIC_SUB_TYPE__TABLE){
SStbObj *pStb = mndAcquireStb(pMnode, pTopic->stbName);
if (pStb == NULL) {
- terrno = TSDB_CODE_MND_STB_NOT_EXIST;
- taosMemoryFree(schemaJson);
- return -1;
+ STR_TO_VARSTR(schemaJson, "NULL");
+ mError("mndRetrieveTopic mndAcquireStb null stbName:%s", pTopic->stbName);
+ }else{
+ schemaToJson(pStb->pColumns, pStb->numOfColumns, schemaJson);
+ mndReleaseStb(pMnode, pStb);
}
- schemaToJson(pStb->pColumns, pStb->numOfColumns, schemaJson);
-
- mndReleaseStb(pMnode, pStb);
}else{
STR_TO_VARSTR(schemaJson, "NULL");
}
diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h
index def47187f2..7e19425d56 100644
--- a/source/dnode/vnode/inc/vnode.h
+++ b/source/dnode/vnode/inc/vnode.h
@@ -200,7 +200,7 @@ STqReader *tqReaderOpen(SVnode *pVnode);
void tqReaderClose(STqReader *);
void tqReaderSetColIdList(STqReader *pReader, SArray *pColIdList);
-int32_t tqReaderSetTbUidList(STqReader *pReader, const SArray *tbUidList);
+int32_t tqReaderSetTbUidList(STqReader *pReader, const SArray *tbUidList, const char* id);
int32_t tqReaderAddTbUidList(STqReader *pReader, const SArray *pTableUidList);
int32_t tqReaderRemoveTbUidList(STqReader *pReader, const SArray *tbUidList);
diff --git a/source/dnode/vnode/src/inc/tq.h b/source/dnode/vnode/src/inc/tq.h
index a3e46a8ceb..4ba8d6d69f 100644
--- a/source/dnode/vnode/src/inc/tq.h
+++ b/source/dnode/vnode/src/inc/tq.h
@@ -72,6 +72,8 @@ typedef struct {
typedef struct {
int64_t suid;
+ char* qmsg; // SubPlanToString
+ SNode* node;
} STqExecTb;
typedef struct {
diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h
index faf550ab75..9df95a379a 100644
--- a/source/dnode/vnode/src/inc/tsdb.h
+++ b/source/dnode/vnode/src/inc/tsdb.h
@@ -297,6 +297,7 @@ int32_t tsdbUpdateDelFileHdr(SDelFWriter *pWriter);
// SDelFReader
int32_t tsdbDelFReaderOpen(SDelFReader **ppReader, SDelFile *pFile, STsdb *pTsdb);
int32_t tsdbDelFReaderClose(SDelFReader **ppReader);
+int32_t tsdbReadDelDatav1(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData, int64_t maxVer);
int32_t tsdbReadDelData(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData);
int32_t tsdbReadDelIdx(SDelFReader *pReader, SArray *aDelIdx);
// tsdbRead.c ==============================================================================================
diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c
index 2d7a2d181e..aa6bbbe9df 100644
--- a/source/dnode/vnode/src/tq/tq.c
+++ b/source/dnode/vnode/src/tq/tq.c
@@ -23,8 +23,8 @@
static int32_t tqInitialize(STQ* pTq);
static FORCE_INLINE bool tqIsHandleExec(STqHandle* pHandle) { return TMQ_HANDLE_STATUS_EXEC == pHandle->status; }
-static FORCE_INLINE void tqSetHandleExec(STqHandle* pHandle) {pHandle->status = TMQ_HANDLE_STATUS_EXEC;}
-static FORCE_INLINE void tqSetHandleIdle(STqHandle* pHandle) {pHandle->status = TMQ_HANDLE_STATUS_IDLE;}
+static FORCE_INLINE void tqSetHandleExec(STqHandle* pHandle) { pHandle->status = TMQ_HANDLE_STATUS_EXEC; }
+static FORCE_INLINE void tqSetHandleIdle(STqHandle* pHandle) { pHandle->status = TMQ_HANDLE_STATUS_IDLE; }
int32_t tqInit() {
int8_t old;
@@ -75,8 +75,10 @@ static void destroyTqHandle(void* data) {
} else if (pData->execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
walCloseReader(pData->pWalReader);
tqReaderClose(pData->execHandle.pTqReader);
+ taosMemoryFreeClear(pData->execHandle.execTb.qmsg);
+ nodesDestroyNode(pData->execHandle.execTb.node);
}
- if(pData->msg != NULL) {
+ if (pData->msg != NULL) {
rpcFreeCont(pData->msg->pCont);
taosMemoryFree(pData->msg);
pData->msg = NULL;
@@ -238,14 +240,15 @@ int32_t tqPushDataRsp(STqHandle* pHandle, int32_t vgId) {
int64_t sver = 0, ever = 0;
walReaderValidVersionRange(pHandle->execHandle.pTqReader->pWalReader, &sver, &ever);
- tqDoSendDataRsp(&pHandle->msg->info, &dataRsp, pHandle->epoch, pHandle->consumerId, TMQ_MSG_TYPE__POLL_RSP, sver, ever);
+ tqDoSendDataRsp(&pHandle->msg->info, &dataRsp, pHandle->epoch, pHandle->consumerId, TMQ_MSG_TYPE__POLL_RSP, sver,
+ ever);
char buf1[80] = {0};
char buf2[80] = {0};
tFormatOffset(buf1, tListLen(buf1), &dataRsp.reqOffset);
tFormatOffset(buf2, tListLen(buf2), &dataRsp.rspOffset);
- tqDebug("vgId:%d, from consumer:0x%" PRIx64 " (epoch %d) push rsp, block num: %d, req:%s, rsp:%s",
- vgId, dataRsp.head.consumerId, dataRsp.head.epoch, dataRsp.blockNum, buf1, buf2);
+ tqDebug("vgId:%d, from consumer:0x%" PRIx64 " (epoch %d) push rsp, block num: %d, req:%s, rsp:%s", vgId,
+ dataRsp.head.consumerId, dataRsp.head.epoch, dataRsp.blockNum, buf1, buf2);
return 0;
}
@@ -261,8 +264,8 @@ int32_t tqSendDataRsp(STqHandle* pHandle, const SRpcMsg* pMsg, const SMqPollReq*
tFormatOffset(buf1, 80, &pRsp->reqOffset);
tFormatOffset(buf2, 80, &pRsp->rspOffset);
- tqDebug("vgId:%d consumer:0x%" PRIx64 " (epoch %d) send rsp, block num:%d, req:%s, rsp:%s, reqId:0x%" PRIx64,
- vgId, pReq->consumerId, pReq->epoch, pRsp->blockNum, buf1, buf2, pReq->reqId);
+ tqDebug("vgId:%d consumer:0x%" PRIx64 " (epoch %d) send rsp, block num:%d, req:%s, rsp:%s, reqId:0x%" PRIx64, vgId,
+ pReq->consumerId, pReq->epoch, pRsp->blockNum, buf1, buf2, pReq->reqId);
return 0;
}
@@ -334,8 +337,7 @@ int32_t tqProcessSeekReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgLen)
STqHandle* pHandle = taosHashGet(pTq->pHandle, pOffset->subKey, strlen(pOffset->subKey));
if (pHandle == NULL) {
- tqError("tmq seek: consumer:0x%" PRIx64 " vgId:%d subkey %s not found", vgOffset.consumerId, vgId,
- pOffset->subKey);
+ tqError("tmq seek: consumer:0x%" PRIx64 " vgId:%d subkey %s not found", vgOffset.consumerId, vgId, pOffset->subKey);
terrno = TSDB_CODE_INVALID_MSG;
return -1;
}
@@ -351,7 +353,7 @@ int32_t tqProcessSeekReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgLen)
}
taosRUnLockLatch(&pTq->lock);
- //3. check the offset info
+ // 3. check the offset info
STqOffset* pSavedOffset = tqOffsetRead(pTq->pOffsetStore, pOffset->subKey);
if (pSavedOffset != NULL) {
if (pSavedOffset->val.type != TMQ_OFFSET__LOG) {
@@ -379,7 +381,7 @@ int32_t tqProcessSeekReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgLen)
tqDebug("vgId:%d sub:%s seek to:%" PRId64 " prev offset:%" PRId64, vgId, pOffset->subKey, pOffset->val.version,
pSavedOffset->val.version);
} else {
- tqDebug("vgId:%d sub:%s seek to:%"PRId64" not saved yet", vgId, pOffset->subKey, pOffset->val.version);
+ tqDebug("vgId:%d sub:%s seek to:%" PRId64 " not saved yet", vgId, pOffset->subKey, pOffset->val.version);
}
if (tqOffsetWrite(pTq->pOffsetStore, pOffset) < 0) {
@@ -421,7 +423,7 @@ int32_t tqCheckColModifiable(STQ* pTq, int64_t tbUid, int32_t colId) {
int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
SMqPollReq req = {0};
- int code = 0;
+ int code = 0;
if (tDeserializeSMqPollReq(pMsg->pCont, pMsg->contLen, &req) < 0) {
tqError("tDeserializeSMqPollReq %d failed", pMsg->contLen);
terrno = TSDB_CODE_INVALID_MSG;
@@ -447,7 +449,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
// 2. check re-balance status
if (pHandle->consumerId != consumerId) {
- tqError("ERROR tmq poll: consumer:0x%" PRIx64 " vgId:%d, subkey %s, mismatch for saved handle consumer:0x%" PRIx64,
+ tqError("ERROR tmq poll: consumer:0x%" PRIx64
+ " vgId:%d, subkey %s, mismatch for saved handle consumer:0x%" PRIx64,
consumerId, TD_VID(pTq->pVnode), req.subKey, pHandle->consumerId);
terrno = TSDB_CODE_TMQ_CONSUMER_MISMATCH;
taosWUnLockLatch(&pTq->lock);
@@ -455,22 +458,26 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
}
bool exec = tqIsHandleExec(pHandle);
- if(!exec) {
+ if (!exec) {
tqSetHandleExec(pHandle);
-// qSetTaskCode(pHandle->execHandle.task, TDB_CODE_SUCCESS);
- tqDebug("tmq poll: consumer:0x%" PRIx64 "vgId:%d, topic:%s, set handle exec, pHandle:%p", consumerId, vgId, req.subKey, pHandle);
+ // qSetTaskCode(pHandle->execHandle.task, TDB_CODE_SUCCESS);
+ tqDebug("tmq poll: consumer:0x%" PRIx64 "vgId:%d, topic:%s, set handle exec, pHandle:%p", consumerId, vgId,
+ req.subKey, pHandle);
taosWUnLockLatch(&pTq->lock);
break;
}
taosWUnLockLatch(&pTq->lock);
- tqDebug("tmq poll: consumer:0x%" PRIx64 "vgId:%d, topic:%s, subscription is executing, wait for 10ms and retry, pHandle:%p", consumerId, vgId, req.subKey, pHandle);
+ tqDebug("tmq poll: consumer:0x%" PRIx64
+ "vgId:%d, topic:%s, subscription is executing, wait for 10ms and retry, pHandle:%p",
+ consumerId, vgId, req.subKey, pHandle);
taosMsleep(10);
}
// 3. update the epoch value
if (pHandle->epoch < reqEpoch) {
- tqDebug("tmq poll: consumer:0x%" PRIx64 " epoch update from %d to %d by poll req", consumerId, pHandle->epoch, reqEpoch);
+ tqDebug("tmq poll: consumer:0x%" PRIx64 " epoch update from %d to %d by poll req", consumerId, pHandle->epoch,
+ reqEpoch);
pHandle->epoch = reqEpoch;
}
@@ -482,7 +489,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
code = tqExtractDataForMq(pTq, pHandle, &req, pMsg);
tqSetHandleIdle(pHandle);
- tqDebug("tmq poll: consumer:0x%" PRIx64 "vgId:%d, topic:%s, , set handle idle, pHandle:%p", consumerId, vgId, req.subKey, pHandle);
+ tqDebug("tmq poll: consumer:0x%" PRIx64 "vgId:%d, topic:%s, , set handle idle, pHandle:%p", consumerId, vgId,
+ req.subKey, pHandle);
return code;
}
@@ -546,7 +554,7 @@ int32_t tqProcessVgWalInfoReq(STQ* pTq, SRpcMsg* pMsg) {
if (reqOffset.type == TMQ_OFFSET__LOG) {
int64_t currentVer = walReaderGetCurrentVer(pHandle->execHandle.pTqReader->pWalReader);
- if (currentVer == -1) { // not start to read data from wal yet, return req offset directly
+ if (currentVer == -1) { // not start to read data from wal yet, return req offset directly
dataRsp.rspOffset.version = reqOffset.version;
} else {
dataRsp.rspOffset.version = currentVer; // return current consume offset value
@@ -570,7 +578,7 @@ int32_t tqProcessVgWalInfoReq(STQ* pTq, SRpcMsg* pMsg) {
int32_t tqProcessDeleteSubReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgLen) {
SMqVDeleteReq* pReq = (SMqVDeleteReq*)msg;
- int32_t vgId = TD_VID(pTq->pVnode);
+ int32_t vgId = TD_VID(pTq->pVnode);
tqDebug("vgId:%d, tq process delete sub req %s", vgId, pReq->subKey);
int32_t code = 0;
@@ -579,7 +587,8 @@ int32_t tqProcessDeleteSubReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
STqHandle* pHandle = taosHashGet(pTq->pHandle, pReq->subKey, strlen(pReq->subKey));
if (pHandle) {
while (tqIsHandleExec(pHandle)) {
- tqDebug("vgId:%d, topic:%s, subscription is executing, wait for 10ms and retry, pHandle:%p", vgId, pHandle->subKey, pHandle);
+ tqDebug("vgId:%d, topic:%s, subscription is executing, wait for 10ms and retry, pHandle:%p", vgId,
+ pHandle->subKey, pHandle);
taosMsleep(10);
}
@@ -639,9 +648,18 @@ int32_t tqProcessDelCheckInfoReq(STQ* pTq, int64_t sversion, char* msg, int32_t
}
int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgLen) {
- int ret = 0;
+ int ret = 0;
SMqRebVgReq req = {0};
- tDecodeSMqRebVgReq(msg, &req);
+ SDecoder dc = {0};
+
+ tDecoderInit(&dc, msg, msgLen);
+
+ // decode req
+ if (tDecodeSMqRebVgReq(&dc, &req) < 0) {
+ terrno = TSDB_CODE_INVALID_MSG;
+ tDecoderClear(&dc);
+ return -1;
+ }
SVnode* pVnode = pTq->pVnode;
int32_t vgId = TD_VID(pVnode);
@@ -664,7 +682,6 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
STqHandle tqHandle = {0};
pHandle = &tqHandle;
- uint64_t oldConsumerId = pHandle->consumerId;
memcpy(pHandle->subKey, req.subKey, TSDB_SUBSCRIBE_KEY_LEN);
pHandle->consumerId = req.newConsumerId;
pHandle->epoch = -1;
@@ -688,8 +705,7 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
pHandle->snapshotVer = ver;
if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
- pHandle->execHandle.execCol.qmsg = req.qmsg;
- req.qmsg = NULL;
+ pHandle->execHandle.execCol.qmsg = taosStrdup(req.qmsg);
pHandle->execHandle.task = qCreateQueueExecTaskInfo(pHandle->execHandle.execCol.qmsg, &handle, vgId,
&pHandle->execHandle.numOfCols, req.newConsumerId);
@@ -709,51 +725,63 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
} else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
pHandle->pWalReader = walOpenReader(pVnode->pWal, NULL);
pHandle->execHandle.execTb.suid = req.suid;
+ pHandle->execHandle.execTb.qmsg = taosStrdup(req.qmsg);
- SArray* tbUidList = taosArrayInit(0, sizeof(int64_t));
- vnodeGetCtbIdList(pVnode, req.suid, tbUidList);
- tqDebug("vgId:%d, tq try to get all ctb, suid:%" PRId64, pVnode->config.vgId, req.suid);
- for (int32_t i = 0; i < taosArrayGetSize(tbUidList); i++) {
- int64_t tbUid = *(int64_t*)taosArrayGet(tbUidList, i);
- tqDebug("vgId:%d, idx %d, uid:%" PRId64, vgId, i, tbUid);
+ if (strcmp(pHandle->execHandle.execTb.qmsg, "") != 0) {
+ if (nodesStringToNode(pHandle->execHandle.execTb.qmsg, &pHandle->execHandle.execTb.node) != 0) {
+ tqError("nodesStringToNode error in sub stable, since %s, vgId:%d, subkey:%s consumer:0x%" PRIx64, terrstr(),
+ pVnode->config.vgId, req.subKey, pHandle->consumerId);
+ return -1;
+ }
}
- pHandle->execHandle.pTqReader = tqReaderOpen(pVnode);
- tqReaderSetTbUidList(pHandle->execHandle.pTqReader, tbUidList);
- taosArrayDestroy(tbUidList);
buildSnapContext(handle.vnode, handle.version, req.suid, pHandle->execHandle.subType, pHandle->fetchMeta,
(SSnapContext**)(&handle.sContext));
pHandle->execHandle.task = qCreateQueueExecTaskInfo(NULL, &handle, vgId, NULL, req.newConsumerId);
+
+ SArray* tbUidList = NULL;
+ ret = qGetTableList(req.suid, pVnode, pHandle->execHandle.execTb.node, &tbUidList, pHandle->execHandle.task);
+ if (ret != TDB_CODE_SUCCESS) {
+ tqError("qGetTableList error:%d vgId:%d, subkey:%s consumer:0x%" PRIx64, ret, pVnode->config.vgId, req.subKey,
+ pHandle->consumerId);
+ taosArrayDestroy(tbUidList);
+ goto end;
+ }
+ tqDebug("tq try to get ctb for stb subscribe, vgId:%d, subkey:%s consumer:0x%" PRIx64 " suid:%" PRId64,
+ pVnode->config.vgId, req.subKey, pHandle->consumerId, req.suid);
+ pHandle->execHandle.pTqReader = tqReaderOpen(pVnode);
+ tqReaderSetTbUidList(pHandle->execHandle.pTqReader, tbUidList, NULL);
+ taosArrayDestroy(tbUidList);
}
taosHashPut(pTq->pHandle, req.subKey, strlen(req.subKey), pHandle, sizeof(STqHandle));
- tqDebug("try to persist handle %s consumer:0x%" PRIx64 " , old consumer:0x%" PRIx64, req.subKey,
- pHandle->consumerId, oldConsumerId);
+ tqDebug("try to persist handle %s consumer:0x%" PRIx64, req.subKey, pHandle->consumerId);
ret = tqMetaSaveHandle(pTq, req.subKey, pHandle);
goto end;
} else {
taosWLockLatch(&pTq->lock);
if (pHandle->consumerId == req.newConsumerId) { // do nothing
- tqInfo("vgId:%d consumer:0x%" PRIx64 " remains, no switch occurs, should not reach here", req.vgId, req.newConsumerId);
+ tqInfo("vgId:%d consumer:0x%" PRIx64 " remains, no switch occurs, should not reach here", req.vgId,
+ req.newConsumerId);
} else {
tqInfo("vgId:%d switch consumer from Id:0x%" PRIx64 " to Id:0x%" PRIx64, req.vgId, pHandle->consumerId,
req.newConsumerId);
atomic_store_64(&pHandle->consumerId, req.newConsumerId);
}
-// atomic_add_fetch_32(&pHandle->epoch, 1);
+ // atomic_add_fetch_32(&pHandle->epoch, 1);
// kill executing task
-// if(tqIsHandleExec(pHandle)) {
-// qTaskInfo_t pTaskInfo = pHandle->execHandle.task;
-// if (pTaskInfo != NULL) {
-// qKillTask(pTaskInfo, TSDB_CODE_SUCCESS);
-// }
+ // if(tqIsHandleExec(pHandle)) {
+ // qTaskInfo_t pTaskInfo = pHandle->execHandle.task;
+ // if (pTaskInfo != NULL) {
+ // qKillTask(pTaskInfo, TSDB_CODE_SUCCESS);
+ // }
-// if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
-// qStreamCloseTsdbReader(pTaskInfo);
-// }
-// }
+ // if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
+ // qStreamCloseTsdbReader(pTaskInfo);
+ // }
+ // }
// remove if it has been register in the push manager, and return one empty block to consumer
tqUnregisterPushHandle(pTq, pHandle);
taosWUnLockLatch(&pTq->lock);
@@ -761,13 +789,11 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
}
end:
- taosMemoryFree(req.qmsg);
+ tDecoderClear(&dc);
return ret;
}
-void freePtr(void *ptr) {
- taosMemoryFree(*(void**)ptr);
-}
+void freePtr(void* ptr) { taosMemoryFree(*(void**)ptr); }
int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) {
int32_t vgId = TD_VID(pTq->pVnode);
@@ -790,7 +816,7 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) {
pTask->chkInfo.currentVer = ver;
// expand executor
- pTask->status.taskStatus = (pTask->fillHistory)? TASK_STATUS__WAIT_DOWNSTREAM:TASK_STATUS__NORMAL;
+ pTask->status.taskStatus = (pTask->fillHistory) ? TASK_STATUS__WAIT_DOWNSTREAM : TASK_STATUS__NORMAL;
if (pTask->taskLevel == TASK_LEVEL__SOURCE) {
pTask->pState = streamStateOpen(pTq->pStreamMeta->path, pTask, false, -1, -1);
@@ -856,8 +882,8 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) {
streamSetupTrigger(pTask);
- tqInfo("vgId:%d expand stream task, s-task:%s, checkpoint ver:%" PRId64 " child id:%d, level:%d", vgId, pTask->id.idStr,
- pTask->chkInfo.version, pTask->selfChildId, pTask->taskLevel);
+ tqInfo("vgId:%d expand stream task, s-task:%s, checkpoint ver:%" PRId64 " child id:%d, level:%d", vgId,
+ pTask->id.idStr, pTask->chkInfo.version, pTask->selfChildId, pTask->taskLevel);
// next valid version will add one
pTask->chkInfo.version += 1;
@@ -970,7 +996,8 @@ int32_t tqProcessTaskDeployReq(STQ* pTq, int64_t sversion, char* msg, int32_t ms
SStreamTask* pTask = taosMemoryCalloc(1, sizeof(SStreamTask));
if (pTask == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
- tqError("vgId:%d failed to create stream task due to out of memory, alloc size:%d", vgId, (int32_t) sizeof(SStreamTask));
+ tqError("vgId:%d failed to create stream task due to out of memory, alloc size:%d", vgId,
+ (int32_t)sizeof(SStreamTask));
return -1;
}
@@ -1085,7 +1112,7 @@ int32_t tqProcessTaskRecover2Req(STQ* pTq, int64_t sversion, char* msg, int32_t
// do recovery step 2
int64_t st = taosGetTimestampMs();
- tqDebug("s-task:%s start step2 recover, ts:%"PRId64, pTask->id.idStr, st);
+ tqDebug("s-task:%s start step2 recover, ts:%" PRId64, pTask->id.idStr, st);
code = streamSourceRecoverScanStep2(pTask, sversion);
if (code < 0) {
@@ -1093,7 +1120,8 @@ int32_t tqProcessTaskRecover2Req(STQ* pTq, int64_t sversion, char* msg, int32_t
return -1;
}
- qDebug("s-task:%s set the start wal offset to be:%"PRId64, pTask->id.idStr, sversion);
+ qDebug("s-task:%s set start wal scan start ver:%"PRId64, pTask->id.idStr, sversion);
+
walReaderSeekVer(pTask->exec.pWalReader, sversion);
pTask->chkInfo.currentVer = sversion;
@@ -1117,7 +1145,7 @@ int32_t tqProcessTaskRecover2Req(STQ* pTq, int64_t sversion, char* msg, int32_t
return -1;
}
- double el = (taosGetTimestampMs() - st)/ 1000.0;
+ double el = (taosGetTimestampMs() - st) / 1000.0;
tqDebug("s-task:%s step2 recover finished, el:%.2fs", pTask->id.idStr, el);
// dispatch recover finish req to all related downstream task
@@ -1233,8 +1261,8 @@ int32_t tqProcessTaskRunReq(STQ* pTq, SRpcMsg* pMsg) {
SStreamTask* pTask = streamMetaAcquireTask(pTq->pStreamMeta, taskId);
if (pTask != NULL) {
if (pTask->status.taskStatus == TASK_STATUS__NORMAL) {
- tqDebug("vgId:%d s-task:%s start to process block from wal, last chk point:%" PRId64, vgId,
- pTask->id.idStr, pTask->chkInfo.version);
+ tqDebug("vgId:%d s-task:%s start to process block from wal, last chk point:%" PRId64, vgId, pTask->id.idStr,
+ pTask->chkInfo.version);
streamProcessRunReq(pTask);
} else {
if (streamTaskShouldPause(&pTask->status)) {
@@ -1253,9 +1281,9 @@ int32_t tqProcessTaskRunReq(STQ* pTq, SRpcMsg* pMsg) {
}
int32_t tqProcessTaskDispatchReq(STQ* pTq, SRpcMsg* pMsg, bool exec) {
- char* msgStr = pMsg->pCont;
- char* msgBody = POINTER_SHIFT(msgStr, sizeof(SMsgHead));
- int32_t msgLen = pMsg->contLen - sizeof(SMsgHead);
+ char* msgStr = pMsg->pCont;
+ char* msgBody = POINTER_SHIFT(msgStr, sizeof(SMsgHead));
+ int32_t msgLen = pMsg->contLen - sizeof(SMsgHead);
SStreamDispatchReq req = {0};
@@ -1301,7 +1329,7 @@ int32_t tqProcessTaskDropReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgL
int32_t tqProcessTaskPauseReq(STQ* pTq, int64_t sversion, char* msg, int32_t msgLen) {
SVPauseStreamTaskReq* pReq = (SVPauseStreamTaskReq*)msg;
- SStreamTask* pTask = streamMetaAcquireTask(pTq->pStreamMeta, pReq->taskId);
+ SStreamTask* pTask = streamMetaAcquireTask(pTq->pStreamMeta, pReq->taskId);
if (pTask) {
tqDebug("vgId:%d s-task:%s set pause flag", pTq->pStreamMeta->vgId, pTask->id.idStr);
atomic_store_8(&pTask->status.keepTaskStatus, pTask->status.taskStatus);
diff --git a/source/dnode/vnode/src/tq/tqMeta.c b/source/dnode/vnode/src/tq/tqMeta.c
index 1c52eb0425..ba6d7cb501 100644
--- a/source/dnode/vnode/src/tq/tqMeta.c
+++ b/source/dnode/vnode/src/tq/tqMeta.c
@@ -37,6 +37,9 @@ int32_t tEncodeSTqHandle(SEncoder* pEncoder, const STqHandle* pHandle) {
}
} else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
if (tEncodeI64(pEncoder, pHandle->execHandle.execTb.suid) < 0) return -1;
+ if (pHandle->execHandle.execTb.qmsg != NULL){
+ if (tEncodeCStr(pEncoder, pHandle->execHandle.execTb.qmsg) < 0) return -1;
+ }
}
tEndEncode(pEncoder);
return pEncoder->pos;
@@ -64,6 +67,9 @@ int32_t tDecodeSTqHandle(SDecoder* pDecoder, STqHandle* pHandle) {
}
} else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
if (tDecodeI64(pDecoder, &pHandle->execHandle.execTb.suid) < 0) return -1;
+ if (!tDecodeIsEnd(pDecoder)){
+ if (tDecodeCStrAlloc(pDecoder, &pHandle->execHandle.execTb.qmsg) < 0) return -1;
+ }
}
tEndDecode(pDecoder);
return 0;
@@ -337,20 +343,27 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
} else if (handle.execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
handle.pWalReader = walOpenReader(pTq->pVnode->pWal, NULL);
- SArray* tbUidList = taosArrayInit(0, sizeof(int64_t));
- vnodeGetCtbIdList(pTq->pVnode, handle.execHandle.execTb.suid, tbUidList);
- tqDebug("vgId:%d, tq try to get all ctb, suid:%" PRId64, pTq->pVnode->config.vgId, handle.execHandle.execTb.suid);
- for (int32_t i = 0; i < taosArrayGetSize(tbUidList); i++) {
- int64_t tbUid = *(int64_t*)taosArrayGet(tbUidList, i);
- tqDebug("vgId:%d, idx %d, uid:%" PRId64, vgId, i, tbUid);
+ if(handle.execHandle.execTb.qmsg != NULL && strcmp(handle.execHandle.execTb.qmsg, "") != 0) {
+ if (nodesStringToNode(handle.execHandle.execTb.qmsg, &handle.execHandle.execTb.node) != 0) {
+ tqError("nodesStringToNode error in sub stable, since %s", terrstr());
+ return -1;
+ }
}
- handle.execHandle.pTqReader = tqReaderOpen(pTq->pVnode);
- tqReaderSetTbUidList(handle.execHandle.pTqReader, tbUidList);
- taosArrayDestroy(tbUidList);
-
buildSnapContext(reader.vnode, reader.version, handle.execHandle.execTb.suid, handle.execHandle.subType,
handle.fetchMeta, (SSnapContext**)(&reader.sContext));
handle.execHandle.task = qCreateQueueExecTaskInfo(NULL, &reader, vgId, NULL, 0);
+
+ SArray* tbUidList = NULL;
+ int ret = qGetTableList(handle.execHandle.execTb.suid, pTq->pVnode, handle.execHandle.execTb.node, &tbUidList, handle.execHandle.task);
+ if(ret != TDB_CODE_SUCCESS) {
+ tqError("qGetTableList error:%d handle %s consumer:0x%" PRIx64, ret, handle.subKey, handle.consumerId);
+ taosArrayDestroy(tbUidList);
+ goto end;
+ }
+ tqDebug("vgId:%d, tq try to get ctb for stb subscribe, suid:%" PRId64, pTq->pVnode->config.vgId, handle.execHandle.execTb.suid);
+ handle.execHandle.pTqReader = tqReaderOpen(pTq->pVnode);
+ tqReaderSetTbUidList(handle.execHandle.pTqReader, tbUidList, NULL);
+ taosArrayDestroy(tbUidList);
}
tqDebug("tq restore %s consumer %" PRId64 " vgId:%d", handle.subKey, handle.consumerId, vgId);
taosHashPut(pTq->pHandle, pKey, kLen, &handle, sizeof(STqHandle));
diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c
index cdf1ded841..77a966715e 100644
--- a/source/dnode/vnode/src/tq/tqRead.c
+++ b/source/dnode/vnode/src/tq/tqRead.c
@@ -394,8 +394,8 @@ bool tqNextBlockInWal(STqReader* pReader, const char* id) {
SSubmitTbData* pSubmitTbData = taosArrayGet(pReader->submit.aSubmitTbData, pReader->nextBlk);
if (pReader->tbIdHash == NULL) {
- SSDataBlock* pRes = NULL;
- int32_t code = tqRetrieveDataBlock(pReader, &pRes, NULL);
+ SSDataBlock* pRes = NULL;
+ int32_t code = tqRetrieveDataBlock(pReader, &pRes, NULL);
if (code == TSDB_CODE_SUCCESS && pRes->info.rows > 0) {
return true;
}
@@ -457,7 +457,7 @@ bool tqNextBlockImpl(STqReader* pReader, const char* idstr) {
int32_t numOfBlocks = taosArrayGetSize(pReader->submit.aSubmitTbData);
while (pReader->nextBlk < numOfBlocks) {
- tqDebug("tq reader next data block, len:%d ver:%" PRId64 " index:%d/%d, %s", pReader->msg.msgLen, pReader->msg.ver,
+ tqDebug("try next data block, len:%d ver:%" PRId64 " index:%d/%d, %s", pReader->msg.msgLen, pReader->msg.ver,
pReader->nextBlk, numOfBlocks, idstr);
SSubmitTbData* pSubmitTbData = taosArrayGet(pReader->submit.aSubmitTbData, pReader->nextBlk);
@@ -467,10 +467,11 @@ bool tqNextBlockImpl(STqReader* pReader, const char* idstr) {
void* ret = taosHashGet(pReader->tbIdHash, &pSubmitTbData->uid, sizeof(int64_t));
if (ret != NULL) {
- tqDebug("tq reader block found, ver:%" PRId64 ", uid:%" PRId64, pReader->msg.ver, pSubmitTbData->uid);
+ tqDebug("block found, ver:%" PRId64 ", uid:%" PRId64", %s", pReader->msg.ver, pSubmitTbData->uid, idstr);
return true;
} else {
- tqDebug("tq reader discard submit block, uid:%" PRId64 ", continue", pSubmitTbData->uid);
+ tqDebug("discard submit block, uid:%" PRId64 ", total queried tables:%d continue %s", pSubmitTbData->uid,
+ taosHashGetSize(pReader->tbIdHash), idstr);
}
pReader->nextBlk++;
@@ -604,7 +605,6 @@ static int32_t doSetVal(SColumnInfoData* pColumnInfoData, int32_t rowIndex, SCol
int32_t tqRetrieveDataBlock(STqReader* pReader, SSDataBlock** pRes, const char* id) {
tqDebug("tq reader retrieve data block %p, index:%d", pReader->msg.msgStr, pReader->nextBlk);
-
SSubmitTbData* pSubmitTbData = taosArrayGet(pReader->submit.aSubmitTbData, pReader->nextBlk++);
SSDataBlock* pBlock = pReader->pResBlock;
@@ -612,6 +612,7 @@ int32_t tqRetrieveDataBlock(STqReader* pReader, SSDataBlock** pRes, const char*
blockDataCleanup(pBlock);
+ int32_t vgId = pReader->pWalReader->pWal->cfg.vgId;
int32_t sversion = pSubmitTbData->sver;
int64_t suid = pSubmitTbData->suid;
int64_t uid = pSubmitTbData->uid;
@@ -628,7 +629,7 @@ int32_t tqRetrieveDataBlock(STqReader* pReader, SSDataBlock** pRes, const char*
if (pReader->pSchemaWrapper == NULL) {
tqWarn("vgId:%d, cannot found schema wrapper for table: suid:%" PRId64 ", uid:%" PRId64
"version %d, possibly dropped table",
- pReader->pWalReader->pWal->cfg.vgId, suid, uid, pReader->cachedSchemaVer);
+ vgId, suid, uid, pReader->cachedSchemaVer);
pReader->cachedSchemaSuid = 0;
terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND;
return -1;
@@ -642,6 +643,7 @@ int32_t tqRetrieveDataBlock(STqReader* pReader, SSDataBlock** pRes, const char*
if (blockDataGetNumOfCols(pBlock) == 0) {
int32_t code = buildResSDataBlock(pReader->pResBlock, pReader->pSchemaWrapper, pReader->pColIdList);
if (code != TSDB_CODE_SUCCESS) {
+ tqError("vgId:%d failed to build data block, code:%s", vgId, tstrerror(code));
return code;
}
}
@@ -998,7 +1000,7 @@ FAIL:
void tqReaderSetColIdList(STqReader* pReader, SArray* pColIdList) { pReader->pColIdList = pColIdList; }
-int tqReaderSetTbUidList(STqReader* pReader, const SArray* tbUidList) {
+int tqReaderSetTbUidList(STqReader* pReader, const SArray* tbUidList, const char* id) {
if (pReader->tbIdHash) {
taosHashClear(pReader->tbIdHash);
} else {
@@ -1015,6 +1017,7 @@ int tqReaderSetTbUidList(STqReader* pReader, const SArray* tbUidList) {
taosHashPut(pReader->tbIdHash, pKey, sizeof(int64_t), NULL, 0);
}
+ tqDebug("s-task:%s %d tables are set to be queried target table", id, (int32_t) taosArrayGetSize(tbUidList));
return 0;
}
@@ -1082,34 +1085,15 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) {
}
} else if (pTqHandle->execHandle.subType == TOPIC_SUB_TYPE__TABLE) {
if (isAdd) {
- SArray* qa = taosArrayInit(4, sizeof(tb_uid_t));
- SMetaReader mr = {0};
- metaReaderInit(&mr, pTq->pVnode->pMeta, 0);
- for (int32_t i = 0; i < taosArrayGetSize(tbUidList); ++i) {
- uint64_t* id = (uint64_t*)taosArrayGet(tbUidList, i);
-
- int32_t code = metaReaderGetTableEntryByUidCache(&mr, *id);
- if (code != TSDB_CODE_SUCCESS) {
- tqError("failed to get table meta, uid:%" PRIu64 " code:%s", *id, tstrerror(terrno));
- continue;
- }
-
- tDecoderClear(&mr.coder);
- if (mr.me.type != TSDB_CHILD_TABLE || mr.me.ctbEntry.suid != pTqHandle->execHandle.execTb.suid) {
- tqDebug("table uid %" PRId64 " does not add to tq handle", *id);
- continue;
- }
-
- tqDebug("table uid %" PRId64 " add to tq handle", *id);
- taosArrayPush(qa, id);
+ SArray* list = NULL;
+ int ret = qGetTableList(pTqHandle->execHandle.execTb.suid, pTq->pVnode, pTqHandle->execHandle.execTb.node, &list, pTqHandle->execHandle.task);
+ if(ret != TDB_CODE_SUCCESS) {
+ tqError("qGetTableList in tqUpdateTbUidList error:%d handle %s consumer:0x%" PRIx64, ret, pTqHandle->subKey, pTqHandle->consumerId);
+ taosArrayDestroy(list);
+ return ret;
}
-
- metaReaderClear(&mr);
- if (taosArrayGetSize(qa) > 0) {
- tqReaderAddTbUidList(pTqHandle->execHandle.pTqReader, qa);
- }
-
- taosArrayDestroy(qa);
+ tqReaderSetTbUidList(pTqHandle->execHandle.pTqReader, list, NULL);
+ taosArrayDestroy(list);
} else {
tqReaderRemoveTbUidList(pTqHandle->execHandle.pTqReader, tbUidList);
}
diff --git a/source/dnode/vnode/src/tq/tqSink.c b/source/dnode/vnode/src/tq/tqSink.c
index 6e02d5e21b..db1b5ed902 100644
--- a/source/dnode/vnode/src/tq/tqSink.c
+++ b/source/dnode/vnode/src/tq/tqSink.c
@@ -294,6 +294,7 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
char* ctbName = pDataBlock->info.parTbName;
if (!ctbName[0]) {
+ memset(ctbName, 0, TSDB_TABLE_NAME_LEN);
if (res == TSDB_CODE_SUCCESS) {
memcpy(ctbName, pTableSinkInfo->tbName, strlen(pTableSinkInfo->tbName));
} else {
diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c
index 6a97ea89b3..c659c8f4a2 100644
--- a/source/dnode/vnode/src/tsdb/tsdbCache.c
+++ b/source/dnode/vnode/src/tsdb/tsdbCache.c
@@ -1454,7 +1454,7 @@ static int32_t getTableDelDataFromDelIdx(SDelFReader *pDelReader, SDelIdx *pDelI
int32_t code = 0;
if (pDelIdx) {
- code = tsdbReadDelData(pDelReader, pDelIdx, aDelData);
+ code = tsdbReadDelDatav1(pDelReader, pDelIdx, aDelData, INT64_MAX);
}
return code;
diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit.c b/source/dnode/vnode/src/tsdb/tsdbCommit.c
index d15f848cfd..b440d51883 100644
--- a/source/dnode/vnode/src/tsdb/tsdbCommit.c
+++ b/source/dnode/vnode/src/tsdb/tsdbCommit.c
@@ -266,7 +266,7 @@ static int32_t tsdbCommitTableDel(SCommitter *pCommitter, STbData *pTbData, SDel
suid = pDelIdx->suid;
uid = pDelIdx->uid;
- code = tsdbReadDelData(pCommitter->pDelFReader, pDelIdx, pCommitter->aDelData);
+ code = tsdbReadDelDatav1(pCommitter->pDelFReader, pDelIdx, pCommitter->aDelData, INT64_MAX);
TSDB_CHECK_CODE(code, lino, _exit);
} else {
taosArrayClear(pCommitter->aDelData);
diff --git a/source/dnode/vnode/src/tsdb/tsdbDataIter.c b/source/dnode/vnode/src/tsdb/tsdbDataIter.c
index e27aec5b1b..8215c1ac29 100644
--- a/source/dnode/vnode/src/tsdb/tsdbDataIter.c
+++ b/source/dnode/vnode/src/tsdb/tsdbDataIter.c
@@ -412,7 +412,7 @@ static int32_t tsdbTombFileDataIterNext(STsdbDataIter2* pIter, STsdbFilterInfo*
}
}
- code = tsdbReadDelData(pIter->tIter.pReader, pDelIdx, pIter->tIter.aDelData);
+ code = tsdbReadDelDatav1(pIter->tIter.pReader, pDelIdx, pIter->tIter.aDelData, INT64_MAX);
TSDB_CHECK_CODE(code, lino, _exit);
pIter->delInfo.suid = pDelIdx->suid;
diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c
index 9cae4ad5aa..2500015ec1 100644
--- a/source/dnode/vnode/src/tsdb/tsdbRead.c
+++ b/source/dnode/vnode/src/tsdb/tsdbRead.c
@@ -2967,7 +2967,7 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
SDelIdx* pIdx = taosArraySearch(pReader->pDelIdx, &idx, tCmprDelIdx, TD_EQ);
if (pIdx != NULL) {
- code = tsdbReadDelData(pReader->pDelFReader, pIdx, pDelData);
+ code = tsdbReadDelDatav1(pReader->pDelFReader, pIdx, pDelData, pReader->verRange.maxVer);
}
if (code != TSDB_CODE_SUCCESS) {
goto _err;
@@ -2978,7 +2978,10 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
if (pMemTbData != NULL) {
p = pMemTbData->pHead;
while (p) {
- taosArrayPush(pDelData, p);
+ if (p->version <= pReader->verRange.maxVer) {
+ taosArrayPush(pDelData, p);
+ }
+
p = p->pNext;
}
}
@@ -2986,7 +2989,9 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
if (piMemTbData != NULL) {
p = piMemTbData->pHead;
while (p) {
- taosArrayPush(pDelData, p);
+ if (p->version <= pReader->verRange.maxVer) {
+ taosArrayPush(pDelData, p);
+ }
p = p->pNext;
}
}
@@ -4558,7 +4563,11 @@ int32_t tsdbReaderOpen(void* pVnode, SQueryTableDataCond* pCond, void* pTableLis
pReader->pIgnoreTables = pIgnoreTables;
- tsdbDebug("%p total numOfTable:%d in this query %s", pReader, numOfTables, pReader->idStr);
+ tsdbDebug("%p total numOfTable:%d, window:%" PRId64 " - %" PRId64 ", verRange:%" PRId64 " - %" PRId64
+ " in this query %s",
+ pReader, numOfTables, pReader->window.skey, pReader->window.ekey, pReader->verRange.minVer,
+ pReader->verRange.maxVer, pReader->idStr);
+
return code;
_err:
diff --git a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
index b25ab393da..4b677533e7 100644
--- a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+++ b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
@@ -1489,6 +1489,10 @@ int32_t tsdbDelFReaderClose(SDelFReader **ppReader) {
}
int32_t tsdbReadDelData(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData) {
+ return tsdbReadDelDatav1(pReader, pDelIdx, aDelData, INT64_MAX);
+}
+
+int32_t tsdbReadDelDatav1(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData, int64_t maxVer) {
int32_t code = 0;
int64_t offset = pDelIdx->offset;
int64_t size = pDelIdx->size;
@@ -1510,11 +1514,15 @@ int32_t tsdbReadDelData(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData
SDelData delData;
n += tGetDelData(pReader->aBuf[0] + n, &delData);
- if (taosArrayPush(aDelData, &delData) == NULL) {
- code = TSDB_CODE_OUT_OF_MEMORY;
- goto _err;
+ if (delData.version > maxVer) {
+ continue;
}
+ if (taosArrayPush(aDelData, &delData) == NULL) {
+ code = TSDB_CODE_OUT_OF_MEMORY;
+ goto _err;
+ }
}
+
ASSERT(n == size);
return code;
diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
index dfea125cc1..b5ca716701 100644
--- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
+++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c
@@ -1166,7 +1166,7 @@ static int32_t tsdbSnapWriteDelTableDataStart(STsdbSnapWriter* pWriter, TABLEID*
int32_t c = tTABLEIDCmprFn(pDelIdx, &pWriter->tbid);
if (c < 0) {
- code = tsdbReadDelData(pWriter->pDelFReader, pDelIdx, pWriter->pTIter->tIter.aDelData);
+ code = tsdbReadDelDatav1(pWriter->pDelFReader, pDelIdx, pWriter->pTIter->tIter.aDelData, INT64_MAX);
TSDB_CHECK_CODE(code, lino, _exit);
SDelIdx* pDelIdxNew = taosArrayReserve(pWriter->aDelIdx, 1);
@@ -1183,7 +1183,7 @@ static int32_t tsdbSnapWriteDelTableDataStart(STsdbSnapWriter* pWriter, TABLEID*
pWriter->pTIter->tIter.iDelIdx++;
} else if (c == 0) {
- code = tsdbReadDelData(pWriter->pDelFReader, pDelIdx, pWriter->aDelData);
+ code = tsdbReadDelDatav1(pWriter->pDelFReader, pDelIdx, pWriter->aDelData, INT64_MAX);
TSDB_CHECK_CODE(code, lino, _exit);
pWriter->pTIter->tIter.iDelIdx++;
diff --git a/source/libs/executor/inc/executorInt.h b/source/libs/executor/inc/executorInt.h
index 79391bc1c5..ffc63a22a8 100644
--- a/source/libs/executor/inc/executorInt.h
+++ b/source/libs/executor/inc/executorInt.h
@@ -456,6 +456,7 @@ typedef struct SStreamIntervalOperatorInfo {
SSHashObj* pUpdatedMap;
int64_t dataVersion;
SStateStore statestore;
+ bool recvGetAll;
} SStreamIntervalOperatorInfo;
typedef struct SDataGroupInfo {
diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c
index 2a44dbb87b..331a2fa7ab 100644
--- a/source/libs/executor/src/executil.c
+++ b/source/libs/executor/src/executil.c
@@ -960,6 +960,7 @@ static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SN
SArray* pBlockList = NULL;
SSDataBlock* pResBlock = NULL;
SScalarParam output = {0};
+ SArray* pUidTagList = NULL;
tagFilterAssist ctx = {0};
ctx.colHash = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_SMALLINT), false, HASH_NO_LOCK);
@@ -979,7 +980,7 @@ static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SN
SDataType type = {.type = TSDB_DATA_TYPE_BOOL, .bytes = sizeof(bool)};
// int64_t stt = taosGetTimestampUs();
- SArray* pUidTagList = taosArrayInit(10, sizeof(STUidTagInfo));
+ pUidTagList = taosArrayInit(10, sizeof(STUidTagInfo));
copyExistedUids(pUidTagList, pUidList);
FilterCondType condType = checkTagCond(pTagCond);
@@ -1151,6 +1152,21 @@ _end:
return code;
}
+int32_t qGetTableList(int64_t suid, void* pVnode, void* node, SArray **tableList, void* pTaskInfo){
+ SSubplan *pSubplan = (SSubplan *)node;
+ SScanPhysiNode pNode = {0};
+ pNode.suid = suid;
+ pNode.uid = suid;
+ pNode.tableType = TSDB_SUPER_TABLE;
+ STableListInfo* pTableListInfo = tableListCreate();
+ uint8_t digest[17] = {0};
+ int code = getTableList(pVnode, &pNode, pSubplan ? pSubplan->pTagCond : NULL, pSubplan ? pSubplan->pTagIndexCond : NULL, pTableListInfo, digest, "qGetTableList", &((SExecTaskInfo*)pTaskInfo)->storageAPI);
+ *tableList = pTableListInfo->pTableList;
+ pTableListInfo->pTableList = NULL;
+ tableListDestroy(pTableListInfo);
+ return code;
+}
+
size_t getTableTagsBufLen(const SNodeList* pGroups) {
size_t keyLen = 0;
diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c
index 74af5c183f..c8b66836d5 100644
--- a/source/libs/executor/src/executor.c
+++ b/source/libs/executor/src/executor.c
@@ -406,7 +406,7 @@ int32_t qUpdateTableListForStreamScanner(qTaskInfo_t tinfo, const SArray* tableI
int32_t code = 0;
if (isAdd) {
- qDebug("add %d tables id into query list, %s", (int32_t)taosArrayGetSize(tableIdList), id);
+ qDebug("try to add %d tables id into query list, %s", (int32_t)taosArrayGetSize(tableIdList), id);
}
// traverse to the stream scanner node to add this table id
diff --git a/source/libs/executor/src/executorInt.c b/source/libs/executor/src/executorInt.c
index 1e432dac87..4f1a0254e4 100644
--- a/source/libs/executor/src/executorInt.c
+++ b/source/libs/executor/src/executorInt.c
@@ -828,7 +828,7 @@ int32_t doCopyToSDataBlock(SExecTaskInfo* pTaskInfo, SSDataBlock* pBlock, SExprS
}
if (pBlock->info.rows + pRow->numOfRows > pBlock->info.capacity) {
- uint32_t newSize = pBlock->info.rows + pRow->numOfRows + (numOfRows - i) > 1 ? 1 : 0;
+ uint32_t newSize = pBlock->info.rows + pRow->numOfRows + ((numOfRows - i) > 1 ? 1 : 0);
blockDataEnsureCapacity(pBlock, newSize);
qDebug("datablock capacity not sufficient, expand to required:%d, current capacity:%d, %s",
newSize, pBlock->info.capacity, GET_TASKID(pTaskInfo));
diff --git a/source/libs/executor/src/filloperator.c b/source/libs/executor/src/filloperator.c
index e2862b19c7..f9e8a32520 100644
--- a/source/libs/executor/src/filloperator.c
+++ b/source/libs/executor/src/filloperator.c
@@ -1059,9 +1059,10 @@ static void doStreamFillImpl(SOperatorInfo* pOperator) {
SSDataBlock* pBlock = pInfo->pSrcBlock;
uint64_t groupId = pBlock->info.id.groupId;
SSDataBlock* pRes = pInfo->pRes;
+ SColumnInfoData* pTsCol = taosArrayGet(pInfo->pSrcBlock->pDataBlock, pInfo->primaryTsCol);
+ TSKEY* tsCol = (TSKEY*)pTsCol->pData;
pRes->info.id.groupId = groupId;
- SColumnInfoData* pTsCol = taosArrayGet(pInfo->pSrcBlock->pDataBlock, pInfo->primaryTsCol);
- TSKEY* tsCol = (TSKEY*)pTsCol->pData;
+ pInfo->srcRowIndex++;
if (pInfo->srcRowIndex == 0) {
keepBlockRowInDiscBuf(pOperator, pFillInfo, pBlock, tsCol, pInfo->srcRowIndex, groupId, pFillSup->rowSize);
@@ -1299,7 +1300,7 @@ static SSDataBlock* doStreamFill(SOperatorInfo* pOperator) {
SSDataBlock* fillResult = NULL;
SOperatorInfo* downstream = pOperator->pDownstream[0];
while (1) {
- if (pInfo->srcRowIndex >= pInfo->pSrcBlock->info.rows) {
+ if (pInfo->srcRowIndex >= pInfo->pSrcBlock->info.rows || pInfo->pSrcBlock->info.rows == 0) {
// If there are delete datablocks, we receive them first.
SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream);
if (pBlock == NULL) {
@@ -1338,7 +1339,7 @@ static SSDataBlock* doStreamFill(SOperatorInfo* pOperator) {
case STREAM_PULL_DATA: {
doApplyStreamScalarCalculation(pOperator, pBlock, pInfo->pSrcBlock);
memcpy(pInfo->pSrcBlock->info.parTbName, pBlock->info.parTbName, TSDB_TABLE_NAME_LEN);
- pInfo->srcRowIndex = 0;
+ pInfo->srcRowIndex = -1;
} break;
case STREAM_CREATE_CHILD_TABLE: {
return pBlock;
@@ -1554,7 +1555,7 @@ SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFi
goto _error;
}
- pInfo->srcRowIndex = 0;
+ pInfo->srcRowIndex = -1;
setOperatorInfo(pOperator, "StreamFillOperator", QUERY_NODE_PHYSICAL_PLAN_STREAM_FILL, false, OP_NOT_OPENED, pInfo,
pTaskInfo);
pOperator->fpSet =
diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c
index fc42e03681..c93b9f4c73 100644
--- a/source/libs/executor/src/scanoperator.c
+++ b/source/libs/executor/src/scanoperator.c
@@ -13,6 +13,8 @@
* along with this program. If not, see .
*/
+// clang-format off
+
#include "executorInt.h"
#include "filter.h"
#include "function.h"
@@ -1040,6 +1042,7 @@ static void setGroupId(SStreamScanInfo* pInfo, SSDataBlock* pBlock, int32_t grou
void resetTableScanInfo(STableScanInfo* pTableScanInfo, STimeWindow* pWin, uint64_t ver) {
pTableScanInfo->base.cond.twindows = *pWin;
+ pTableScanInfo->base.cond.startVersion = 0;
pTableScanInfo->base.cond.endVersion = ver;
pTableScanInfo->scanTimes = 0;
pTableScanInfo->currentGroupId = -1;
@@ -1162,6 +1165,7 @@ static bool prepareRangeScan(SStreamScanInfo* pInfo, SSDataBlock* pBlock, int32_
}
STableScanInfo* pTScanInfo = pInfo->pTableScanOp->info;
+ qDebug("prepare range scan start:%" PRId64 ",end:%" PRId64 ",maxVer:%" PRIu64, win.skey, win.ekey, pInfo->pUpdateInfo->maxDataVersion);
resetTableScanInfo(pInfo->pTableScanOp->info, &win, pInfo->pUpdateInfo->maxDataVersion);
pInfo->pTableScanOp->status = OP_OPENED;
return true;
@@ -1861,6 +1865,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
TSKEY maxTs = pAPI->stateStore.updateInfoFillBlockData(pInfo->pUpdateInfo, pInfo->pRecoverRes, pInfo->primaryTsIndex);
pInfo->twAggSup.maxTs = TMAX(pInfo->twAggSup.maxTs, maxTs);
} else {
+ pInfo->pUpdateInfo->maxDataVersion = pTaskInfo->streamInfo.fillHistoryVer2;
doCheckUpdate(pInfo, pInfo->pRecoverRes->info.window.ekey, pInfo->pRecoverRes);
}
}
@@ -1869,6 +1874,7 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) {
printDataBlock(pInfo->pCreateTbRes, "recover createTbl");
return pInfo->pCreateTbRes;
}
+
qDebug("stream recover scan get block, rows %" PRId64, pInfo->pRecoverRes->info.rows);
printDataBlock(pInfo->pRecoverRes, "scan recover");
return pInfo->pRecoverRes;
@@ -1977,7 +1983,7 @@ FETCH_NEXT_BLOCK:
// printDataBlock(pBlock, "stream scan recv");
return pBlock;
} else if (pInfo->blockType == STREAM_INPUT__DATA_SUBMIT) {
- qDebug("scan mode %d", pInfo->scanMode);
+ qDebug("stream scan mode:%d, %s", pInfo->scanMode, id);
switch (pInfo->scanMode) {
case STREAM_SCAN_FROM_RES: {
pInfo->scanMode = STREAM_SCAN_FROM_READERHANDLE;
@@ -2061,8 +2067,13 @@ FETCH_NEXT_BLOCK:
while (pAPI->tqReaderFn.tqNextBlockImpl(pInfo->tqReader, id)) {
SSDataBlock* pRes = NULL;
+
int32_t code = pAPI->tqReaderFn.tqRetrieveBlock(pInfo->tqReader, &pRes, id);
+ qDebug("retrieve data from submit completed code:%s, rows:%" PRId64 " %s", tstrerror(code), pRes->info.rows,
+ id);
+
if (code != TSDB_CODE_SUCCESS || pRes->info.rows == 0) {
+ qDebug("retrieve data failed, try next block in submit block, %s", id);
continue;
}
@@ -2070,6 +2081,7 @@ FETCH_NEXT_BLOCK:
if (pInfo->pCreateTbRes->info.rows > 0) {
pInfo->scanMode = STREAM_SCAN_FROM_RES;
+ qDebug("create table res exists, rows:%"PRId64" return from stream scan, %s", pInfo->pCreateTbRes->info.rows, id);
return pInfo->pCreateTbRes;
}
@@ -2078,6 +2090,8 @@ FETCH_NEXT_BLOCK:
pBlock->info.dataLoad = 1;
blockDataUpdateTsWindow(pBlock, pInfo->primaryTsIndex);
+ qDebug("%" PRId64 " rows in datablock, update res:%" PRId64 " %s", pBlockInfo->rows,
+ pInfo->pUpdateDataRes->info.rows, id);
if (pBlockInfo->rows > 0 || pInfo->pUpdateDataRes->info.rows > 0) {
break;
}
@@ -2094,7 +2108,7 @@ FETCH_NEXT_BLOCK:
pInfo->numOfExec++;
pOperator->resultInfo.totalRows += pBlockInfo->rows;
- qDebug("stream scan get source rows:%" PRId64", %s", pBlockInfo->rows, id);
+ qDebug("stream scan completed, and return source rows:%" PRId64", %s", pBlockInfo->rows, id);
if (pBlockInfo->rows > 0) {
return pBlock;
}
@@ -2280,7 +2294,8 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys
SArray* pColIds = NULL;
SStreamScanInfo* pInfo = taosMemoryCalloc(1, sizeof(SStreamScanInfo));
SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo));
- SStorageAPI* pAPI = &pTaskInfo->storageAPI;
+ SStorageAPI* pAPI = &pTaskInfo->storageAPI;
+ const char* idstr = pTaskInfo->id.str;
if (pInfo == NULL || pOperator == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
@@ -2391,7 +2406,7 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys
// set the extract column id to streamHandle
pAPI->tqReaderFn.tqReaderSetColIdList(pInfo->tqReader, pColIds);
SArray* tableIdList = extractTableIdList(((STableScanInfo*)(pInfo->pTableScanOp->info))->base.pTableListInfo);
- code = pAPI->tqReaderFn.tqReaderSetQueryTableList(pInfo->tqReader, tableIdList);
+ code = pAPI->tqReaderFn.tqReaderSetQueryTableList(pInfo->tqReader, tableIdList, idstr);
if (code != 0) {
taosArrayDestroy(tableIdList);
goto _error;
@@ -2441,6 +2456,7 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys
int32_t len = 0;
pAPI->stateStore.streamStateGetInfo(pTaskInfo->streamInfo.pState, STREAM_SCAN_OP_NAME, strlen(STREAM_SCAN_OP_NAME), &buff, &len);
streamScanOperatorDecode(buff, len, pInfo);
+ taosMemoryFree(buff);
}
setOperatorInfo(pOperator, STREAM_SCAN_OP_NAME, QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN, false, OP_NOT_OPENED, pInfo,
@@ -3455,3 +3471,5 @@ static void destoryTableCountScanOperator(void* param) {
taosArrayDestroy(pTableCountScanInfo->stbUidList);
taosMemoryFreeClear(param);
}
+
+// clang-format on
diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c
index e757fdeac5..3a83472079 100644
--- a/source/libs/executor/src/timewindowoperator.c
+++ b/source/libs/executor/src/timewindowoperator.c
@@ -2439,6 +2439,15 @@ static inline int winPosCmprImpl(const void* pKey1, const void* pKey2) {
return 0;
}
+static void resetUnCloseWinInfo(SSHashObj* winMap) {
+ void* pIte = NULL;
+ int32_t iter = 0;
+ while ((pIte = tSimpleHashIterate(winMap, pIte, &iter)) != NULL) {
+ SRowBuffPos* pPos = *(SRowBuffPos**)pIte;
+ pPos->beUsed = true;
+ }
+}
+
static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
SStreamIntervalOperatorInfo* pInfo = pOperator->info;
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
@@ -2472,6 +2481,11 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
return pInfo->binfo.pRes;
}
+ if (pInfo->recvGetAll) {
+ pInfo->recvGetAll = false;
+ resetUnCloseWinInfo(pInfo->aggSup.pResultRowHashTable);
+ }
+
setOperatorCompleted(pOperator);
if (!IS_FINAL_OP(pInfo)) {
clearFunctionContext(&pOperator->exprSupp);
@@ -2565,6 +2579,7 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
break;
} else if (pBlock->info.type == STREAM_GET_ALL && IS_FINAL_OP(pInfo)) {
+ pInfo->recvGetAll = true;
getAllIntervalWindow(pInfo->aggSup.pResultRowHashTable, pInfo->pUpdatedMap);
continue;
} else if (pBlock->info.type == STREAM_RETRIEVE && !IS_FINAL_OP(pInfo)) {
@@ -2773,6 +2788,7 @@ SOperatorInfo* createStreamFinalIntervalOperatorInfo(SOperatorInfo* downstream,
compareTs, pInfo->pState, pInfo->twAggSup.deleteMark);
pInfo->dataVersion = 0;
pInfo->statestore = pTaskInfo->storageAPI.stateStore;
+ pInfo->recvGetAll = false;
pOperator->operatorType = pPhyNode->type;
pOperator->blocking = true;
@@ -2867,7 +2883,7 @@ void initDownStream(SOperatorInfo* downstream, SStreamAggSupporter* pAggSup, uin
SStreamScanInfo* pScanInfo = downstream->info;
pScanInfo->windowSup = (SWindowSupporter){.pStreamAggSup = pAggSup, .gap = pAggSup->gap, .parentType = type};
pScanInfo->pState = pAggSup->pState;
- if ((!pScanInfo->igCheckUpdate || type == QUERY_NODE_PHYSICAL_PLAN_STREAM_STATE) && !pScanInfo->pUpdateInfo) {
+ if (!pScanInfo->pUpdateInfo) {
pScanInfo->pUpdateInfo = pAggSup->stateStore.updateInfoInit(60000, TSDB_TIME_PRECISION_MILLI, pTwSup->waterMark);
}
pScanInfo->twAggSup = *pTwSup;
@@ -4751,6 +4767,12 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
printDataBlock(pInfo->binfo.pRes, "single interval");
return pInfo->binfo.pRes;
}
+
+ if (pInfo->recvGetAll) {
+ pInfo->recvGetAll = false;
+ resetUnCloseWinInfo(pInfo->aggSup.pResultRowHashTable);
+ }
+
setOperatorCompleted(pOperator);
if (pInfo->twAggSup.maxTs > 0 &&
pInfo->twAggSup.maxTs - pInfo->twAggSup.checkPointInterval > pInfo->twAggSup.checkPointTs) {
@@ -4790,6 +4812,7 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
continue;
} else if (pBlock->info.type == STREAM_GET_ALL) {
qDebug("===stream===single interval recv|block type STREAM_GET_ALL");
+ pInfo->recvGetAll = true;
getAllIntervalWindow(pInfo->aggSup.pResultRowHashTable, pInfo->pUpdatedMap);
continue;
} else if (pBlock->info.type == STREAM_CREATE_CHILD_TABLE) {
@@ -4960,6 +4983,8 @@ SOperatorInfo* createStreamIntervalOperatorInfo(SOperatorInfo* downstream, SPhys
destroyStreamFinalIntervalOperatorInfo, optrDefaultBufFn, NULL);
pInfo->statestore = pTaskInfo->storageAPI.stateStore;
+ pInfo->recvGetAll = false;
+
initIntervalDownStream(downstream, pPhyNode->type, pInfo);
code = appendDownstream(pOperator, &downstream, 1);
if (code != TSDB_CODE_SUCCESS) {
diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c
index db9deb5210..39e288f694 100644
--- a/source/libs/nodes/src/nodesUtilFuncs.c
+++ b/source/libs/nodes/src/nodesUtilFuncs.c
@@ -921,6 +921,7 @@ void nodesDestroyNode(SNode* pNode) {
break;
case QUERY_NODE_CREATE_TOPIC_STMT:
nodesDestroyNode(((SCreateTopicStmt*)pNode)->pQuery);
+ nodesDestroyNode(((SCreateTopicStmt*)pNode)->pWhere);
break;
case QUERY_NODE_DROP_TOPIC_STMT: // no pointer field
case QUERY_NODE_DROP_CGROUP_STMT: // no pointer field
diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h
index 43765c8112..43df082bae 100644
--- a/source/libs/parser/inc/parAst.h
+++ b/source/libs/parser/inc/parAst.h
@@ -207,7 +207,7 @@ SNode* createCreateTopicStmtUseQuery(SAstCreateContext* pCxt, bool ignoreExists,
SNode* createCreateTopicStmtUseDb(SAstCreateContext* pCxt, bool ignoreExists, SToken* pTopicName, SToken* pSubDbName,
bool withMeta);
SNode* createCreateTopicStmtUseTable(SAstCreateContext* pCxt, bool ignoreExists, SToken* pTopicName, SNode* pRealTable,
- bool withMeta);
+ bool withMeta, SNode* pWhere);
SNode* createDropTopicStmt(SAstCreateContext* pCxt, bool ignoreNotExists, SToken* pTopicName);
SNode* createDropCGroupStmt(SAstCreateContext* pCxt, bool ignoreNotExists, const SToken* pCGroupId, SToken* pTopicName);
SNode* createAlterLocalStmt(SAstCreateContext* pCxt, const SToken* pConfig, const SToken* pValue);
diff --git a/source/libs/parser/inc/parUtil.h b/source/libs/parser/inc/parUtil.h
index 850571eea1..9632ccf0fb 100644
--- a/source/libs/parser/inc/parUtil.h
+++ b/source/libs/parser/inc/parUtil.h
@@ -115,6 +115,7 @@ int32_t getTableIndexFromCache(SParseMetaCache* pMetaCache, const SName* pName,
int32_t getTableCfgFromCache(SParseMetaCache* pMetaCache, const SName* pName, STableCfg** pOutput);
int32_t getDnodeListFromCache(SParseMetaCache* pMetaCache, SArray** pDnodes);
void destoryParseMetaCache(SParseMetaCache* pMetaCache, bool request);
+SNode* createSelectStmtImpl(bool isDistinct, SNodeList* pProjectionList, SNode* pTable);
#ifdef __cplusplus
}
diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y
index 9b8393f624..a161f90cf0 100755
--- a/source/libs/parser/inc/sql.y
+++ b/source/libs/parser/inc/sql.y
@@ -543,9 +543,9 @@ cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B) AS DATABASE db_name(C).
cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B)
WITH META AS DATABASE db_name(C). { pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, A, &B, &C, true); }
cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B)
- AS STABLE full_table_name(C). { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, A, &B, C, false); }
+ AS STABLE full_table_name(C) where_clause_opt(D). { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, A, &B, C, false, D); }
cmd ::= CREATE TOPIC not_exists_opt(A) topic_name(B)
- WITH META AS STABLE full_table_name(C). { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, A, &B, C, true); }
+ WITH META AS STABLE full_table_name(C) where_clause_opt(D). { pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, A, &B, C, true, D); }
cmd ::= DROP TOPIC exists_opt(A) topic_name(B). { pCxt->pRootNode = createDropTopicStmt(pCxt, A, &B); }
cmd ::= DROP CONSUMER GROUP exists_opt(A) cgroup_name(B) ON topic_name(C). { pCxt->pRootNode = createDropCGroupStmt(pCxt, A, &B, &C); }
diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c
index d0b65136ea..8af54e245b 100644
--- a/source/libs/parser/src/parAstCreater.c
+++ b/source/libs/parser/src/parAstCreater.c
@@ -833,16 +833,9 @@ SNode* addFillClause(SAstCreateContext* pCxt, SNode* pStmt, SNode* pFill) {
SNode* createSelectStmt(SAstCreateContext* pCxt, bool isDistinct, SNodeList* pProjectionList, SNode* pTable) {
CHECK_PARSER_STATUS(pCxt);
- SSelectStmt* select = (SSelectStmt*)nodesMakeNode(QUERY_NODE_SELECT_STMT);
+ SNode* select = createSelectStmtImpl(isDistinct, pProjectionList, pTable);
CHECK_OUT_OF_MEM(select);
- select->isDistinct = isDistinct;
- select->pProjectionList = pProjectionList;
- select->pFromTable = pTable;
- sprintf(select->stmtName, "%p", select);
- select->isTimeLineResult = true;
- select->onlyHasKeepOrderFunc = true;
- select->timeRange = TSWINDOW_INITIALIZER;
- return (SNode*)select;
+ return select;
}
static void setSubquery(SNode* pStmt) {
@@ -1723,7 +1716,7 @@ SNode* createCreateTopicStmtUseDb(SAstCreateContext* pCxt, bool ignoreExists, ST
}
SNode* createCreateTopicStmtUseTable(SAstCreateContext* pCxt, bool ignoreExists, SToken* pTopicName, SNode* pRealTable,
- bool withMeta) {
+ bool withMeta, SNode* pWhere) {
CHECK_PARSER_STATUS(pCxt);
if (!checkTopicName(pCxt, pTopicName)) {
return NULL;
@@ -1733,6 +1726,8 @@ SNode* createCreateTopicStmtUseTable(SAstCreateContext* pCxt, bool ignoreExists,
COPY_STRING_FORM_ID_TOKEN(pStmt->topicName, pTopicName);
pStmt->ignoreExists = ignoreExists;
pStmt->withMeta = withMeta;
+ pStmt->pWhere = pWhere;
+
strcpy(pStmt->subDbName, ((SRealTableNode*)pRealTable)->table.dbName);
strcpy(pStmt->subSTbName, ((SRealTableNode*)pRealTable)->table.tableName);
nodesDestroyNode(pRealTable);
diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c
index df080b574c..801d43e2a4 100644
--- a/source/libs/parser/src/parAstParser.c
+++ b/source/libs/parser/src/parAstParser.c
@@ -355,6 +355,11 @@ static int32_t collectMetaKeyFromCreateTopic(SCollectMetaKeyCxt* pCxt, SCreateTo
if (NULL != pStmt->pQuery) {
return collectMetaKeyFromQuery(pCxt, pStmt->pQuery);
}
+ if (NULL != pStmt->pWhere) {
+ int32_t code = collectMetaKeyFromRealTableImpl(pCxt, pStmt->subDbName, pStmt->subSTbName,
+ AUTH_TYPE_READ);
+ return code;
+ }
return TSDB_CODE_SUCCESS;
}
diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c
index 84fb2713ac..9ebbecd148 100644
--- a/source/libs/parser/src/parTranslater.c
+++ b/source/libs/parser/src/parTranslater.c
@@ -55,6 +55,13 @@ typedef struct STranslateContext {
bool showRewrite;
} STranslateContext;
+typedef struct SBuildTopicContext {
+ bool colExists;
+ bool colNotFound;
+ STableMeta* pMeta;
+ SNodeList* pTags;
+} SBuildTopicContext;
+
typedef struct SFullDatabaseName {
char fullDbName[TSDB_DB_FNAME_LEN];
} SFullDatabaseName;
@@ -5825,6 +5832,9 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS
toName(pCxt->pParseCxt->acctId, pStmt->subDbName, pStmt->subSTbName, &name);
tNameGetFullDbName(&name, pReq->subDbName);
tNameExtractFullName(&name, pReq->subStbName);
+ if(pStmt->pQuery != NULL) {
+ code = nodesNodeToString(pStmt->pQuery, false, &pReq->ast, NULL);
+ }
} else if ('\0' != pStmt->subDbName[0]) {
pReq->subType = TOPIC_SUB_TYPE__DB;
tNameSetDbName(&name, pCxt->pParseCxt->acctId, pStmt->subDbName, strlen(pStmt->subDbName));
@@ -5847,12 +5857,108 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS
return code;
}
+static int32_t addTagList(SNodeList** ppList, SNode* pNode) {
+ if (NULL == *ppList) {
+ *ppList = nodesMakeList();
+ }
+
+ nodesListStrictAppend(*ppList, pNode);
+
+ return TSDB_CODE_SUCCESS;
+}
+
+static EDealRes checkColumnTagsInCond(SNode* pNode, void* pContext) {
+ SBuildTopicContext* pCxt = (SBuildTopicContext*)pContext;
+ if (QUERY_NODE_COLUMN == nodeType(pNode)) {
+ ETableColumnType type;
+ getColumnTypeFromMeta(pCxt->pMeta, ((SColumnNode*)pNode)->colName, &type);
+ if (type == TCOL_TYPE_COLUMN) {
+ pCxt->colExists = true;
+ return DEAL_RES_ERROR;
+ } else if (type == TCOL_TYPE_TAG) {
+ addTagList(&pCxt->pTags, nodesCloneNode(pNode));
+ } else {
+ pCxt->colNotFound = true;
+ return DEAL_RES_ERROR;
+ }
+ } else if (QUERY_NODE_FUNCTION == nodeType(pNode)) {
+ SFunctionNode* pFunc = (SFunctionNode*)pNode;
+ if (0 == strcasecmp(pFunc->functionName, "tbname")) {
+ addTagList(&pCxt->pTags, nodesCloneNode(pNode));
+ }
+ }
+
+ return DEAL_RES_CONTINUE;
+}
+
+static int32_t checkCollectTopicTags(STranslateContext* pCxt, SCreateTopicStmt* pStmt, STableMeta* pMeta, SNodeList** ppProjection) {
+ SBuildTopicContext colCxt = {.colExists = false, .colNotFound = false, .pMeta = pMeta, .pTags = NULL};
+ nodesWalkExprPostOrder(pStmt->pWhere, checkColumnTagsInCond, &colCxt);
+ if (colCxt.colNotFound) {
+ nodesDestroyList(colCxt.pTags);
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, "Invalid column name");
+ } else if (colCxt.colExists) {
+ nodesDestroyList(colCxt.pTags);
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, "Columns are forbidden in where clause");
+ }
+ if (NULL == colCxt.pTags) { // put one column to select
+// for (int32_t i = 0; i < pMeta->tableInfo.numOfColumns; ++i) {
+ SSchema* column = &pMeta->schema[0];
+ SColumnNode* col = (SColumnNode*)nodesMakeNode(QUERY_NODE_COLUMN);
+ strcpy(col->colName, column->name);
+ strcpy(col->node.aliasName, col->colName);
+ strcpy(col->node.userAlias, col->colName);
+ addTagList(&colCxt.pTags, (SNode*)col);
+// }
+ }
+
+ *ppProjection = colCxt.pTags;
+ return TSDB_CODE_SUCCESS;
+}
+
+static int32_t buildQueryForTableTopic(STranslateContext* pCxt, SCreateTopicStmt* pStmt, SNode** pSelect) {
+ SParseContext* pParCxt = pCxt->pParseCxt;
+ SRequestConnInfo connInfo = {.pTrans = pParCxt->pTransporter,
+ .requestId = pParCxt->requestId,
+ .requestObjRefId = pParCxt->requestRid,
+ .mgmtEps = pParCxt->mgmtEpSet};
+ SName name;
+ STableMeta* pMeta = NULL;
+ int32_t code = getTableMetaImpl(pCxt, toName(pParCxt->acctId, pStmt->subDbName, pStmt->subSTbName, &name), &pMeta);
+ if (code) {
+ taosMemoryFree(pMeta);
+ return code;
+ }
+ if (TSDB_SUPER_TABLE != pMeta->tableType) {
+ taosMemoryFree(pMeta);
+ return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, "Only supertable table can be used");
+ }
+
+ SNodeList* pProjection = NULL;
+ code = checkCollectTopicTags(pCxt, pStmt, pMeta, &pProjection);
+ if (TSDB_CODE_SUCCESS == code) {
+ SRealTableNode* realTable = (SRealTableNode*)nodesMakeNode(QUERY_NODE_REAL_TABLE);
+ strcpy(realTable->table.dbName, pStmt->subDbName);
+ strcpy(realTable->table.tableName, pStmt->subSTbName);
+ strcpy(realTable->table.tableAlias, pStmt->subSTbName);
+ *pSelect = createSelectStmtImpl(true, pProjection, (SNode*)realTable);
+ ((SSelectStmt*)*pSelect)->pWhere = nodesCloneNode(pStmt->pWhere);
+ pCxt->pParseCxt->topicQuery = true;
+ code = translateQuery(pCxt, *pSelect);
+ }
+
+ taosMemoryFree(pMeta);
+ return code;
+}
+
static int32_t checkCreateTopic(STranslateContext* pCxt, SCreateTopicStmt* pStmt) {
- if (NULL == pStmt->pQuery) {
+ if (NULL == pStmt->pQuery && NULL == pStmt->pWhere) {
return TSDB_CODE_SUCCESS;
}
- if (QUERY_NODE_SELECT_STMT == nodeType(pStmt->pQuery)) {
+ if (pStmt->pWhere) {
+ return buildQueryForTableTopic(pCxt, pStmt, &pStmt->pQuery);
+ } else if (QUERY_NODE_SELECT_STMT == nodeType(pStmt->pQuery)) {
SSelectStmt* pSelect = (SSelectStmt*)pStmt->pQuery;
if (!pSelect->isDistinct &&
(NULL != pSelect->pFromTable && QUERY_NODE_REAL_TABLE == nodeType(pSelect->pFromTable)) &&
diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c
index bda40f0338..ba8392a48c 100644
--- a/source/libs/parser/src/parUtil.c
+++ b/source/libs/parser/src/parUtil.c
@@ -674,6 +674,22 @@ int32_t buildCatalogReq(const SParseMetaCache* pMetaCache, SCatalogReq* pCatalog
return code;
}
+
+SNode* createSelectStmtImpl(bool isDistinct, SNodeList* pProjectionList, SNode* pTable) {
+ SSelectStmt* select = (SSelectStmt*)nodesMakeNode(QUERY_NODE_SELECT_STMT);
+ if (NULL == select) {
+ return NULL;
+ }
+ select->isDistinct = isDistinct;
+ select->pProjectionList = pProjectionList;
+ select->pFromTable = pTable;
+ sprintf(select->stmtName, "%p", select);
+ select->isTimeLineResult = true;
+ select->onlyHasKeepOrderFunc = true;
+ select->timeRange = TSWINDOW_INITIALIZER;
+ return (SNode*)select;
+}
+
static int32_t putMetaDataToHash(const char* pKey, int32_t len, const SArray* pData, int32_t index, SHashObj** pHash) {
if (NULL == *pHash) {
*pHash = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK);
diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c
index 43ef166c41..4b6a665944 100644
--- a/source/libs/parser/src/sql.c
+++ b/source/libs/parser/src/sql.c
@@ -1,3 +1,5 @@
+/* This file is automatically generated by Lemon from input grammar
+** source file "sql.y". */
/*
** 2000-05-29
**
@@ -22,9 +24,8 @@
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
-#include
-#include
/************ Begin %include sections from the grammar ************************/
+#line 11 "sql.y"
#include
#include
@@ -41,12 +42,349 @@
#include "parAst.h"
#define YYSTACKDEPTH 0
+#line 46 "sql.c"
/**************** End of %include directives **********************************/
-/* These constants specify the various numeric values for terminal symbols
-** in a format understandable to "makeheaders". This section is blank unless
-** "lemon" is run with the "-m" command-line option.
-***************** Begin makeheaders token definitions *************************/
-/**************** End makeheaders token definitions ***************************/
+/* These constants specify the various numeric values for terminal symbols.
+***************** Begin token definitions *************************************/
+#ifndef TK_OR
+#define TK_OR 1
+#define TK_AND 2
+#define TK_UNION 3
+#define TK_ALL 4
+#define TK_MINUS 5
+#define TK_EXCEPT 6
+#define TK_INTERSECT 7
+#define TK_NK_BITAND 8
+#define TK_NK_BITOR 9
+#define TK_NK_LSHIFT 10
+#define TK_NK_RSHIFT 11
+#define TK_NK_PLUS 12
+#define TK_NK_MINUS 13
+#define TK_NK_STAR 14
+#define TK_NK_SLASH 15
+#define TK_NK_REM 16
+#define TK_NK_CONCAT 17
+#define TK_CREATE 18
+#define TK_ACCOUNT 19
+#define TK_NK_ID 20
+#define TK_PASS 21
+#define TK_NK_STRING 22
+#define TK_ALTER 23
+#define TK_PPS 24
+#define TK_TSERIES 25
+#define TK_STORAGE 26
+#define TK_STREAMS 27
+#define TK_QTIME 28
+#define TK_DBS 29
+#define TK_USERS 30
+#define TK_CONNS 31
+#define TK_STATE 32
+#define TK_USER 33
+#define TK_ENABLE 34
+#define TK_NK_INTEGER 35
+#define TK_SYSINFO 36
+#define TK_DROP 37
+#define TK_GRANT 38
+#define TK_ON 39
+#define TK_TO 40
+#define TK_REVOKE 41
+#define TK_FROM 42
+#define TK_SUBSCRIBE 43
+#define TK_NK_COMMA 44
+#define TK_READ 45
+#define TK_WRITE 46
+#define TK_NK_DOT 47
+#define TK_WITH 48
+#define TK_DNODE 49
+#define TK_PORT 50
+#define TK_DNODES 51
+#define TK_RESTORE 52
+#define TK_NK_IPTOKEN 53
+#define TK_FORCE 54
+#define TK_UNSAFE 55
+#define TK_LOCAL 56
+#define TK_QNODE 57
+#define TK_BNODE 58
+#define TK_SNODE 59
+#define TK_MNODE 60
+#define TK_VNODE 61
+#define TK_DATABASE 62
+#define TK_USE 63
+#define TK_FLUSH 64
+#define TK_TRIM 65
+#define TK_COMPACT 66
+#define TK_IF 67
+#define TK_NOT 68
+#define TK_EXISTS 69
+#define TK_BUFFER 70
+#define TK_CACHEMODEL 71
+#define TK_CACHESIZE 72
+#define TK_COMP 73
+#define TK_DURATION 74
+#define TK_NK_VARIABLE 75
+#define TK_MAXROWS 76
+#define TK_MINROWS 77
+#define TK_KEEP 78
+#define TK_PAGES 79
+#define TK_PAGESIZE 80
+#define TK_TSDB_PAGESIZE 81
+#define TK_PRECISION 82
+#define TK_REPLICA 83
+#define TK_VGROUPS 84
+#define TK_SINGLE_STABLE 85
+#define TK_RETENTIONS 86
+#define TK_SCHEMALESS 87
+#define TK_WAL_LEVEL 88
+#define TK_WAL_FSYNC_PERIOD 89
+#define TK_WAL_RETENTION_PERIOD 90
+#define TK_WAL_RETENTION_SIZE 91
+#define TK_WAL_ROLL_PERIOD 92
+#define TK_WAL_SEGMENT_SIZE 93
+#define TK_STT_TRIGGER 94
+#define TK_TABLE_PREFIX 95
+#define TK_TABLE_SUFFIX 96
+#define TK_NK_COLON 97
+#define TK_MAX_SPEED 98
+#define TK_START 99
+#define TK_TIMESTAMP 100
+#define TK_END 101
+#define TK_TABLE 102
+#define TK_NK_LP 103
+#define TK_NK_RP 104
+#define TK_STABLE 105
+#define TK_ADD 106
+#define TK_COLUMN 107
+#define TK_MODIFY 108
+#define TK_RENAME 109
+#define TK_TAG 110
+#define TK_SET 111
+#define TK_NK_EQ 112
+#define TK_USING 113
+#define TK_TAGS 114
+#define TK_BOOL 115
+#define TK_TINYINT 116
+#define TK_SMALLINT 117
+#define TK_INT 118
+#define TK_INTEGER 119
+#define TK_BIGINT 120
+#define TK_FLOAT 121
+#define TK_DOUBLE 122
+#define TK_BINARY 123
+#define TK_NCHAR 124
+#define TK_UNSIGNED 125
+#define TK_JSON 126
+#define TK_VARCHAR 127
+#define TK_MEDIUMBLOB 128
+#define TK_BLOB 129
+#define TK_VARBINARY 130
+#define TK_GEOMETRY 131
+#define TK_DECIMAL 132
+#define TK_COMMENT 133
+#define TK_MAX_DELAY 134
+#define TK_WATERMARK 135
+#define TK_ROLLUP 136
+#define TK_TTL 137
+#define TK_SMA 138
+#define TK_DELETE_MARK 139
+#define TK_FIRST 140
+#define TK_LAST 141
+#define TK_SHOW 142
+#define TK_PRIVILEGES 143
+#define TK_DATABASES 144
+#define TK_TABLES 145
+#define TK_STABLES 146
+#define TK_MNODES 147
+#define TK_QNODES 148
+#define TK_FUNCTIONS 149
+#define TK_INDEXES 150
+#define TK_ACCOUNTS 151
+#define TK_APPS 152
+#define TK_CONNECTIONS 153
+#define TK_LICENCES 154
+#define TK_GRANTS 155
+#define TK_QUERIES 156
+#define TK_SCORES 157
+#define TK_TOPICS 158
+#define TK_VARIABLES 159
+#define TK_CLUSTER 160
+#define TK_BNODES 161
+#define TK_SNODES 162
+#define TK_TRANSACTIONS 163
+#define TK_DISTRIBUTED 164
+#define TK_CONSUMERS 165
+#define TK_SUBSCRIPTIONS 166
+#define TK_VNODES 167
+#define TK_ALIVE 168
+#define TK_LIKE 169
+#define TK_TBNAME 170
+#define TK_QTAGS 171
+#define TK_AS 172
+#define TK_INDEX 173
+#define TK_FUNCTION 174
+#define TK_INTERVAL 175
+#define TK_COUNT 176
+#define TK_LAST_ROW 177
+#define TK_TOPIC 178
+#define TK_META 179
+#define TK_CONSUMER 180
+#define TK_GROUP 181
+#define TK_DESC 182
+#define TK_DESCRIBE 183
+#define TK_RESET 184
+#define TK_QUERY 185
+#define TK_CACHE 186
+#define TK_EXPLAIN 187
+#define TK_ANALYZE 188
+#define TK_VERBOSE 189
+#define TK_NK_BOOL 190
+#define TK_RATIO 191
+#define TK_NK_FLOAT 192
+#define TK_OUTPUTTYPE 193
+#define TK_AGGREGATE 194
+#define TK_BUFSIZE 195
+#define TK_LANGUAGE 196
+#define TK_REPLACE 197
+#define TK_STREAM 198
+#define TK_INTO 199
+#define TK_PAUSE 200
+#define TK_RESUME 201
+#define TK_TRIGGER 202
+#define TK_AT_ONCE 203
+#define TK_WINDOW_CLOSE 204
+#define TK_IGNORE 205
+#define TK_EXPIRED 206
+#define TK_FILL_HISTORY 207
+#define TK_UPDATE 208
+#define TK_SUBTABLE 209
+#define TK_UNTREATED 210
+#define TK_KILL 211
+#define TK_CONNECTION 212
+#define TK_TRANSACTION 213
+#define TK_BALANCE 214
+#define TK_VGROUP 215
+#define TK_LEADER 216
+#define TK_MERGE 217
+#define TK_REDISTRIBUTE 218
+#define TK_SPLIT 219
+#define TK_DELETE 220
+#define TK_INSERT 221
+#define TK_NULL 222
+#define TK_NK_QUESTION 223
+#define TK_NK_ARROW 224
+#define TK_ROWTS 225
+#define TK_QSTART 226
+#define TK_QEND 227
+#define TK_QDURATION 228
+#define TK_WSTART 229
+#define TK_WEND 230
+#define TK_WDURATION 231
+#define TK_IROWTS 232
+#define TK_ISFILLED 233
+#define TK_CAST 234
+#define TK_NOW 235
+#define TK_TODAY 236
+#define TK_TIMEZONE 237
+#define TK_CLIENT_VERSION 238
+#define TK_SERVER_VERSION 239
+#define TK_SERVER_STATUS 240
+#define TK_CURRENT_USER 241
+#define TK_CASE 242
+#define TK_WHEN 243
+#define TK_THEN 244
+#define TK_ELSE 245
+#define TK_BETWEEN 246
+#define TK_IS 247
+#define TK_NK_LT 248
+#define TK_NK_GT 249
+#define TK_NK_LE 250
+#define TK_NK_GE 251
+#define TK_NK_NE 252
+#define TK_MATCH 253
+#define TK_NMATCH 254
+#define TK_CONTAINS 255
+#define TK_IN 256
+#define TK_JOIN 257
+#define TK_INNER 258
+#define TK_SELECT 259
+#define TK_DISTINCT 260
+#define TK_WHERE 261
+#define TK_PARTITION 262
+#define TK_BY 263
+#define TK_SESSION 264
+#define TK_STATE_WINDOW 265
+#define TK_EVENT_WINDOW 266
+#define TK_SLIDING 267
+#define TK_FILL 268
+#define TK_VALUE 269
+#define TK_VALUE_F 270
+#define TK_NONE 271
+#define TK_PREV 272
+#define TK_NULL_F 273
+#define TK_LINEAR 274
+#define TK_NEXT 275
+#define TK_HAVING 276
+#define TK_RANGE 277
+#define TK_EVERY 278
+#define TK_ORDER 279
+#define TK_SLIMIT 280
+#define TK_SOFFSET 281
+#define TK_LIMIT 282
+#define TK_OFFSET 283
+#define TK_ASC 284
+#define TK_NULLS 285
+#define TK_ABORT 286
+#define TK_AFTER 287
+#define TK_ATTACH 288
+#define TK_BEFORE 289
+#define TK_BEGIN 290
+#define TK_BITAND 291
+#define TK_BITNOT 292
+#define TK_BITOR 293
+#define TK_BLOCKS 294
+#define TK_CHANGE 295
+#define TK_COMMA 296
+#define TK_CONCAT 297
+#define TK_CONFLICT 298
+#define TK_COPY 299
+#define TK_DEFERRED 300
+#define TK_DELIMITERS 301
+#define TK_DETACH 302
+#define TK_DIVIDE 303
+#define TK_DOT 304
+#define TK_EACH 305
+#define TK_FAIL 306
+#define TK_FILE 307
+#define TK_FOR 308
+#define TK_GLOB 309
+#define TK_ID 310
+#define TK_IMMEDIATE 311
+#define TK_IMPORT 312
+#define TK_INITIALLY 313
+#define TK_INSTEAD 314
+#define TK_ISNULL 315
+#define TK_KEY 316
+#define TK_MODULES 317
+#define TK_NK_BITNOT 318
+#define TK_NK_SEMI 319
+#define TK_NOTNULL 320
+#define TK_OF 321
+#define TK_PLUS 322
+#define TK_PRIVILEGE 323
+#define TK_RAISE 324
+#define TK_RESTRICT 325
+#define TK_ROW 326
+#define TK_SEMI 327
+#define TK_STAR 328
+#define TK_STATEMENT 329
+#define TK_STRICT 330
+#define TK_STRING 331
+#define TK_TIMES 332
+#define TK_VALUES 333
+#define TK_VARIABLE 334
+#define TK_VIEW 335
+#define TK_WAL 336
+#endif
+/**************** End token definitions ***************************************/
/* The next sections is a series of control #defines.
** various aspects of the generated parser.
@@ -140,18 +478,18 @@ typedef union {
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
-#define YYNSTATE 792
+#define YYNSTATE 794
#define YYNRULE 595
#define YYNRULE_WITH_ACTION 595
#define YYNTOKEN 337
-#define YY_MAX_SHIFT 791
-#define YY_MIN_SHIFTREDUCE 1169
-#define YY_MAX_SHIFTREDUCE 1763
-#define YY_ERROR_ACTION 1764
-#define YY_ACCEPT_ACTION 1765
-#define YY_NO_ACTION 1766
-#define YY_MIN_REDUCE 1767
-#define YY_MAX_REDUCE 2361
+#define YY_MAX_SHIFT 793
+#define YY_MIN_SHIFTREDUCE 1171
+#define YY_MAX_SHIFTREDUCE 1765
+#define YY_ERROR_ACTION 1766
+#define YY_ACCEPT_ACTION 1767
+#define YY_NO_ACTION 1768
+#define YY_MIN_REDUCE 1769
+#define YY_MAX_REDUCE 2363
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
@@ -218,559 +556,560 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
-#define YY_ACTTAB_COUNT (2716)
+#define YY_ACTTAB_COUNT (2730)
static const YYACTIONTYPE yy_action[] = {
- /* 0 */ 2173, 169, 2337, 38, 303, 2332, 170, 445, 1779, 1885,
- /* 10 */ 660, 444, 48, 46, 1691, 1933, 181, 2337, 2151, 1790,
- /* 20 */ 399, 2336, 1540, 41, 40, 2333, 2335, 47, 45, 44,
- /* 30 */ 43, 42, 2159, 1621, 1567, 1538, 366, 2046, 2191, 41,
- /* 40 */ 40, 451, 2155, 47, 45, 44, 43, 42, 402, 663,
- /* 50 */ 2141, 1568, 698, 1566, 620, 526, 164, 2332, 527, 1803,
- /* 60 */ 2173, 218, 1616, 380, 1946, 529, 167, 1810, 19, 2141,
- /* 70 */ 699, 1995, 2338, 188, 1947, 1546, 184, 2333, 646, 2157,
- /* 80 */ 396, 2106, 2337, 358, 2172, 2332, 345, 2208, 1984, 692,
- /* 90 */ 110, 2174, 702, 2176, 2177, 697, 620, 692, 2191, 2332,
- /* 100 */ 788, 2336, 185, 15, 2261, 2333, 2334, 220, 395, 2257,
- /* 110 */ 2141, 529, 698, 1810, 2338, 188, 48, 46, 1753, 2333,
- /* 120 */ 646, 190, 682, 1944, 399, 1789, 1540, 1650, 251, 2287,
- /* 130 */ 47, 45, 44, 43, 42, 668, 1567, 1621, 205, 1538,
- /* 140 */ 1623, 1624, 133, 2063, 2172, 682, 1944, 2208, 1304, 566,
- /* 150 */ 110, 2174, 702, 2176, 2177, 697, 2124, 692, 2061, 669,
- /* 160 */ 145, 1565, 152, 2232, 2261, 193, 1616, 668, 395, 2257,
- /* 170 */ 1596, 1606, 19, 1395, 1396, 2141, 1622, 1625, 84, 1546,
- /* 180 */ 1920, 83, 657, 142, 1651, 1768, 284, 541, 1306, 2056,
- /* 190 */ 1541, 123, 1539, 681, 122, 121, 120, 119, 118, 117,
- /* 200 */ 116, 115, 114, 262, 788, 668, 123, 15, 2173, 122,
- /* 210 */ 121, 120, 119, 118, 117, 116, 115, 114, 699, 666,
- /* 220 */ 1812, 2056, 1544, 1545, 1767, 1595, 1598, 1599, 1600, 1601,
- /* 230 */ 1602, 1603, 1604, 1605, 694, 690, 1614, 1615, 1617, 1618,
- /* 240 */ 1619, 1620, 2, 681, 1623, 1624, 2191, 737, 132, 131,
- /* 250 */ 130, 129, 128, 127, 126, 125, 124, 677, 2141, 2056,
- /* 260 */ 698, 37, 397, 1645, 1646, 1647, 1648, 1649, 1653, 1654,
- /* 270 */ 1655, 1656, 543, 2173, 1596, 1606, 51, 682, 1944, 66,
- /* 280 */ 1622, 1625, 9, 660, 659, 186, 2269, 2270, 284, 140,
- /* 290 */ 2274, 1227, 2172, 1226, 1541, 2208, 1539, 133, 110, 2174,
- /* 300 */ 702, 2176, 2177, 697, 571, 692, 138, 531, 682, 1944,
- /* 310 */ 2352, 2191, 2261, 528, 41, 40, 395, 2257, 47, 45,
- /* 320 */ 44, 43, 42, 2141, 1228, 698, 1544, 1545, 57, 1595,
- /* 330 */ 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 694, 690,
- /* 340 */ 1614, 1615, 1617, 1618, 1619, 1620, 2, 12, 48, 46,
- /* 350 */ 1227, 2173, 1226, 408, 407, 2336, 399, 2172, 1540, 2276,
- /* 360 */ 2208, 696, 1922, 110, 2174, 702, 2176, 2177, 697, 1621,
- /* 370 */ 692, 1538, 428, 1997, 181, 185, 1547, 2261, 62, 639,
- /* 380 */ 379, 395, 2257, 1228, 2063, 2273, 41, 40, 1995, 2191,
- /* 390 */ 47, 45, 44, 43, 42, 2047, 392, 1360, 1616, 2060,
- /* 400 */ 669, 2141, 2288, 698, 19, 534, 150, 2191, 527, 1803,
- /* 410 */ 1730, 1546, 1351, 727, 726, 725, 1355, 724, 1357, 1358,
- /* 420 */ 723, 720, 30, 1366, 717, 1368, 1369, 714, 711, 708,
- /* 430 */ 667, 1695, 191, 1565, 107, 2172, 788, 1565, 2208, 15,
- /* 440 */ 101, 339, 2174, 702, 2176, 2177, 697, 695, 692, 683,
- /* 450 */ 2226, 143, 48, 46, 1626, 87, 635, 34, 234, 1936,
- /* 460 */ 399, 638, 1540, 41, 40, 1937, 681, 47, 45, 44,
- /* 470 */ 43, 42, 368, 1621, 174, 1538, 1623, 1624, 640, 682,
- /* 480 */ 1944, 1939, 560, 556, 552, 548, 2042, 233, 285, 393,
- /* 490 */ 735, 157, 156, 732, 731, 730, 154, 167, 2173, 449,
- /* 500 */ 1202, 1684, 1616, 1565, 1719, 1946, 1596, 1606, 699, 12,
- /* 510 */ 2295, 10, 1622, 1625, 2042, 1546, 41, 40, 682, 1944,
- /* 520 */ 47, 45, 44, 43, 42, 1564, 1541, 88, 1539, 62,
- /* 530 */ 231, 93, 201, 1550, 191, 489, 2191, 1568, 450, 1204,
- /* 540 */ 788, 1207, 1208, 49, 1788, 641, 636, 629, 2141, 51,
- /* 550 */ 698, 632, 631, 1717, 1718, 1720, 1721, 1722, 1544, 1545,
- /* 560 */ 203, 1595, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605,
- /* 570 */ 694, 690, 1614, 1615, 1617, 1618, 1619, 1620, 2, 62,
- /* 580 */ 1623, 1624, 2172, 1450, 1451, 2208, 62, 1597, 110, 2174,
- /* 590 */ 702, 2176, 2177, 697, 2141, 692, 209, 208, 230, 224,
- /* 600 */ 2352, 523, 2261, 229, 737, 539, 395, 2257, 2173, 521,
- /* 610 */ 1596, 1606, 517, 513, 682, 1944, 1622, 1625, 699, 488,
- /* 620 */ 2308, 682, 1944, 222, 607, 2151, 52, 62, 294, 295,
- /* 630 */ 1541, 648, 1539, 293, 459, 584, 583, 582, 684, 1935,
- /* 640 */ 2233, 474, 574, 139, 578, 2127, 2191, 1787, 577, 2155,
- /* 650 */ 657, 142, 1549, 576, 581, 374, 373, 2027, 2141, 575,
- /* 660 */ 698, 2134, 1544, 1545, 1566, 1595, 1598, 1599, 1600, 1601,
- /* 670 */ 1602, 1603, 1604, 1605, 694, 690, 1614, 1615, 1617, 1618,
- /* 680 */ 1619, 1620, 2, 48, 46, 191, 2157, 682, 1944, 202,
- /* 690 */ 1760, 399, 2172, 1540, 421, 2208, 692, 2141, 110, 2174,
- /* 700 */ 702, 2176, 2177, 697, 1621, 692, 1538, 475, 620, 2173,
- /* 710 */ 2352, 2332, 2261, 443, 402, 442, 395, 2257, 1921, 699,
- /* 720 */ 404, 589, 167, 1990, 1992, 2276, 2338, 188, 682, 1944,
- /* 730 */ 1946, 2333, 646, 1616, 1631, 191, 599, 1991, 1992, 2173,
- /* 740 */ 1565, 433, 191, 682, 1944, 441, 1546, 2191, 542, 699,
- /* 750 */ 247, 2272, 598, 282, 2269, 656, 12, 134, 655, 2141,
- /* 760 */ 2332, 698, 405, 1941, 2276, 596, 592, 594, 435, 431,
- /* 770 */ 167, 788, 1546, 586, 49, 644, 188, 2191, 1946, 246,
- /* 780 */ 2333, 646, 191, 191, 1467, 1468, 747, 48, 46, 2141,
- /* 790 */ 2271, 698, 1759, 2172, 1315, 399, 2208, 1540, 250, 111,
- /* 800 */ 2174, 702, 2176, 2177, 697, 1652, 692, 1314, 1621, 1552,
- /* 810 */ 1538, 1623, 1624, 2261, 657, 142, 469, 2260, 2257, 70,
- /* 820 */ 1466, 1469, 69, 2172, 1919, 468, 2208, 728, 1997, 171,
- /* 830 */ 2174, 702, 2176, 2177, 697, 389, 692, 1616, 1786, 2173,
- /* 840 */ 1210, 1596, 1606, 1995, 682, 1944, 1564, 1622, 1625, 699,
- /* 850 */ 1546, 735, 157, 156, 732, 731, 730, 154, 452, 1997,
- /* 860 */ 686, 1541, 2233, 1539, 252, 155, 394, 1511, 1512, 621,
- /* 870 */ 2298, 453, 498, 36, 1995, 788, 1929, 2191, 15, 41,
- /* 880 */ 40, 1931, 35, 47, 45, 44, 43, 42, 2141, 2141,
- /* 890 */ 1597, 698, 1657, 1544, 1545, 1927, 1595, 1598, 1599, 1600,
- /* 900 */ 1601, 1602, 1603, 1604, 1605, 694, 690, 1614, 1615, 1617,
- /* 910 */ 1618, 1619, 1620, 2, 1785, 1623, 1624, 187, 2269, 2270,
- /* 920 */ 1765, 140, 2274, 2172, 1784, 56, 2208, 1783, 1782, 171,
- /* 930 */ 2174, 702, 2176, 2177, 697, 349, 692, 1563, 44, 43,
- /* 940 */ 42, 1997, 259, 2173, 482, 1596, 1606, 496, 403, 1781,
- /* 950 */ 495, 1622, 1625, 699, 1997, 627, 1995, 735, 157, 156,
- /* 960 */ 732, 731, 730, 154, 2141, 1541, 465, 1539, 497, 1996,
- /* 970 */ 2299, 682, 1944, 467, 2141, 1540, 1319, 2141, 2141, 41,
- /* 980 */ 40, 2191, 1778, 47, 45, 44, 43, 42, 1538, 1318,
- /* 990 */ 1568, 616, 414, 2141, 1777, 698, 413, 1544, 1545, 2141,
- /* 1000 */ 1595, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 694,
- /* 1010 */ 690, 1614, 1615, 1617, 1618, 1619, 1620, 2, 1843, 367,
- /* 1020 */ 1565, 682, 1944, 657, 142, 580, 579, 2172, 1546, 1948,
- /* 1030 */ 2208, 455, 2141, 110, 2174, 702, 2176, 2177, 697, 620,
- /* 1040 */ 692, 661, 2332, 1776, 2141, 2352, 570, 2261, 1230, 1231,
- /* 1050 */ 569, 395, 2257, 788, 500, 562, 561, 2338, 188, 564,
- /* 1060 */ 563, 493, 2333, 646, 487, 486, 485, 484, 481, 480,
- /* 1070 */ 479, 478, 477, 473, 472, 471, 470, 348, 462, 461,
- /* 1080 */ 460, 652, 457, 456, 365, 759, 757, 1775, 765, 764,
- /* 1090 */ 763, 762, 411, 2141, 761, 760, 146, 755, 754, 753,
- /* 1100 */ 752, 751, 750, 749, 159, 745, 744, 743, 410, 409,
- /* 1110 */ 740, 739, 738, 177, 176, 168, 682, 1944, 2135, 1774,
- /* 1120 */ 323, 1773, 1772, 408, 407, 256, 189, 2269, 2270, 2173,
- /* 1130 */ 140, 2274, 371, 1554, 321, 73, 665, 2141, 72, 699,
- /* 1140 */ 693, 2326, 261, 1541, 1621, 1539, 1547, 41, 40, 346,
- /* 1150 */ 1688, 47, 45, 44, 43, 42, 2042, 1771, 682, 1944,
- /* 1160 */ 216, 508, 506, 503, 54, 620, 3, 2191, 2332, 2141,
- /* 1170 */ 1597, 2141, 2141, 1616, 649, 1544, 1545, 2173, 298, 2141,
- /* 1180 */ 1770, 698, 260, 2338, 188, 2151, 1546, 699, 2333, 646,
- /* 1190 */ 41, 40, 14, 13, 47, 45, 44, 43, 42, 2160,
- /* 1200 */ 62, 372, 207, 370, 369, 74, 568, 2141, 87, 2155,
- /* 1210 */ 689, 688, 605, 2172, 144, 2191, 2208, 2232, 1886, 110,
- /* 1220 */ 2174, 702, 2176, 2177, 697, 91, 692, 2141, 570, 698,
- /* 1230 */ 2141, 2352, 569, 2261, 1940, 2173, 572, 395, 2257, 109,
- /* 1240 */ 148, 729, 135, 1707, 1988, 699, 2157, 2280, 733, 734,
- /* 1250 */ 317, 1988, 1988, 1974, 748, 82, 692, 1906, 1302, 620,
- /* 1260 */ 239, 2172, 2332, 237, 2208, 2281, 1684, 333, 2174, 702,
- /* 1270 */ 2176, 2177, 697, 2191, 692, 1207, 1208, 2338, 188, 81,
- /* 1280 */ 80, 448, 2333, 646, 200, 2141, 2173, 698, 241, 1780,
- /* 1290 */ 573, 240, 619, 682, 1944, 1664, 699, 440, 438, 243,
- /* 1300 */ 2301, 1555, 242, 1550, 245, 1762, 1763, 244, 347, 1830,
- /* 1310 */ 642, 429, 1300, 679, 427, 423, 419, 416, 441, 2172,
- /* 1320 */ 653, 602, 2208, 601, 2191, 110, 2174, 702, 2176, 2177,
- /* 1330 */ 697, 585, 692, 1558, 1560, 1821, 2141, 2352, 698, 2261,
- /* 1340 */ 1819, 155, 645, 395, 2257, 2332, 690, 1614, 1615, 1617,
- /* 1350 */ 1618, 1619, 1620, 2173, 166, 249, 191, 587, 155, 248,
- /* 1360 */ 644, 188, 590, 699, 1642, 2333, 646, 279, 50, 50,
- /* 1370 */ 2172, 266, 155, 2208, 50, 291, 110, 2174, 702, 2176,
- /* 1380 */ 2177, 697, 633, 692, 682, 1944, 2173, 137, 2236, 106,
- /* 1390 */ 2261, 2191, 682, 1944, 395, 2257, 699, 682, 1944, 103,
- /* 1400 */ 71, 1506, 2162, 2141, 680, 698, 1687, 153, 155, 14,
- /* 1410 */ 13, 650, 304, 2173, 64, 273, 55, 406, 1509, 90,
- /* 1420 */ 1548, 1813, 353, 699, 2191, 378, 50, 600, 1716, 1715,
- /* 1430 */ 741, 268, 664, 50, 1464, 296, 2141, 2172, 698, 2192,
- /* 1440 */ 2208, 1884, 706, 110, 2174, 702, 2176, 2177, 697, 2173,
- /* 1450 */ 692, 2191, 1280, 1883, 153, 2234, 155, 2261, 2164, 699,
- /* 1460 */ 674, 395, 2257, 2141, 136, 698, 412, 300, 1345, 153,
- /* 1470 */ 2172, 783, 1261, 2208, 1658, 2173, 110, 2174, 702, 2176,
- /* 1480 */ 2177, 697, 2051, 692, 1804, 699, 1607, 2191, 685, 742,
- /* 1490 */ 2261, 1809, 1985, 316, 395, 2257, 2291, 2172, 658, 2141,
- /* 1500 */ 2208, 698, 1373, 111, 2174, 702, 2176, 2177, 697, 281,
- /* 1510 */ 692, 1278, 1262, 2191, 1377, 278, 1384, 2261, 1, 5,
- /* 1520 */ 415, 687, 2257, 420, 1382, 2141, 362, 698, 1571, 158,
- /* 1530 */ 437, 436, 196, 700, 439, 198, 2208, 195, 1487, 111,
- /* 1540 */ 2174, 702, 2176, 2177, 697, 311, 692, 206, 454, 1568,
- /* 1550 */ 2052, 458, 491, 2261, 2173, 463, 1563, 357, 2257, 2172,
- /* 1560 */ 476, 2044, 2208, 483, 699, 172, 2174, 702, 2176, 2177,
- /* 1570 */ 697, 490, 692, 492, 501, 502, 499, 1551, 210, 504,
- /* 1580 */ 2173, 211, 505, 213, 507, 509, 1569, 524, 4, 525,
- /* 1590 */ 699, 532, 2191, 533, 1566, 221, 536, 535, 1570, 223,
- /* 1600 */ 1572, 537, 565, 538, 2141, 1997, 698, 540, 544, 226,
- /* 1610 */ 228, 85, 364, 86, 2115, 232, 647, 2353, 2191, 112,
- /* 1620 */ 1995, 2112, 352, 382, 567, 604, 1934, 606, 2111, 89,
- /* 1630 */ 2141, 610, 698, 609, 312, 151, 611, 253, 2172, 236,
- /* 1640 */ 1930, 2208, 2173, 238, 111, 2174, 702, 2176, 2177, 697,
- /* 1650 */ 160, 692, 699, 161, 1932, 255, 1928, 162, 2261, 2173,
- /* 1660 */ 163, 614, 257, 2258, 2172, 1494, 617, 2208, 2292, 699,
- /* 1670 */ 340, 2174, 702, 2176, 2177, 697, 672, 692, 2173, 615,
- /* 1680 */ 2191, 624, 634, 645, 2302, 383, 2332, 8, 699, 630,
- /* 1690 */ 2307, 2306, 2141, 264, 698, 267, 2283, 2191, 384, 643,
- /* 1700 */ 637, 644, 188, 385, 625, 623, 2333, 646, 622, 2141,
- /* 1710 */ 1684, 698, 654, 277, 651, 141, 2191, 2355, 1567, 175,
- /* 1720 */ 2331, 390, 2277, 662, 388, 286, 2172, 274, 2141, 2208,
- /* 1730 */ 698, 96, 340, 2174, 702, 2176, 2177, 697, 272, 692,
- /* 1740 */ 1573, 313, 2057, 2172, 280, 276, 2208, 670, 275, 172,
- /* 1750 */ 2174, 702, 2176, 2177, 697, 675, 692, 671, 2071, 314,
- /* 1760 */ 676, 2070, 2172, 98, 2173, 2208, 2069, 391, 340, 2174,
- /* 1770 */ 702, 2176, 2177, 697, 696, 692, 315, 1945, 100, 61,
- /* 1780 */ 2242, 2173, 102, 704, 1989, 318, 784, 1907, 307, 322,
- /* 1790 */ 785, 699, 787, 53, 354, 327, 355, 342, 2133, 320,
- /* 1800 */ 2173, 2354, 2191, 341, 2132, 331, 2131, 78, 2128, 417,
- /* 1810 */ 699, 418, 1531, 1532, 2141, 194, 698, 422, 2126, 2191,
- /* 1820 */ 424, 425, 426, 2125, 398, 363, 2123, 430, 2122, 432,
- /* 1830 */ 2121, 2141, 434, 698, 2102, 1522, 197, 2101, 2191, 199,
- /* 1840 */ 1490, 79, 1489, 400, 2083, 2082, 2081, 446, 2172, 447,
- /* 1850 */ 2141, 2208, 698, 2080, 339, 2174, 702, 2176, 2177, 697,
- /* 1860 */ 2079, 692, 1441, 2227, 2035, 2172, 147, 608, 2208, 2034,
- /* 1870 */ 2032, 340, 2174, 702, 2176, 2177, 697, 2031, 692, 2030,
- /* 1880 */ 2033, 2029, 2028, 2026, 2172, 791, 2025, 2208, 2024, 204,
- /* 1890 */ 340, 2174, 702, 2176, 2177, 697, 464, 692, 2173, 310,
- /* 1900 */ 2023, 466, 2037, 2022, 2021, 2020, 2019, 2018, 699, 2017,
- /* 1910 */ 2016, 2015, 2014, 2013, 2012, 180, 149, 2007, 2006, 2005,
- /* 1920 */ 2036, 2004, 2003, 781, 777, 773, 769, 2011, 308, 2010,
- /* 1930 */ 2009, 2173, 2008, 2002, 2001, 2000, 2191, 1443, 494, 1999,
- /* 1940 */ 1998, 699, 350, 351, 1849, 1316, 1320, 212, 2141, 1848,
- /* 1950 */ 698, 214, 1847, 215, 1845, 1842, 1841, 511, 1834, 1823,
- /* 1960 */ 1312, 510, 1799, 1798, 2173, 227, 514, 512, 108, 2191,
- /* 1970 */ 2100, 301, 2090, 2078, 699, 516, 518, 522, 2077, 1209,
- /* 1980 */ 2055, 2141, 603, 698, 1923, 2208, 520, 515, 335, 2174,
- /* 1990 */ 702, 2176, 2177, 697, 519, 692, 1844, 182, 2161, 217,
- /* 2000 */ 2173, 1840, 2191, 77, 678, 547, 76, 183, 530, 219,
- /* 2010 */ 699, 545, 1254, 225, 2141, 2172, 698, 546, 2208, 1838,
- /* 2020 */ 549, 324, 2174, 702, 2176, 2177, 697, 551, 692, 1836,
- /* 2030 */ 550, 554, 553, 2173, 555, 1833, 558, 557, 2191, 288,
- /* 2040 */ 1818, 1816, 559, 699, 287, 1817, 1815, 1795, 2172, 1925,
- /* 2050 */ 2141, 2208, 698, 1389, 325, 2174, 702, 2176, 2177, 697,
- /* 2060 */ 63, 692, 2173, 1924, 254, 1388, 1303, 1301, 1299, 1298,
- /* 2070 */ 756, 2191, 699, 1297, 1296, 1831, 1290, 1295, 375, 1292,
- /* 2080 */ 758, 235, 1822, 2141, 2172, 698, 1291, 2208, 376, 1820,
- /* 2090 */ 326, 2174, 702, 2176, 2177, 697, 1289, 692, 377, 588,
- /* 2100 */ 2191, 597, 591, 1794, 593, 1793, 595, 1792, 113, 1516,
- /* 2110 */ 1520, 29, 2141, 1518, 698, 1515, 2099, 2172, 58, 67,
- /* 2120 */ 2208, 1496, 2173, 332, 2174, 702, 2176, 2177, 697, 2089,
- /* 2130 */ 692, 1498, 699, 612, 2076, 2074, 2337, 20, 17, 6,
- /* 2140 */ 31, 2173, 7, 21, 22, 271, 2172, 1500, 270, 2208,
- /* 2150 */ 33, 699, 336, 2174, 702, 2176, 2177, 697, 613, 692,
- /* 2160 */ 2191, 1732, 381, 258, 265, 263, 626, 628, 165, 2162,
- /* 2170 */ 618, 65, 2141, 173, 698, 24, 1714, 1706, 1747, 2191,
- /* 2180 */ 269, 1746, 386, 1751, 32, 1750, 92, 283, 387, 2173,
- /* 2190 */ 2075, 2141, 178, 698, 1752, 60, 1753, 2073, 2072, 699,
- /* 2200 */ 1681, 1680, 2054, 95, 289, 94, 2172, 2053, 2173, 2208,
- /* 2210 */ 97, 25, 328, 2174, 702, 2176, 2177, 697, 699, 692,
- /* 2220 */ 26, 290, 1712, 292, 297, 2172, 68, 2191, 2208, 99,
- /* 2230 */ 673, 337, 2174, 702, 2176, 2177, 697, 299, 692, 2141,
- /* 2240 */ 23, 698, 1846, 103, 11, 1633, 2191, 13, 302, 1556,
- /* 2250 */ 59, 179, 1643, 1611, 1588, 18, 2173, 1632, 2141, 1609,
- /* 2260 */ 698, 2211, 691, 39, 192, 1608, 699, 1580, 16, 27,
- /* 2270 */ 28, 705, 401, 2172, 701, 707, 2208, 2173, 709, 329,
- /* 2280 */ 2174, 702, 2176, 2177, 697, 1374, 692, 699, 703, 1371,
- /* 2290 */ 710, 712, 2172, 1370, 2191, 2208, 713, 715, 338, 2174,
- /* 2300 */ 702, 2176, 2177, 697, 718, 692, 2141, 1367, 698, 716,
- /* 2310 */ 721, 719, 584, 583, 582, 2191, 1361, 1359, 722, 574,
- /* 2320 */ 139, 578, 104, 305, 1365, 577, 105, 2141, 1383, 698,
- /* 2330 */ 576, 581, 374, 373, 1364, 1363, 575, 75, 1379, 1362,
- /* 2340 */ 2172, 1252, 736, 2208, 1284, 2173, 330, 2174, 702, 2176,
- /* 2350 */ 2177, 697, 1283, 692, 1282, 699, 1281, 1279, 1277, 1276,
- /* 2360 */ 1275, 2172, 1310, 2173, 2208, 746, 1270, 343, 2174, 702,
- /* 2370 */ 2176, 2177, 697, 699, 692, 306, 1273, 1272, 1271, 1307,
- /* 2380 */ 1269, 1268, 1267, 2191, 1305, 1264, 1263, 1260, 1259, 1258,
- /* 2390 */ 1257, 1839, 766, 2173, 1837, 2141, 770, 698, 768, 772,
- /* 2400 */ 1835, 2191, 776, 699, 774, 767, 1832, 771, 778, 780,
- /* 2410 */ 1814, 775, 782, 2141, 779, 698, 1199, 1791, 309, 786,
- /* 2420 */ 1766, 1542, 790, 319, 2173, 789, 1766, 1766, 1766, 2172,
- /* 2430 */ 1766, 2191, 2208, 1766, 699, 344, 2174, 702, 2176, 2177,
- /* 2440 */ 697, 2173, 692, 2141, 1766, 698, 1766, 2172, 1766, 1766,
- /* 2450 */ 2208, 699, 1766, 2185, 2174, 702, 2176, 2177, 697, 1766,
- /* 2460 */ 692, 1766, 2191, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
- /* 2470 */ 1766, 1766, 1766, 1766, 2141, 1766, 698, 2172, 1766, 2191,
- /* 2480 */ 2208, 1766, 1766, 2184, 2174, 702, 2176, 2177, 697, 1766,
- /* 2490 */ 692, 2141, 2173, 698, 1766, 1766, 1766, 1766, 1766, 1766,
- /* 2500 */ 1766, 1766, 699, 1766, 1766, 1766, 1766, 1766, 2172, 1766,
- /* 2510 */ 1766, 2208, 1766, 2173, 2183, 2174, 702, 2176, 2177, 697,
- /* 2520 */ 1766, 692, 1766, 699, 1766, 2172, 1766, 1766, 2208, 1766,
- /* 2530 */ 2191, 359, 2174, 702, 2176, 2177, 697, 1766, 692, 1766,
- /* 2540 */ 2173, 1766, 2141, 1766, 698, 1766, 1766, 1766, 1766, 1766,
- /* 2550 */ 699, 2191, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
- /* 2560 */ 1766, 1766, 1766, 2141, 1766, 698, 1766, 1766, 1766, 1766,
- /* 2570 */ 1766, 1766, 1766, 1766, 1766, 1766, 2172, 1766, 2191, 2208,
- /* 2580 */ 1766, 1766, 360, 2174, 702, 2176, 2177, 697, 1766, 692,
- /* 2590 */ 2141, 1766, 698, 1766, 1766, 1766, 1766, 2172, 1766, 1766,
- /* 2600 */ 2208, 2173, 1766, 356, 2174, 702, 2176, 2177, 697, 1766,
- /* 2610 */ 692, 699, 1766, 1766, 1766, 1766, 1766, 1766, 2173, 1766,
- /* 2620 */ 1766, 1766, 1766, 1766, 2172, 1766, 1766, 2208, 699, 1766,
- /* 2630 */ 361, 2174, 702, 2176, 2177, 697, 1766, 692, 1766, 2191,
- /* 2640 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
- /* 2650 */ 1766, 2141, 1766, 698, 1766, 1766, 2191, 1766, 1766, 1766,
- /* 2660 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 2141, 1766,
- /* 2670 */ 698, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
- /* 2680 */ 1766, 1766, 1766, 1766, 1766, 700, 1766, 1766, 2208, 1766,
- /* 2690 */ 1766, 335, 2174, 702, 2176, 2177, 697, 1766, 692, 1766,
- /* 2700 */ 1766, 1766, 2172, 1766, 1766, 2208, 1766, 1766, 334, 2174,
- /* 2710 */ 702, 2176, 2177, 697, 1766, 692,
+ /* 0 */ 2175, 2065, 170, 218, 1781, 670, 447, 531, 665, 1812,
+ /* 10 */ 662, 446, 48, 46, 1693, 1935, 2063, 671, 647, 1792,
+ /* 20 */ 401, 2334, 1542, 41, 40, 410, 409, 47, 45, 44,
+ /* 30 */ 43, 42, 686, 1623, 2235, 1540, 646, 188, 2193, 41,
+ /* 40 */ 40, 2335, 648, 47, 45, 44, 43, 42, 1549, 2136,
+ /* 50 */ 2143, 1570, 700, 622, 1567, 622, 2334, 543, 2334, 2058,
+ /* 60 */ 2175, 181, 1618, 47, 45, 44, 43, 42, 19, 2143,
+ /* 70 */ 701, 2340, 188, 2340, 188, 1548, 2335, 648, 2335, 648,
+ /* 80 */ 220, 368, 2048, 360, 531, 2174, 1812, 2210, 107, 184,
+ /* 90 */ 110, 2176, 704, 2178, 2179, 699, 622, 694, 2193, 2334,
+ /* 100 */ 790, 1986, 185, 15, 2263, 143, 87, 641, 397, 2259,
+ /* 110 */ 2143, 1791, 700, 1938, 2340, 188, 48, 46, 2065, 2335,
+ /* 120 */ 648, 190, 2153, 370, 401, 2339, 1542, 1652, 2334, 2289,
+ /* 130 */ 394, 683, 1941, 2062, 671, 2193, 1937, 1623, 205, 1540,
+ /* 140 */ 1625, 1626, 453, 1317, 2338, 2174, 2157, 2210, 2335, 2337,
+ /* 150 */ 110, 2176, 704, 2178, 2179, 699, 1316, 694, 1568, 404,
+ /* 160 */ 145, 2143, 152, 2234, 2263, 181, 1618, 164, 397, 2259,
+ /* 170 */ 1598, 1608, 19, 1999, 382, 1948, 1624, 1627, 84, 1548,
+ /* 180 */ 381, 83, 1997, 2159, 1653, 1770, 2049, 347, 1997, 640,
+ /* 190 */ 1543, 123, 1541, 694, 122, 121, 120, 119, 118, 117,
+ /* 200 */ 116, 115, 114, 263, 790, 1552, 123, 15, 2175, 122,
+ /* 210 */ 121, 120, 119, 118, 117, 116, 115, 114, 701, 669,
+ /* 220 */ 1814, 500, 1546, 1547, 1769, 1597, 1600, 1601, 1602, 1603,
+ /* 230 */ 1604, 1605, 1606, 1607, 696, 692, 1616, 1617, 1619, 1620,
+ /* 240 */ 1621, 1622, 2, 642, 1625, 1626, 2193, 1790, 132, 131,
+ /* 250 */ 130, 129, 128, 127, 126, 125, 124, 670, 2143, 62,
+ /* 260 */ 700, 37, 399, 1647, 1648, 1649, 1650, 1651, 1655, 1656,
+ /* 270 */ 1657, 1658, 38, 305, 1598, 1608, 1567, 287, 1397, 1398,
+ /* 280 */ 1624, 1627, 1204, 683, 41, 40, 684, 1946, 47, 45,
+ /* 290 */ 44, 43, 42, 2174, 1543, 2210, 1541, 2143, 110, 2176,
+ /* 300 */ 704, 2178, 2179, 699, 528, 694, 133, 529, 1805, 668,
+ /* 310 */ 2354, 2058, 2263, 568, 1567, 2175, 397, 2259, 62, 1566,
+ /* 320 */ 93, 1206, 533, 1209, 1210, 662, 1546, 1547, 530, 1597,
+ /* 330 */ 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 696, 692,
+ /* 340 */ 1616, 1617, 1619, 1620, 1621, 1622, 2, 12, 48, 46,
+ /* 350 */ 12, 637, 10, 2193, 395, 683, 401, 406, 1542, 1362,
+ /* 360 */ 1992, 1994, 167, 373, 545, 2143, 51, 700, 670, 1623,
+ /* 370 */ 1948, 1540, 684, 1946, 1353, 729, 728, 727, 1357, 726,
+ /* 380 */ 1359, 1360, 725, 722, 739, 1368, 719, 1370, 1371, 716,
+ /* 390 */ 713, 710, 133, 2175, 8, 2278, 659, 142, 1618, 573,
+ /* 400 */ 2174, 1789, 2210, 698, 19, 110, 2176, 704, 2178, 2179,
+ /* 410 */ 699, 1548, 694, 2339, 1229, 191, 1228, 185, 1923, 2263,
+ /* 420 */ 679, 2275, 2058, 397, 2259, 250, 1599, 659, 142, 138,
+ /* 430 */ 1569, 2193, 374, 1690, 372, 371, 790, 570, 51, 15,
+ /* 440 */ 643, 638, 631, 2143, 2290, 700, 1569, 1230, 586, 585,
+ /* 450 */ 584, 2143, 48, 46, 1628, 576, 139, 580, 1762, 572,
+ /* 460 */ 401, 579, 1542, 571, 1452, 1453, 578, 583, 376, 375,
+ /* 470 */ 12, 1721, 577, 1623, 191, 1540, 1625, 1626, 2174, 2278,
+ /* 480 */ 2210, 1993, 1994, 341, 2176, 704, 2178, 2179, 699, 697,
+ /* 490 */ 694, 685, 2228, 536, 1513, 1514, 529, 1805, 2175, 187,
+ /* 500 */ 2271, 2272, 1618, 140, 2276, 2274, 1598, 1608, 701, 1229,
+ /* 510 */ 2310, 1228, 1624, 1627, 1755, 1548, 659, 142, 634, 633,
+ /* 520 */ 1719, 1720, 1722, 1723, 1724, 491, 1543, 574, 1541, 661,
+ /* 530 */ 186, 2271, 2272, 525, 140, 2276, 2193, 14, 13, 1567,
+ /* 540 */ 790, 523, 1230, 49, 519, 515, 659, 142, 2143, 1304,
+ /* 550 */ 700, 737, 157, 156, 734, 733, 732, 154, 1546, 1547,
+ /* 560 */ 1761, 1597, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607,
+ /* 570 */ 696, 692, 1616, 1617, 1619, 1620, 1621, 1622, 2, 575,
+ /* 580 */ 1625, 1626, 285, 2174, 609, 2210, 209, 208, 110, 2176,
+ /* 590 */ 704, 2178, 2179, 699, 191, 694, 2164, 1999, 285, 52,
+ /* 600 */ 2354, 1302, 2263, 101, 391, 2175, 397, 2259, 2108, 490,
+ /* 610 */ 1598, 1608, 1997, 1686, 600, 701, 1624, 1627, 1922, 283,
+ /* 620 */ 2271, 658, 62, 134, 657, 66, 2334, 598, 1939, 596,
+ /* 630 */ 1543, 435, 1541, 737, 157, 156, 734, 733, 732, 154,
+ /* 640 */ 1666, 646, 188, 2193, 684, 1946, 2335, 648, 1767, 189,
+ /* 650 */ 2271, 2272, 2166, 140, 2276, 2143, 251, 700, 437, 433,
+ /* 660 */ 2029, 2137, 1546, 1547, 193, 1597, 1600, 1601, 1602, 1603,
+ /* 670 */ 1604, 1605, 1606, 1607, 696, 692, 1616, 1617, 1619, 1620,
+ /* 680 */ 1621, 1622, 2, 48, 46, 739, 169, 1232, 1233, 1689,
+ /* 690 */ 2174, 401, 2210, 1542, 1887, 110, 2176, 704, 2178, 2179,
+ /* 700 */ 699, 2044, 694, 1999, 1623, 2153, 1540, 2238, 622, 2263,
+ /* 710 */ 396, 2334, 234, 397, 2259, 1788, 296, 297, 1997, 2162,
+ /* 720 */ 416, 295, 1542, 2044, 62, 415, 2340, 188, 174, 2157,
+ /* 730 */ 2175, 2335, 648, 1618, 167, 1540, 562, 558, 554, 550,
+ /* 740 */ 701, 233, 1949, 1787, 41, 40, 1548, 201, 47, 45,
+ /* 750 */ 44, 43, 42, 41, 40, 191, 1306, 47, 45, 44,
+ /* 760 */ 43, 42, 1568, 684, 1946, 2143, 2159, 622, 2193, 203,
+ /* 770 */ 2334, 790, 684, 1946, 49, 1548, 694, 1548, 191, 1786,
+ /* 780 */ 2143, 88, 700, 57, 231, 2340, 188, 48, 46, 30,
+ /* 790 */ 2335, 648, 681, 2143, 2175, 401, 1308, 1542, 684, 1946,
+ /* 800 */ 790, 44, 43, 42, 701, 2044, 684, 1946, 1623, 2338,
+ /* 810 */ 1540, 1625, 1626, 684, 1946, 2174, 2129, 2210, 451, 471,
+ /* 820 */ 111, 2176, 704, 2178, 2179, 699, 452, 694, 470, 2143,
+ /* 830 */ 564, 563, 2193, 461, 2263, 684, 1946, 1618, 2262, 2259,
+ /* 840 */ 1732, 1598, 1608, 688, 2143, 2235, 700, 1624, 1627, 1321,
+ /* 850 */ 1548, 207, 230, 224, 1212, 476, 54, 229, 3, 541,
+ /* 860 */ 1566, 1543, 1320, 1541, 249, 423, 41, 40, 248, 87,
+ /* 870 */ 47, 45, 44, 43, 42, 790, 74, 222, 15, 2174,
+ /* 880 */ 191, 2210, 1469, 1470, 171, 2176, 704, 2178, 2179, 699,
+ /* 890 */ 1543, 694, 1541, 1546, 1547, 1942, 1597, 1600, 1601, 1602,
+ /* 900 */ 1603, 1604, 1605, 1606, 1607, 696, 692, 1616, 1617, 1619,
+ /* 910 */ 1620, 1621, 1622, 2, 144, 1625, 1626, 2234, 1468, 1471,
+ /* 920 */ 684, 1946, 1546, 1547, 623, 2300, 82, 502, 90, 566,
+ /* 930 */ 565, 355, 106, 404, 380, 351, 602, 1565, 684, 1946,
+ /* 940 */ 477, 167, 103, 2175, 484, 1598, 1608, 498, 1999, 1948,
+ /* 950 */ 497, 1624, 1627, 701, 731, 629, 454, 1990, 544, 684,
+ /* 960 */ 1946, 2339, 1709, 1998, 2334, 1543, 467, 1541, 499, 455,
+ /* 970 */ 1785, 684, 1946, 469, 684, 1946, 34, 1209, 1210, 1943,
+ /* 980 */ 2338, 2193, 41, 40, 2335, 2336, 47, 45, 44, 43,
+ /* 990 */ 42, 252, 2126, 2143, 260, 700, 735, 1546, 1547, 1990,
+ /* 1000 */ 1597, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 696,
+ /* 1010 */ 692, 1616, 1617, 1619, 1620, 1621, 1622, 2, 1845, 369,
+ /* 1020 */ 2143, 730, 684, 1946, 684, 1946, 684, 1946, 2174, 736,
+ /* 1030 */ 2210, 457, 1990, 110, 2176, 704, 2178, 2179, 699, 148,
+ /* 1040 */ 694, 135, 286, 36, 667, 2354, 300, 2263, 691, 41,
+ /* 1050 */ 40, 397, 2259, 47, 45, 44, 43, 42, 582, 581,
+ /* 1060 */ 749, 495, 761, 759, 489, 488, 487, 486, 483, 482,
+ /* 1070 */ 481, 480, 479, 475, 474, 473, 472, 350, 464, 463,
+ /* 1080 */ 462, 607, 459, 458, 367, 650, 1784, 1697, 767, 766,
+ /* 1090 */ 765, 764, 413, 1567, 763, 762, 146, 757, 756, 755,
+ /* 1100 */ 754, 753, 752, 751, 159, 747, 746, 745, 412, 411,
+ /* 1110 */ 742, 741, 740, 177, 176, 168, 1848, 2278, 41, 40,
+ /* 1120 */ 325, 1633, 47, 45, 44, 43, 42, 1567, 622, 2175,
+ /* 1130 */ 1783, 2334, 1931, 1999, 323, 73, 2143, 1570, 72, 701,
+ /* 1140 */ 405, 2328, 407, 2273, 684, 1946, 2340, 188, 1997, 348,
+ /* 1150 */ 167, 2335, 648, 1654, 684, 1946, 62, 1933, 1948, 1780,
+ /* 1160 */ 216, 510, 508, 505, 682, 2175, 1921, 2193, 1779, 155,
+ /* 1170 */ 1999, 684, 1946, 319, 306, 701, 1976, 366, 1778, 2143,
+ /* 1180 */ 2143, 700, 1777, 1570, 651, 1997, 586, 585, 584, 750,
+ /* 1190 */ 1924, 408, 1908, 576, 139, 580, 1776, 572, 654, 579,
+ /* 1200 */ 62, 571, 1644, 2193, 578, 583, 376, 375, 430, 2143,
+ /* 1210 */ 577, 1775, 1929, 1774, 2174, 2143, 2210, 700, 2143, 110,
+ /* 1220 */ 2176, 704, 2178, 2179, 699, 1773, 694, 1832, 2143, 56,
+ /* 1230 */ 35, 2354, 2143, 2263, 150, 2175, 1263, 397, 2259, 109,
+ /* 1240 */ 1659, 1772, 445, 1599, 444, 701, 2143, 2282, 647, 587,
+ /* 1250 */ 2174, 2334, 2210, 2283, 1686, 172, 2176, 704, 2178, 2179,
+ /* 1260 */ 699, 2143, 694, 2143, 1764, 1765, 646, 188, 604, 1950,
+ /* 1270 */ 603, 2335, 648, 2193, 443, 2143, 1264, 1599, 256, 81,
+ /* 1280 */ 80, 450, 166, 695, 200, 2143, 2175, 700, 1823, 202,
+ /* 1290 */ 239, 2143, 621, 237, 155, 259, 701, 442, 440, 737,
+ /* 1300 */ 157, 156, 734, 733, 732, 154, 649, 2355, 349, 2175,
+ /* 1310 */ 589, 431, 191, 1782, 429, 425, 421, 418, 443, 701,
+ /* 1320 */ 2174, 2297, 2210, 1888, 2193, 110, 2176, 704, 2178, 2179,
+ /* 1330 */ 699, 241, 694, 1551, 240, 262, 2143, 2354, 700, 2263,
+ /* 1340 */ 1821, 1550, 2303, 397, 2259, 410, 409, 2193, 243, 245,
+ /* 1350 */ 280, 242, 244, 635, 1508, 1556, 191, 14, 13, 2143,
+ /* 1360 */ 2175, 700, 592, 155, 261, 50, 1623, 50, 1549, 267,
+ /* 1370 */ 701, 2174, 155, 2210, 50, 293, 335, 2176, 704, 2178,
+ /* 1380 */ 2179, 699, 71, 694, 137, 41, 40, 743, 153, 47,
+ /* 1390 */ 45, 44, 43, 42, 2174, 1618, 2210, 274, 2193, 110,
+ /* 1400 */ 2176, 704, 2178, 2179, 699, 155, 694, 91, 1548, 1282,
+ /* 1410 */ 2143, 2354, 700, 2263, 2153, 1886, 55, 397, 2259, 644,
+ /* 1420 */ 2175, 652, 64, 1511, 50, 1718, 50, 1717, 2161, 269,
+ /* 1430 */ 701, 708, 666, 690, 1466, 298, 153, 655, 2157, 744,
+ /* 1440 */ 155, 1885, 676, 136, 153, 2174, 2194, 2210, 302, 2175,
+ /* 1450 */ 110, 2176, 704, 2178, 2179, 699, 1815, 694, 2193, 701,
+ /* 1460 */ 2053, 1280, 2236, 1806, 2263, 1347, 414, 1987, 397, 2259,
+ /* 1470 */ 2143, 1811, 700, 660, 2293, 2159, 398, 282, 279, 1,
+ /* 1480 */ 9, 417, 1660, 422, 1609, 694, 318, 2193, 1573, 364,
+ /* 1490 */ 1554, 1375, 438, 195, 196, 439, 1379, 198, 1553, 2143,
+ /* 1500 */ 1386, 700, 441, 1384, 158, 2174, 785, 2210, 1489, 206,
+ /* 1510 */ 110, 2176, 704, 2178, 2179, 699, 313, 694, 1570, 456,
+ /* 1520 */ 2054, 493, 687, 1557, 2263, 1552, 460, 465, 397, 2259,
+ /* 1530 */ 1565, 478, 485, 2046, 2174, 504, 2210, 492, 494, 111,
+ /* 1540 */ 2176, 704, 2178, 2179, 699, 503, 694, 591, 501, 210,
+ /* 1550 */ 506, 211, 507, 2263, 213, 1560, 1562, 689, 2259, 509,
+ /* 1560 */ 511, 1571, 601, 526, 4, 2175, 527, 537, 692, 1616,
+ /* 1570 */ 1617, 1619, 1620, 1621, 1622, 701, 247, 534, 535, 1568,
+ /* 1580 */ 221, 538, 1572, 1574, 223, 539, 540, 226, 542, 228,
+ /* 1590 */ 567, 2175, 594, 569, 85, 546, 86, 232, 354, 588,
+ /* 1600 */ 606, 701, 2117, 2193, 112, 246, 1936, 2114, 236, 608,
+ /* 1610 */ 89, 1932, 151, 2113, 314, 2143, 253, 700, 238, 612,
+ /* 1620 */ 611, 160, 613, 161, 255, 2175, 257, 1934, 619, 2193,
+ /* 1630 */ 1930, 162, 163, 1496, 617, 701, 636, 2309, 7, 616,
+ /* 1640 */ 674, 2143, 2308, 700, 2285, 70, 645, 273, 69, 626,
+ /* 1650 */ 702, 275, 2210, 627, 387, 111, 2176, 704, 2178, 2179,
+ /* 1660 */ 699, 2294, 694, 2193, 2304, 632, 386, 618, 265, 2263,
+ /* 1670 */ 268, 639, 276, 359, 2259, 2143, 2174, 700, 2210, 175,
+ /* 1680 */ 625, 111, 2176, 704, 2178, 2179, 699, 2175, 694, 624,
+ /* 1690 */ 278, 656, 2357, 653, 2333, 2263, 1686, 701, 141, 1569,
+ /* 1700 */ 2260, 2279, 663, 664, 390, 288, 96, 2059, 1575, 677,
+ /* 1710 */ 2174, 2175, 2210, 315, 672, 171, 2176, 704, 2178, 2179,
+ /* 1720 */ 699, 701, 694, 316, 277, 2193, 673, 2073, 678, 2072,
+ /* 1730 */ 384, 2071, 393, 317, 61, 2175, 1947, 2143, 2244, 700,
+ /* 1740 */ 98, 100, 102, 281, 1909, 701, 706, 1991, 786, 2193,
+ /* 1750 */ 320, 787, 789, 309, 385, 344, 2301, 356, 53, 322,
+ /* 1760 */ 329, 2143, 343, 700, 357, 333, 324, 2135, 2134, 2133,
+ /* 1770 */ 78, 2130, 2174, 2193, 2210, 419, 420, 342, 2176, 704,
+ /* 1780 */ 2178, 2179, 699, 1533, 694, 2143, 1534, 700, 194, 424,
+ /* 1790 */ 2128, 426, 427, 428, 2127, 365, 2174, 2125, 2210, 2175,
+ /* 1800 */ 432, 342, 2176, 704, 2178, 2179, 699, 2124, 694, 701,
+ /* 1810 */ 434, 2123, 436, 1524, 2104, 197, 2103, 199, 1492, 79,
+ /* 1820 */ 2174, 2085, 2210, 1491, 2084, 172, 2176, 704, 2178, 2179,
+ /* 1830 */ 699, 2083, 694, 448, 449, 2082, 2081, 2193, 1443, 2037,
+ /* 1840 */ 2036, 2034, 392, 147, 2033, 2032, 2035, 2031, 2030, 2143,
+ /* 1850 */ 2028, 700, 2027, 2026, 204, 466, 2025, 468, 2039, 2024,
+ /* 1860 */ 2023, 2022, 2021, 2175, 149, 2009, 2008, 2007, 2038, 2006,
+ /* 1870 */ 2005, 1445, 2004, 698, 2020, 2019, 2018, 2356, 2017, 2016,
+ /* 1880 */ 2015, 2014, 2013, 2012, 2174, 2175, 2210, 2011, 2010, 342,
+ /* 1890 */ 2176, 704, 2178, 2179, 699, 701, 694, 2003, 2002, 2001,
+ /* 1900 */ 2000, 2193, 496, 352, 1851, 353, 1318, 1850, 1322, 2175,
+ /* 1910 */ 227, 2079, 1314, 2143, 1849, 700, 212, 1847, 1844, 701,
+ /* 1920 */ 1843, 1836, 513, 2193, 512, 214, 516, 1825, 400, 514,
+ /* 1930 */ 520, 524, 518, 215, 1801, 2143, 235, 700, 1211, 1800,
+ /* 1940 */ 522, 517, 76, 521, 217, 2102, 219, 2193, 2174, 182,
+ /* 1950 */ 2210, 2092, 402, 341, 2176, 704, 2178, 2179, 699, 2143,
+ /* 1960 */ 694, 700, 2229, 610, 77, 2080, 2163, 225, 2057, 183,
+ /* 1970 */ 2174, 1925, 2210, 532, 1846, 342, 2176, 704, 2178, 2179,
+ /* 1980 */ 699, 793, 694, 1842, 1256, 547, 549, 548, 1840, 551,
+ /* 1990 */ 552, 553, 1838, 555, 2174, 312, 2210, 2175, 556, 342,
+ /* 2000 */ 2176, 704, 2178, 2179, 699, 557, 694, 701, 1835, 560,
+ /* 2010 */ 559, 180, 561, 1820, 1818, 1819, 2175, 1817, 1797, 783,
+ /* 2020 */ 779, 775, 771, 1927, 310, 63, 701, 2175, 1391, 1390,
+ /* 2030 */ 1926, 758, 1305, 1303, 1301, 2193, 1300, 701, 1299, 1298,
+ /* 2040 */ 1297, 1294, 1292, 1833, 760, 1293, 1291, 2143, 377, 700,
+ /* 2050 */ 1824, 378, 1822, 590, 2193, 379, 593, 1796, 1795, 595,
+ /* 2060 */ 1794, 599, 597, 1518, 108, 2193, 2143, 303, 700, 113,
+ /* 2070 */ 1520, 1517, 2101, 1522, 2091, 29, 1498, 2143, 1500, 700,
+ /* 2080 */ 58, 67, 605, 614, 2210, 2339, 258, 337, 2176, 704,
+ /* 2090 */ 2178, 2179, 699, 2078, 694, 2175, 2076, 20, 31, 5,
+ /* 2100 */ 680, 2174, 165, 2210, 615, 701, 326, 2176, 704, 2178,
+ /* 2110 */ 2179, 699, 2174, 694, 2210, 2175, 383, 327, 2176, 704,
+ /* 2120 */ 2178, 2179, 699, 1734, 694, 701, 2175, 1502, 6, 65,
+ /* 2130 */ 21, 630, 620, 2193, 264, 290, 701, 173, 628, 22,
+ /* 2140 */ 289, 271, 266, 33, 1716, 2143, 2175, 700, 270, 32,
+ /* 2150 */ 272, 1708, 2164, 2193, 24, 1749, 701, 92, 1748, 1754,
+ /* 2160 */ 254, 60, 388, 1755, 2193, 2143, 1753, 700, 1752, 389,
+ /* 2170 */ 1683, 1682, 284, 2077, 2075, 178, 2143, 2074, 700, 17,
+ /* 2180 */ 2174, 2056, 2210, 95, 2193, 328, 2176, 704, 2178, 2179,
+ /* 2190 */ 699, 94, 694, 291, 23, 25, 2143, 294, 700, 59,
+ /* 2200 */ 2174, 299, 2210, 18, 2175, 334, 2176, 704, 2178, 2179,
+ /* 2210 */ 699, 2174, 694, 2210, 701, 292, 338, 2176, 704, 2178,
+ /* 2220 */ 2179, 699, 1714, 694, 68, 2175, 2055, 97, 103, 304,
+ /* 2230 */ 26, 2174, 99, 2210, 11, 701, 330, 2176, 704, 2178,
+ /* 2240 */ 2179, 699, 2193, 694, 675, 13, 301, 1558, 1635, 1634,
+ /* 2250 */ 2175, 179, 2213, 693, 2143, 1613, 700, 1611, 39, 16,
+ /* 2260 */ 701, 1610, 27, 2193, 1645, 192, 1582, 1590, 703, 28,
+ /* 2270 */ 707, 1376, 705, 403, 709, 2143, 2175, 700, 307, 1373,
+ /* 2280 */ 1372, 711, 712, 714, 1369, 717, 701, 715, 2193, 2174,
+ /* 2290 */ 720, 2210, 718, 721, 339, 2176, 704, 2178, 2179, 699,
+ /* 2300 */ 2143, 694, 700, 1363, 1361, 723, 1385, 1381, 724, 1254,
+ /* 2310 */ 2174, 104, 2210, 105, 2193, 331, 2176, 704, 2178, 2179,
+ /* 2320 */ 699, 1367, 694, 1366, 75, 738, 2143, 1365, 700, 1286,
+ /* 2330 */ 1285, 1364, 1284, 1283, 1281, 2174, 2175, 2210, 1279, 1278,
+ /* 2340 */ 340, 2176, 704, 2178, 2179, 699, 701, 694, 1277, 1312,
+ /* 2350 */ 748, 308, 2175, 1275, 1274, 1273, 1272, 1271, 1270, 1269,
+ /* 2360 */ 1307, 2174, 701, 2210, 1309, 2175, 332, 2176, 704, 2178,
+ /* 2370 */ 2179, 699, 1266, 694, 2193, 701, 1265, 1262, 1261, 1260,
+ /* 2380 */ 1259, 1841, 768, 770, 769, 1839, 2143, 772, 700, 773,
+ /* 2390 */ 2193, 1837, 774, 776, 778, 777, 1834, 780, 781, 782,
+ /* 2400 */ 1816, 784, 2143, 2193, 700, 1201, 1793, 792, 311, 788,
+ /* 2410 */ 1768, 1544, 321, 791, 1768, 2143, 1768, 700, 1768, 1768,
+ /* 2420 */ 1768, 2174, 1768, 2210, 1768, 2175, 345, 2176, 704, 2178,
+ /* 2430 */ 2179, 699, 1768, 694, 1768, 701, 1768, 2174, 1768, 2210,
+ /* 2440 */ 1768, 2175, 346, 2176, 704, 2178, 2179, 699, 1768, 694,
+ /* 2450 */ 2174, 701, 2210, 1768, 2175, 2187, 2176, 704, 2178, 2179,
+ /* 2460 */ 699, 1768, 694, 2193, 701, 1768, 1768, 1768, 1768, 1768,
+ /* 2470 */ 1768, 1768, 1768, 1768, 1768, 2143, 1768, 700, 1768, 2193,
+ /* 2480 */ 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768,
+ /* 2490 */ 1768, 2143, 2193, 700, 1768, 1768, 1768, 1768, 1768, 1768,
+ /* 2500 */ 1768, 1768, 1768, 1768, 2143, 1768, 700, 1768, 1768, 1768,
+ /* 2510 */ 2174, 1768, 2210, 1768, 1768, 2186, 2176, 704, 2178, 2179,
+ /* 2520 */ 699, 1768, 694, 1768, 1768, 1768, 2174, 2175, 2210, 1768,
+ /* 2530 */ 1768, 2185, 2176, 704, 2178, 2179, 699, 701, 694, 2174,
+ /* 2540 */ 1768, 2210, 1768, 2175, 361, 2176, 704, 2178, 2179, 699,
+ /* 2550 */ 1768, 694, 1768, 701, 2175, 1768, 1768, 1768, 1768, 1768,
+ /* 2560 */ 1768, 1768, 1768, 1768, 701, 2193, 1768, 1768, 1768, 1768,
+ /* 2570 */ 1768, 1768, 1768, 1768, 1768, 1768, 1768, 2143, 1768, 700,
+ /* 2580 */ 1768, 2193, 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768,
+ /* 2590 */ 1768, 1768, 2193, 2143, 1768, 700, 1768, 1768, 1768, 1768,
+ /* 2600 */ 1768, 1768, 1768, 1768, 2143, 1768, 700, 1768, 1768, 1768,
+ /* 2610 */ 1768, 1768, 2174, 1768, 2210, 1768, 2175, 362, 2176, 704,
+ /* 2620 */ 2178, 2179, 699, 1768, 694, 1768, 701, 1768, 2174, 1768,
+ /* 2630 */ 2210, 1768, 2175, 358, 2176, 704, 2178, 2179, 699, 2174,
+ /* 2640 */ 694, 2210, 701, 1768, 363, 2176, 704, 2178, 2179, 699,
+ /* 2650 */ 1768, 694, 1768, 1768, 2193, 1768, 1768, 1768, 1768, 1768,
+ /* 2660 */ 1768, 1768, 1768, 1768, 1768, 1768, 2143, 1768, 700, 1768,
+ /* 2670 */ 2193, 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768,
+ /* 2680 */ 1768, 1768, 2143, 1768, 700, 1768, 1768, 1768, 1768, 1768,
+ /* 2690 */ 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768, 1768,
+ /* 2700 */ 1768, 702, 1768, 2210, 1768, 1768, 337, 2176, 704, 2178,
+ /* 2710 */ 2179, 699, 1768, 694, 1768, 1768, 1768, 2174, 1768, 2210,
+ /* 2720 */ 1768, 1768, 336, 2176, 704, 2178, 2179, 699, 1768, 694,
};
static const YYCODETYPE yy_lookahead[] = {
- /* 0 */ 340, 359, 456, 445, 446, 459, 339, 409, 341, 367,
- /* 10 */ 350, 413, 12, 13, 14, 379, 378, 3, 366, 340,
- /* 20 */ 20, 475, 22, 8, 9, 479, 480, 12, 13, 14,
- /* 30 */ 15, 16, 380, 33, 20, 35, 398, 399, 378, 8,
- /* 40 */ 9, 349, 390, 12, 13, 14, 15, 16, 370, 409,
- /* 50 */ 390, 20, 392, 20, 456, 344, 378, 459, 347, 348,
- /* 60 */ 340, 345, 62, 385, 386, 349, 378, 351, 68, 390,
- /* 70 */ 350, 393, 474, 475, 386, 75, 377, 479, 480, 427,
- /* 80 */ 428, 374, 456, 68, 424, 459, 394, 427, 389, 437,
+ /* 0 */ 340, 392, 339, 345, 341, 349, 409, 349, 409, 351,
+ /* 10 */ 350, 414, 12, 13, 14, 379, 407, 408, 456, 340,
+ /* 20 */ 20, 459, 22, 8, 9, 12, 13, 12, 13, 14,
+ /* 30 */ 15, 16, 441, 33, 443, 35, 474, 475, 378, 8,
+ /* 40 */ 9, 479, 480, 12, 13, 14, 15, 16, 35, 409,
+ /* 50 */ 390, 20, 392, 456, 20, 456, 459, 401, 459, 403,
+ /* 60 */ 340, 378, 62, 12, 13, 14, 15, 16, 68, 390,
+ /* 70 */ 350, 474, 475, 474, 475, 75, 479, 480, 479, 480,
+ /* 80 */ 345, 398, 399, 68, 349, 425, 351, 427, 356, 377,
/* 90 */ 430, 431, 432, 433, 434, 435, 456, 437, 378, 459,
- /* 100 */ 100, 475, 442, 103, 444, 479, 480, 345, 448, 449,
- /* 110 */ 390, 349, 392, 351, 474, 475, 12, 13, 104, 479,
- /* 120 */ 480, 461, 349, 350, 20, 340, 22, 112, 421, 469,
- /* 130 */ 12, 13, 14, 15, 16, 349, 20, 33, 62, 35,
- /* 140 */ 140, 141, 369, 392, 424, 349, 350, 427, 35, 376,
- /* 150 */ 430, 431, 432, 433, 434, 435, 0, 437, 407, 408,
- /* 160 */ 440, 20, 442, 443, 444, 369, 62, 349, 448, 449,
- /* 170 */ 170, 171, 68, 140, 141, 390, 176, 177, 102, 75,
- /* 180 */ 0, 105, 349, 350, 169, 0, 172, 401, 75, 403,
- /* 190 */ 190, 21, 192, 20, 24, 25, 26, 27, 28, 29,
- /* 200 */ 30, 31, 32, 172, 100, 349, 21, 103, 340, 24,
- /* 210 */ 25, 26, 27, 28, 29, 30, 31, 32, 350, 401,
- /* 220 */ 352, 403, 222, 223, 0, 225, 226, 227, 228, 229,
+ /* 100 */ 100, 389, 442, 103, 444, 373, 358, 350, 448, 449,
+ /* 110 */ 390, 340, 392, 381, 474, 475, 12, 13, 392, 479,
+ /* 120 */ 480, 461, 366, 375, 20, 456, 22, 112, 459, 469,
+ /* 130 */ 404, 20, 384, 407, 408, 378, 380, 33, 62, 35,
+ /* 140 */ 140, 141, 349, 22, 475, 425, 390, 427, 479, 480,
+ /* 150 */ 430, 431, 432, 433, 434, 435, 35, 437, 20, 370,
+ /* 160 */ 440, 390, 442, 443, 444, 378, 62, 378, 448, 449,
+ /* 170 */ 170, 171, 68, 378, 385, 386, 176, 177, 102, 75,
+ /* 180 */ 385, 105, 393, 427, 169, 0, 399, 394, 393, 432,
+ /* 190 */ 190, 21, 192, 437, 24, 25, 26, 27, 28, 29,
+ /* 200 */ 30, 31, 32, 172, 100, 192, 21, 103, 340, 24,
+ /* 210 */ 25, 26, 27, 28, 29, 30, 31, 32, 350, 20,
+ /* 220 */ 352, 100, 222, 223, 0, 225, 226, 227, 228, 229,
/* 230 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- /* 240 */ 240, 241, 242, 20, 140, 141, 378, 67, 24, 25,
- /* 250 */ 26, 27, 28, 29, 30, 31, 32, 401, 390, 403,
+ /* 240 */ 240, 241, 242, 20, 140, 141, 378, 340, 24, 25,
+ /* 250 */ 26, 27, 28, 29, 30, 31, 32, 349, 390, 103,
/* 260 */ 392, 246, 247, 248, 249, 250, 251, 252, 253, 254,
- /* 270 */ 255, 256, 67, 340, 170, 171, 103, 349, 350, 4,
- /* 280 */ 176, 177, 39, 350, 451, 452, 453, 454, 172, 456,
- /* 290 */ 457, 20, 424, 22, 190, 427, 192, 369, 430, 431,
- /* 300 */ 432, 433, 434, 435, 376, 437, 35, 14, 349, 350,
- /* 310 */ 442, 378, 444, 20, 8, 9, 448, 449, 12, 13,
- /* 320 */ 14, 15, 16, 390, 53, 392, 222, 223, 369, 225,
+ /* 270 */ 255, 256, 445, 446, 170, 171, 20, 62, 140, 141,
+ /* 280 */ 176, 177, 4, 20, 8, 9, 349, 350, 12, 13,
+ /* 290 */ 14, 15, 16, 425, 190, 427, 192, 390, 430, 431,
+ /* 300 */ 432, 433, 434, 435, 344, 437, 369, 347, 348, 401,
+ /* 310 */ 442, 403, 444, 376, 20, 340, 448, 449, 103, 20,
+ /* 320 */ 105, 43, 14, 45, 46, 350, 222, 223, 20, 225,
/* 330 */ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
/* 340 */ 236, 237, 238, 239, 240, 241, 242, 243, 12, 13,
- /* 350 */ 20, 340, 22, 12, 13, 3, 20, 424, 22, 429,
- /* 360 */ 427, 350, 0, 430, 431, 432, 433, 434, 435, 33,
- /* 370 */ 437, 35, 216, 378, 378, 442, 35, 444, 103, 350,
- /* 380 */ 385, 448, 449, 53, 392, 455, 8, 9, 393, 378,
- /* 390 */ 12, 13, 14, 15, 16, 399, 404, 100, 62, 407,
- /* 400 */ 408, 390, 469, 392, 68, 344, 44, 378, 347, 348,
- /* 410 */ 104, 75, 115, 116, 117, 118, 119, 120, 121, 122,
- /* 420 */ 123, 124, 44, 126, 127, 128, 129, 130, 131, 132,
- /* 430 */ 20, 14, 259, 20, 356, 424, 100, 20, 427, 103,
- /* 440 */ 356, 430, 431, 432, 433, 434, 435, 436, 437, 438,
- /* 450 */ 439, 373, 12, 13, 14, 358, 175, 2, 33, 381,
- /* 460 */ 20, 432, 22, 8, 9, 381, 20, 12, 13, 14,
- /* 470 */ 15, 16, 375, 33, 49, 35, 140, 141, 20, 349,
- /* 480 */ 350, 384, 57, 58, 59, 60, 350, 62, 62, 370,
- /* 490 */ 133, 134, 135, 136, 137, 138, 139, 378, 340, 369,
- /* 500 */ 4, 258, 62, 20, 222, 386, 170, 171, 350, 243,
- /* 510 */ 352, 245, 176, 177, 350, 75, 8, 9, 349, 350,
- /* 520 */ 12, 13, 14, 15, 16, 20, 190, 102, 192, 103,
- /* 530 */ 105, 105, 396, 192, 259, 84, 378, 20, 369, 43,
- /* 540 */ 100, 45, 46, 103, 340, 264, 265, 266, 390, 103,
- /* 550 */ 392, 269, 270, 271, 272, 273, 274, 275, 222, 223,
- /* 560 */ 396, 225, 226, 227, 228, 229, 230, 231, 232, 233,
- /* 570 */ 234, 235, 236, 237, 238, 239, 240, 241, 242, 103,
- /* 580 */ 140, 141, 424, 170, 171, 427, 103, 170, 430, 431,
- /* 590 */ 432, 433, 434, 435, 390, 437, 145, 146, 173, 174,
- /* 600 */ 442, 49, 444, 178, 67, 180, 448, 449, 340, 57,
- /* 610 */ 170, 171, 60, 61, 349, 350, 176, 177, 350, 168,
- /* 620 */ 352, 349, 350, 198, 114, 366, 103, 103, 134, 135,
- /* 630 */ 190, 279, 192, 139, 369, 70, 71, 72, 441, 380,
- /* 640 */ 443, 369, 77, 78, 79, 0, 378, 340, 83, 390,
- /* 650 */ 349, 350, 35, 88, 89, 90, 91, 0, 390, 94,
- /* 660 */ 392, 409, 222, 223, 20, 225, 226, 227, 228, 229,
+ /* 350 */ 243, 175, 245, 378, 370, 20, 20, 388, 22, 100,
+ /* 360 */ 391, 392, 378, 37, 67, 390, 103, 392, 349, 33,
+ /* 370 */ 386, 35, 349, 350, 115, 116, 117, 118, 119, 120,
+ /* 380 */ 121, 122, 123, 124, 67, 126, 127, 128, 129, 130,
+ /* 390 */ 131, 132, 369, 340, 39, 429, 349, 350, 62, 376,
+ /* 400 */ 425, 340, 427, 350, 68, 430, 431, 432, 433, 434,
+ /* 410 */ 435, 75, 437, 3, 20, 259, 22, 442, 0, 444,
+ /* 420 */ 401, 455, 403, 448, 449, 134, 170, 349, 350, 35,
+ /* 430 */ 20, 378, 106, 4, 108, 109, 100, 111, 103, 103,
+ /* 440 */ 264, 265, 266, 390, 469, 392, 20, 53, 70, 71,
+ /* 450 */ 72, 390, 12, 13, 14, 77, 78, 79, 182, 133,
+ /* 460 */ 20, 83, 22, 137, 170, 171, 88, 89, 90, 91,
+ /* 470 */ 243, 222, 94, 33, 259, 35, 140, 141, 425, 429,
+ /* 480 */ 427, 391, 392, 430, 431, 432, 433, 434, 435, 436,
+ /* 490 */ 437, 438, 439, 344, 203, 204, 347, 348, 340, 452,
+ /* 500 */ 453, 454, 62, 456, 457, 455, 170, 171, 350, 20,
+ /* 510 */ 352, 22, 176, 177, 104, 75, 349, 350, 269, 270,
+ /* 520 */ 271, 272, 273, 274, 275, 84, 190, 13, 192, 451,
+ /* 530 */ 452, 453, 454, 49, 456, 457, 378, 1, 2, 20,
+ /* 540 */ 100, 57, 53, 103, 60, 61, 349, 350, 390, 35,
+ /* 550 */ 392, 133, 134, 135, 136, 137, 138, 139, 222, 223,
+ /* 560 */ 284, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ /* 570 */ 234, 235, 236, 237, 238, 239, 240, 241, 242, 13,
+ /* 580 */ 140, 141, 172, 425, 114, 427, 145, 146, 430, 431,
+ /* 590 */ 432, 433, 434, 435, 259, 437, 47, 378, 172, 103,
+ /* 600 */ 442, 35, 444, 356, 385, 340, 448, 449, 374, 168,
+ /* 610 */ 170, 171, 393, 258, 21, 350, 176, 177, 0, 452,
+ /* 620 */ 453, 454, 103, 456, 457, 4, 459, 34, 381, 36,
+ /* 630 */ 190, 185, 192, 133, 134, 135, 136, 137, 138, 139,
+ /* 640 */ 104, 474, 475, 378, 349, 350, 479, 480, 337, 452,
+ /* 650 */ 453, 454, 103, 456, 457, 390, 422, 392, 212, 213,
+ /* 660 */ 0, 409, 222, 223, 369, 225, 226, 227, 228, 229,
/* 670 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- /* 680 */ 240, 241, 242, 12, 13, 259, 427, 349, 350, 172,
- /* 690 */ 182, 20, 424, 22, 49, 427, 437, 390, 430, 431,
- /* 700 */ 432, 433, 434, 435, 33, 437, 35, 369, 456, 340,
- /* 710 */ 442, 459, 444, 189, 370, 191, 448, 449, 0, 350,
- /* 720 */ 388, 4, 378, 391, 392, 429, 474, 475, 349, 350,
- /* 730 */ 386, 479, 480, 62, 14, 259, 19, 391, 392, 340,
- /* 740 */ 20, 185, 259, 349, 350, 221, 75, 378, 369, 350,
- /* 750 */ 33, 455, 21, 452, 453, 454, 243, 456, 457, 390,
- /* 760 */ 459, 392, 370, 369, 429, 34, 49, 36, 212, 213,
- /* 770 */ 378, 100, 75, 56, 103, 474, 475, 378, 386, 62,
- /* 780 */ 479, 480, 259, 259, 140, 141, 75, 12, 13, 390,
- /* 790 */ 455, 392, 284, 424, 22, 20, 427, 22, 134, 430,
- /* 800 */ 431, 432, 433, 434, 435, 169, 437, 35, 33, 192,
- /* 810 */ 35, 140, 141, 444, 349, 350, 159, 448, 449, 102,
- /* 820 */ 176, 177, 105, 424, 0, 168, 427, 114, 378, 430,
- /* 830 */ 431, 432, 433, 434, 435, 385, 437, 62, 340, 340,
- /* 840 */ 14, 170, 171, 393, 349, 350, 20, 176, 177, 350,
- /* 850 */ 75, 133, 134, 135, 136, 137, 138, 139, 22, 378,
- /* 860 */ 441, 190, 443, 192, 369, 44, 385, 203, 204, 470,
- /* 870 */ 471, 35, 100, 2, 393, 100, 379, 378, 103, 8,
- /* 880 */ 9, 379, 246, 12, 13, 14, 15, 16, 390, 390,
- /* 890 */ 170, 392, 256, 222, 223, 379, 225, 226, 227, 228,
+ /* 680 */ 240, 241, 242, 12, 13, 67, 359, 54, 55, 260,
+ /* 690 */ 425, 20, 427, 22, 367, 430, 431, 432, 433, 434,
+ /* 700 */ 435, 350, 437, 378, 33, 366, 35, 442, 456, 444,
+ /* 710 */ 385, 459, 33, 448, 449, 340, 134, 135, 393, 380,
+ /* 720 */ 409, 139, 22, 350, 103, 414, 474, 475, 49, 390,
+ /* 730 */ 340, 479, 480, 62, 378, 35, 57, 58, 59, 60,
+ /* 740 */ 350, 62, 386, 340, 8, 9, 75, 396, 12, 13,
+ /* 750 */ 14, 15, 16, 8, 9, 259, 35, 12, 13, 14,
+ /* 760 */ 15, 16, 20, 349, 350, 390, 427, 456, 378, 396,
+ /* 770 */ 459, 100, 349, 350, 103, 75, 437, 75, 259, 340,
+ /* 780 */ 390, 102, 392, 369, 105, 474, 475, 12, 13, 44,
+ /* 790 */ 479, 480, 369, 390, 340, 20, 75, 22, 349, 350,
+ /* 800 */ 100, 14, 15, 16, 350, 350, 349, 350, 33, 3,
+ /* 810 */ 35, 140, 141, 349, 350, 425, 0, 427, 369, 159,
+ /* 820 */ 430, 431, 432, 433, 434, 435, 369, 437, 168, 390,
+ /* 830 */ 354, 355, 378, 369, 444, 349, 350, 62, 448, 449,
+ /* 840 */ 104, 170, 171, 441, 390, 443, 392, 176, 177, 22,
+ /* 850 */ 75, 396, 173, 174, 14, 369, 42, 178, 44, 180,
+ /* 860 */ 20, 190, 35, 192, 135, 49, 8, 9, 139, 358,
+ /* 870 */ 12, 13, 14, 15, 16, 100, 114, 198, 103, 425,
+ /* 880 */ 259, 427, 140, 141, 430, 431, 432, 433, 434, 435,
+ /* 890 */ 190, 437, 192, 222, 223, 384, 225, 226, 227, 228,
/* 900 */ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- /* 910 */ 239, 240, 241, 242, 340, 140, 141, 452, 453, 454,
- /* 920 */ 337, 456, 457, 424, 340, 104, 427, 340, 340, 430,
- /* 930 */ 431, 432, 433, 434, 435, 18, 437, 20, 14, 15,
- /* 940 */ 16, 378, 414, 340, 27, 170, 171, 30, 385, 340,
- /* 950 */ 33, 176, 177, 350, 378, 352, 393, 133, 134, 135,
- /* 960 */ 136, 137, 138, 139, 390, 190, 49, 192, 51, 393,
- /* 970 */ 471, 349, 350, 56, 390, 22, 22, 390, 390, 8,
- /* 980 */ 9, 378, 340, 12, 13, 14, 15, 16, 35, 35,
- /* 990 */ 20, 369, 409, 390, 340, 392, 413, 222, 223, 390,
+ /* 910 */ 239, 240, 241, 242, 440, 140, 141, 443, 176, 177,
+ /* 920 */ 349, 350, 222, 223, 470, 471, 164, 100, 199, 354,
+ /* 930 */ 355, 202, 103, 370, 205, 18, 207, 20, 349, 350,
+ /* 940 */ 369, 378, 113, 340, 27, 170, 171, 30, 378, 386,
+ /* 950 */ 33, 176, 177, 350, 387, 352, 22, 390, 369, 349,
+ /* 960 */ 350, 456, 104, 393, 459, 190, 49, 192, 51, 35,
+ /* 970 */ 340, 349, 350, 56, 349, 350, 2, 45, 46, 369,
+ /* 980 */ 475, 378, 8, 9, 479, 480, 12, 13, 14, 15,
+ /* 990 */ 16, 369, 0, 390, 369, 392, 387, 222, 223, 390,
/* 1000 */ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
/* 1010 */ 235, 236, 237, 238, 239, 240, 241, 242, 0, 102,
- /* 1020 */ 20, 349, 350, 349, 350, 363, 364, 424, 75, 379,
- /* 1030 */ 427, 114, 390, 430, 431, 432, 433, 434, 435, 456,
- /* 1040 */ 437, 369, 459, 340, 390, 442, 133, 444, 54, 55,
- /* 1050 */ 137, 448, 449, 100, 100, 354, 355, 474, 475, 354,
- /* 1060 */ 355, 144, 479, 480, 147, 148, 149, 150, 151, 152,
+ /* 1020 */ 390, 114, 349, 350, 349, 350, 349, 350, 425, 387,
+ /* 1030 */ 427, 114, 390, 430, 431, 432, 433, 434, 435, 42,
+ /* 1040 */ 437, 44, 369, 2, 369, 442, 369, 444, 68, 8,
+ /* 1050 */ 9, 448, 449, 12, 13, 14, 15, 16, 363, 364,
+ /* 1060 */ 75, 144, 363, 364, 147, 148, 149, 150, 151, 152,
/* 1070 */ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
- /* 1080 */ 163, 44, 165, 166, 167, 363, 364, 340, 70, 71,
- /* 1090 */ 72, 73, 74, 390, 76, 77, 78, 79, 80, 81,
+ /* 1080 */ 163, 409, 165, 166, 167, 279, 340, 14, 70, 71,
+ /* 1090 */ 72, 73, 74, 20, 76, 77, 78, 79, 80, 81,
/* 1100 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- /* 1110 */ 92, 93, 94, 95, 96, 18, 349, 350, 409, 340,
- /* 1120 */ 23, 340, 340, 12, 13, 379, 452, 453, 454, 340,
- /* 1130 */ 456, 457, 37, 22, 37, 38, 369, 390, 41, 350,
- /* 1140 */ 379, 352, 172, 190, 33, 192, 35, 8, 9, 52,
- /* 1150 */ 4, 12, 13, 14, 15, 16, 350, 340, 349, 350,
- /* 1160 */ 63, 64, 65, 66, 42, 456, 44, 378, 459, 390,
- /* 1170 */ 170, 390, 390, 62, 44, 222, 223, 340, 369, 390,
- /* 1180 */ 340, 392, 62, 474, 475, 366, 75, 350, 479, 480,
- /* 1190 */ 8, 9, 1, 2, 12, 13, 14, 15, 16, 380,
- /* 1200 */ 103, 106, 396, 108, 109, 114, 111, 390, 358, 390,
- /* 1210 */ 68, 100, 409, 424, 440, 378, 427, 443, 367, 430,
- /* 1220 */ 431, 432, 433, 434, 435, 105, 437, 390, 133, 392,
- /* 1230 */ 390, 442, 137, 444, 384, 340, 13, 448, 449, 142,
- /* 1240 */ 42, 387, 44, 104, 390, 350, 427, 352, 387, 387,
- /* 1250 */ 371, 390, 390, 374, 365, 164, 437, 368, 35, 456,
- /* 1260 */ 107, 424, 459, 110, 427, 257, 258, 430, 431, 432,
- /* 1270 */ 433, 434, 435, 378, 437, 45, 46, 474, 475, 182,
- /* 1280 */ 183, 184, 479, 480, 187, 390, 340, 392, 107, 341,
- /* 1290 */ 13, 110, 48, 349, 350, 104, 350, 200, 201, 107,
- /* 1300 */ 400, 190, 110, 192, 107, 140, 141, 110, 211, 0,
- /* 1310 */ 473, 214, 35, 369, 217, 218, 219, 220, 221, 424,
- /* 1320 */ 283, 206, 427, 208, 378, 430, 431, 432, 433, 434,
- /* 1330 */ 435, 22, 437, 222, 223, 0, 390, 442, 392, 444,
- /* 1340 */ 0, 44, 456, 448, 449, 459, 235, 236, 237, 238,
- /* 1350 */ 239, 240, 241, 340, 172, 135, 259, 22, 44, 139,
- /* 1360 */ 474, 475, 22, 350, 222, 479, 480, 483, 44, 44,
- /* 1370 */ 424, 44, 44, 427, 44, 44, 430, 431, 432, 433,
- /* 1380 */ 434, 435, 472, 437, 349, 350, 340, 353, 442, 103,
- /* 1390 */ 444, 378, 349, 350, 448, 449, 350, 349, 350, 113,
- /* 1400 */ 44, 104, 47, 390, 369, 392, 260, 44, 44, 1,
- /* 1410 */ 2, 281, 369, 340, 44, 466, 172, 369, 104, 199,
- /* 1420 */ 35, 0, 202, 350, 378, 205, 44, 207, 104, 104,
- /* 1430 */ 13, 104, 104, 44, 104, 104, 390, 424, 392, 378,
- /* 1440 */ 427, 366, 44, 430, 431, 432, 433, 434, 435, 340,
- /* 1450 */ 437, 378, 35, 366, 44, 442, 44, 444, 103, 350,
- /* 1460 */ 104, 448, 449, 390, 44, 392, 353, 104, 104, 44,
- /* 1470 */ 424, 50, 35, 427, 104, 340, 430, 431, 432, 433,
- /* 1480 */ 434, 435, 400, 437, 348, 350, 104, 378, 442, 13,
- /* 1490 */ 444, 350, 389, 104, 448, 449, 400, 424, 458, 390,
- /* 1500 */ 427, 392, 104, 430, 431, 432, 433, 434, 435, 476,
- /* 1510 */ 437, 35, 75, 378, 104, 450, 104, 444, 460, 261,
- /* 1520 */ 426, 448, 449, 49, 104, 390, 425, 392, 20, 104,
- /* 1530 */ 418, 205, 358, 424, 418, 358, 427, 423, 188, 430,
- /* 1540 */ 431, 432, 433, 434, 435, 411, 437, 42, 397, 20,
- /* 1550 */ 400, 397, 169, 444, 340, 395, 20, 448, 449, 424,
- /* 1560 */ 349, 349, 427, 397, 350, 430, 431, 432, 433, 434,
- /* 1570 */ 435, 395, 437, 395, 101, 362, 99, 192, 361, 98,
- /* 1580 */ 340, 349, 360, 349, 349, 349, 20, 342, 48, 346,
- /* 1590 */ 350, 342, 378, 346, 20, 358, 392, 418, 20, 358,
- /* 1600 */ 20, 351, 342, 410, 390, 378, 392, 351, 349, 358,
- /* 1610 */ 358, 358, 385, 358, 390, 358, 481, 482, 378, 349,
- /* 1620 */ 393, 390, 342, 383, 378, 209, 378, 422, 390, 103,
- /* 1630 */ 390, 196, 392, 195, 418, 420, 417, 356, 424, 378,
- /* 1640 */ 378, 427, 340, 378, 430, 431, 432, 433, 434, 435,
- /* 1650 */ 378, 437, 350, 378, 378, 416, 378, 378, 444, 340,
- /* 1660 */ 378, 392, 356, 449, 424, 194, 349, 427, 400, 350,
- /* 1670 */ 430, 431, 432, 433, 434, 435, 267, 437, 340, 415,
- /* 1680 */ 378, 390, 268, 456, 400, 383, 459, 276, 350, 390,
- /* 1690 */ 465, 465, 390, 405, 392, 405, 468, 378, 390, 181,
- /* 1700 */ 390, 474, 475, 285, 278, 277, 479, 480, 262, 390,
- /* 1710 */ 258, 392, 282, 426, 280, 350, 378, 484, 20, 465,
- /* 1720 */ 478, 383, 429, 349, 351, 356, 424, 464, 390, 427,
- /* 1730 */ 392, 356, 430, 431, 432, 433, 434, 435, 467, 437,
- /* 1740 */ 20, 405, 403, 424, 477, 462, 427, 390, 463, 430,
- /* 1750 */ 431, 432, 433, 434, 435, 174, 437, 390, 390, 405,
- /* 1760 */ 402, 390, 424, 356, 340, 427, 390, 390, 430, 431,
- /* 1770 */ 432, 433, 434, 435, 350, 437, 374, 350, 356, 103,
- /* 1780 */ 447, 340, 103, 382, 390, 349, 36, 368, 356, 338,
- /* 1790 */ 343, 350, 342, 412, 406, 372, 406, 419, 0, 357,
- /* 1800 */ 340, 482, 378, 372, 0, 372, 0, 42, 0, 35,
- /* 1810 */ 350, 215, 35, 35, 390, 35, 392, 215, 0, 378,
- /* 1820 */ 35, 35, 215, 0, 383, 215, 0, 35, 0, 22,
- /* 1830 */ 0, 390, 35, 392, 0, 210, 198, 0, 378, 198,
- /* 1840 */ 192, 199, 190, 383, 0, 0, 0, 186, 424, 185,
- /* 1850 */ 390, 427, 392, 0, 430, 431, 432, 433, 434, 435,
- /* 1860 */ 0, 437, 47, 439, 0, 424, 42, 1, 427, 0,
- /* 1870 */ 0, 430, 431, 432, 433, 434, 435, 0, 437, 0,
- /* 1880 */ 0, 0, 0, 0, 424, 19, 0, 427, 0, 159,
- /* 1890 */ 430, 431, 432, 433, 434, 435, 35, 437, 340, 33,
- /* 1900 */ 0, 159, 0, 0, 0, 0, 0, 0, 350, 0,
- /* 1910 */ 0, 0, 0, 0, 0, 49, 42, 0, 0, 0,
- /* 1920 */ 0, 0, 0, 57, 58, 59, 60, 0, 62, 0,
- /* 1930 */ 0, 340, 0, 0, 0, 0, 378, 22, 143, 0,
- /* 1940 */ 0, 350, 48, 48, 0, 22, 22, 62, 390, 0,
- /* 1950 */ 392, 62, 0, 62, 0, 0, 0, 49, 0, 0,
- /* 1960 */ 35, 35, 0, 0, 340, 181, 35, 39, 102, 378,
- /* 1970 */ 0, 105, 0, 0, 350, 39, 35, 35, 0, 14,
- /* 1980 */ 0, 390, 424, 392, 0, 427, 39, 49, 430, 431,
- /* 1990 */ 432, 433, 434, 435, 49, 437, 0, 44, 47, 42,
- /* 2000 */ 340, 0, 378, 39, 138, 39, 39, 47, 47, 40,
- /* 2010 */ 350, 35, 69, 39, 390, 424, 392, 49, 427, 0,
- /* 2020 */ 35, 430, 431, 432, 433, 434, 435, 39, 437, 0,
- /* 2030 */ 49, 49, 35, 340, 39, 0, 49, 35, 378, 173,
- /* 2040 */ 0, 0, 39, 350, 178, 0, 0, 0, 424, 0,
- /* 2050 */ 390, 427, 392, 35, 430, 431, 432, 433, 434, 435,
- /* 2060 */ 112, 437, 340, 0, 198, 22, 35, 35, 35, 35,
- /* 2070 */ 44, 378, 350, 35, 35, 0, 22, 35, 22, 35,
- /* 2080 */ 44, 110, 0, 390, 424, 392, 35, 427, 22, 0,
- /* 2090 */ 430, 431, 432, 433, 434, 435, 35, 437, 22, 51,
- /* 2100 */ 378, 22, 35, 0, 35, 0, 35, 0, 20, 35,
- /* 2110 */ 104, 103, 390, 35, 392, 35, 0, 424, 172, 103,
- /* 2120 */ 427, 35, 340, 430, 431, 432, 433, 434, 435, 0,
- /* 2130 */ 437, 22, 350, 22, 0, 0, 3, 44, 263, 48,
- /* 2140 */ 103, 340, 48, 44, 44, 47, 424, 197, 44, 427,
- /* 2150 */ 44, 350, 430, 431, 432, 433, 434, 435, 172, 437,
- /* 2160 */ 378, 104, 172, 174, 104, 103, 101, 99, 193, 47,
- /* 2170 */ 179, 3, 390, 103, 392, 44, 104, 104, 35, 378,
- /* 2180 */ 103, 35, 35, 35, 103, 35, 103, 47, 35, 340,
- /* 2190 */ 0, 390, 47, 392, 104, 44, 104, 0, 0, 350,
- /* 2200 */ 104, 104, 0, 39, 47, 103, 424, 0, 340, 427,
- /* 2210 */ 39, 103, 430, 431, 432, 433, 434, 435, 350, 437,
- /* 2220 */ 44, 104, 104, 103, 103, 424, 103, 378, 427, 103,
- /* 2230 */ 175, 430, 431, 432, 433, 434, 435, 173, 437, 390,
- /* 2240 */ 263, 392, 0, 113, 244, 101, 378, 2, 47, 22,
- /* 2250 */ 257, 47, 222, 104, 22, 263, 340, 101, 390, 104,
- /* 2260 */ 392, 103, 103, 103, 47, 104, 350, 104, 103, 103,
- /* 2270 */ 103, 35, 35, 424, 224, 103, 427, 340, 35, 430,
- /* 2280 */ 431, 432, 433, 434, 435, 104, 437, 350, 114, 104,
- /* 2290 */ 103, 35, 424, 104, 378, 427, 103, 35, 430, 431,
- /* 2300 */ 432, 433, 434, 435, 35, 437, 390, 104, 392, 103,
- /* 2310 */ 35, 103, 70, 71, 72, 378, 104, 104, 103, 77,
- /* 2320 */ 78, 79, 103, 44, 125, 83, 103, 390, 35, 392,
- /* 2330 */ 88, 89, 90, 91, 125, 125, 94, 103, 22, 125,
- /* 2340 */ 424, 69, 68, 427, 35, 340, 430, 431, 432, 433,
- /* 2350 */ 434, 435, 35, 437, 35, 350, 35, 35, 35, 35,
- /* 2360 */ 35, 424, 75, 340, 427, 97, 22, 430, 431, 432,
- /* 2370 */ 433, 434, 435, 350, 437, 44, 35, 35, 35, 75,
- /* 2380 */ 35, 35, 35, 378, 35, 35, 35, 35, 35, 22,
- /* 2390 */ 35, 0, 35, 340, 0, 390, 35, 392, 39, 39,
- /* 2400 */ 0, 378, 39, 350, 35, 49, 0, 49, 35, 39,
- /* 2410 */ 0, 49, 35, 390, 49, 392, 35, 0, 22, 21,
- /* 2420 */ 485, 22, 20, 22, 340, 21, 485, 485, 485, 424,
- /* 2430 */ 485, 378, 427, 485, 350, 430, 431, 432, 433, 434,
- /* 2440 */ 435, 340, 437, 390, 485, 392, 485, 424, 485, 485,
- /* 2450 */ 427, 350, 485, 430, 431, 432, 433, 434, 435, 485,
- /* 2460 */ 437, 485, 378, 485, 485, 485, 485, 485, 485, 485,
- /* 2470 */ 485, 485, 485, 485, 390, 485, 392, 424, 485, 378,
- /* 2480 */ 427, 485, 485, 430, 431, 432, 433, 434, 435, 485,
- /* 2490 */ 437, 390, 340, 392, 485, 485, 485, 485, 485, 485,
- /* 2500 */ 485, 485, 350, 485, 485, 485, 485, 485, 424, 485,
- /* 2510 */ 485, 427, 485, 340, 430, 431, 432, 433, 434, 435,
- /* 2520 */ 485, 437, 485, 350, 485, 424, 485, 485, 427, 485,
- /* 2530 */ 378, 430, 431, 432, 433, 434, 435, 485, 437, 485,
- /* 2540 */ 340, 485, 390, 485, 392, 485, 485, 485, 485, 485,
- /* 2550 */ 350, 378, 485, 485, 485, 485, 485, 485, 485, 485,
- /* 2560 */ 485, 485, 485, 390, 485, 392, 485, 485, 485, 485,
- /* 2570 */ 485, 485, 485, 485, 485, 485, 424, 485, 378, 427,
- /* 2580 */ 485, 485, 430, 431, 432, 433, 434, 435, 485, 437,
- /* 2590 */ 390, 485, 392, 485, 485, 485, 485, 424, 485, 485,
- /* 2600 */ 427, 340, 485, 430, 431, 432, 433, 434, 435, 485,
- /* 2610 */ 437, 350, 485, 485, 485, 485, 485, 485, 340, 485,
- /* 2620 */ 485, 485, 485, 485, 424, 485, 485, 427, 350, 485,
- /* 2630 */ 430, 431, 432, 433, 434, 435, 485, 437, 485, 378,
- /* 2640 */ 485, 485, 485, 485, 485, 485, 485, 485, 485, 485,
- /* 2650 */ 485, 390, 485, 392, 485, 485, 378, 485, 485, 485,
- /* 2660 */ 485, 485, 485, 485, 485, 485, 485, 485, 390, 485,
- /* 2670 */ 392, 485, 485, 485, 485, 485, 485, 485, 485, 485,
- /* 2680 */ 485, 485, 485, 485, 485, 424, 485, 485, 427, 485,
- /* 2690 */ 485, 430, 431, 432, 433, 434, 435, 485, 437, 485,
- /* 2700 */ 485, 485, 424, 485, 485, 427, 485, 485, 430, 431,
- /* 2710 */ 432, 433, 434, 435, 485, 437, 485, 485, 485, 485,
- /* 2720 */ 485, 485, 485, 485, 485, 485, 485, 485, 485, 485,
+ /* 1110 */ 92, 93, 94, 95, 96, 18, 0, 429, 8, 9,
+ /* 1120 */ 23, 14, 12, 13, 14, 15, 16, 20, 456, 340,
+ /* 1130 */ 340, 459, 379, 378, 37, 38, 390, 20, 41, 350,
+ /* 1140 */ 385, 352, 370, 455, 349, 350, 474, 475, 393, 52,
+ /* 1150 */ 378, 479, 480, 169, 349, 350, 103, 379, 386, 340,
+ /* 1160 */ 63, 64, 65, 66, 369, 340, 0, 378, 340, 44,
+ /* 1170 */ 378, 349, 350, 371, 369, 350, 374, 385, 340, 390,
+ /* 1180 */ 390, 392, 340, 20, 44, 393, 70, 71, 72, 365,
+ /* 1190 */ 0, 369, 368, 77, 78, 79, 340, 133, 44, 83,
+ /* 1200 */ 103, 137, 222, 378, 88, 89, 90, 91, 216, 390,
+ /* 1210 */ 94, 340, 379, 340, 425, 390, 427, 392, 390, 430,
+ /* 1220 */ 431, 432, 433, 434, 435, 340, 437, 0, 390, 104,
+ /* 1230 */ 246, 442, 390, 444, 44, 340, 35, 448, 449, 142,
+ /* 1240 */ 256, 340, 189, 170, 191, 350, 390, 352, 456, 22,
+ /* 1250 */ 425, 459, 427, 257, 258, 430, 431, 432, 433, 434,
+ /* 1260 */ 435, 390, 437, 390, 140, 141, 474, 475, 206, 379,
+ /* 1270 */ 208, 479, 480, 378, 221, 390, 75, 170, 379, 182,
+ /* 1280 */ 183, 184, 172, 379, 187, 390, 340, 392, 0, 172,
+ /* 1290 */ 107, 390, 48, 110, 44, 415, 350, 200, 201, 133,
+ /* 1300 */ 134, 135, 136, 137, 138, 139, 481, 482, 211, 340,
+ /* 1310 */ 22, 214, 259, 341, 217, 218, 219, 220, 221, 350,
+ /* 1320 */ 425, 352, 427, 367, 378, 430, 431, 432, 433, 434,
+ /* 1330 */ 435, 107, 437, 35, 110, 172, 390, 442, 392, 444,
+ /* 1340 */ 0, 35, 400, 448, 449, 12, 13, 378, 107, 107,
+ /* 1350 */ 483, 110, 110, 472, 104, 22, 259, 1, 2, 390,
+ /* 1360 */ 340, 392, 22, 44, 62, 44, 33, 44, 35, 44,
+ /* 1370 */ 350, 425, 44, 427, 44, 44, 430, 431, 432, 433,
+ /* 1380 */ 434, 435, 44, 437, 353, 8, 9, 13, 44, 12,
+ /* 1390 */ 13, 14, 15, 16, 425, 62, 427, 466, 378, 430,
+ /* 1400 */ 431, 432, 433, 434, 435, 44, 437, 105, 75, 35,
+ /* 1410 */ 390, 442, 392, 444, 366, 366, 172, 448, 449, 473,
+ /* 1420 */ 340, 281, 44, 104, 44, 104, 44, 104, 380, 104,
+ /* 1430 */ 350, 44, 104, 100, 104, 104, 44, 283, 390, 13,
+ /* 1440 */ 44, 366, 104, 44, 44, 425, 378, 427, 104, 340,
+ /* 1450 */ 430, 431, 432, 433, 434, 435, 0, 437, 378, 350,
+ /* 1460 */ 400, 35, 442, 348, 444, 104, 353, 389, 448, 449,
+ /* 1470 */ 390, 350, 392, 458, 400, 427, 428, 476, 450, 460,
+ /* 1480 */ 261, 410, 104, 49, 104, 437, 104, 378, 20, 426,
+ /* 1490 */ 192, 104, 205, 424, 358, 419, 104, 358, 192, 390,
+ /* 1500 */ 104, 392, 419, 104, 104, 425, 50, 427, 188, 42,
+ /* 1510 */ 430, 431, 432, 433, 434, 435, 412, 437, 20, 397,
+ /* 1520 */ 400, 169, 442, 190, 444, 192, 397, 395, 448, 449,
+ /* 1530 */ 20, 349, 397, 349, 425, 362, 427, 395, 395, 430,
+ /* 1540 */ 431, 432, 433, 434, 435, 101, 437, 4, 99, 361,
+ /* 1550 */ 98, 349, 360, 444, 349, 222, 223, 448, 449, 349,
+ /* 1560 */ 349, 20, 19, 342, 48, 340, 346, 419, 235, 236,
+ /* 1570 */ 237, 238, 239, 240, 241, 350, 33, 342, 346, 20,
+ /* 1580 */ 358, 392, 20, 20, 358, 351, 411, 358, 351, 358,
+ /* 1590 */ 342, 340, 49, 378, 358, 349, 358, 358, 342, 56,
+ /* 1600 */ 209, 350, 390, 378, 349, 62, 378, 390, 378, 423,
+ /* 1610 */ 103, 378, 421, 390, 419, 390, 356, 392, 378, 196,
+ /* 1620 */ 195, 378, 418, 378, 417, 340, 356, 378, 349, 378,
+ /* 1630 */ 378, 378, 378, 194, 416, 350, 268, 465, 276, 392,
+ /* 1640 */ 267, 390, 465, 392, 468, 102, 181, 467, 105, 390,
+ /* 1650 */ 425, 464, 427, 278, 285, 430, 431, 432, 433, 434,
+ /* 1660 */ 435, 400, 437, 378, 400, 390, 390, 410, 405, 444,
+ /* 1670 */ 405, 390, 463, 448, 449, 390, 425, 392, 427, 465,
+ /* 1680 */ 277, 430, 431, 432, 433, 434, 435, 340, 437, 262,
+ /* 1690 */ 410, 282, 484, 280, 478, 444, 258, 350, 350, 20,
+ /* 1700 */ 449, 429, 410, 349, 351, 356, 356, 403, 20, 174,
+ /* 1710 */ 425, 340, 427, 405, 390, 430, 431, 432, 433, 434,
+ /* 1720 */ 435, 350, 437, 405, 462, 378, 390, 390, 402, 390,
+ /* 1730 */ 383, 390, 390, 374, 103, 340, 350, 390, 447, 392,
+ /* 1740 */ 356, 356, 103, 477, 368, 350, 382, 390, 36, 378,
+ /* 1750 */ 349, 343, 342, 356, 383, 420, 471, 406, 413, 357,
+ /* 1760 */ 372, 390, 372, 392, 406, 372, 338, 0, 0, 0,
+ /* 1770 */ 42, 0, 425, 378, 427, 35, 215, 430, 431, 432,
+ /* 1780 */ 433, 434, 435, 35, 437, 390, 35, 392, 35, 215,
+ /* 1790 */ 0, 35, 35, 215, 0, 215, 425, 0, 427, 340,
+ /* 1800 */ 35, 430, 431, 432, 433, 434, 435, 0, 437, 350,
+ /* 1810 */ 22, 0, 35, 210, 0, 198, 0, 198, 192, 199,
+ /* 1820 */ 425, 0, 427, 190, 0, 430, 431, 432, 433, 434,
+ /* 1830 */ 435, 0, 437, 186, 185, 0, 0, 378, 47, 0,
+ /* 1840 */ 0, 0, 383, 42, 0, 0, 0, 0, 0, 390,
+ /* 1850 */ 0, 392, 0, 0, 159, 35, 0, 159, 0, 0,
+ /* 1860 */ 0, 0, 0, 340, 42, 0, 0, 0, 0, 0,
+ /* 1870 */ 0, 22, 0, 350, 0, 0, 0, 482, 0, 0,
+ /* 1880 */ 0, 0, 0, 0, 425, 340, 427, 0, 0, 430,
+ /* 1890 */ 431, 432, 433, 434, 435, 350, 437, 0, 0, 0,
+ /* 1900 */ 0, 378, 143, 48, 0, 48, 22, 0, 22, 340,
+ /* 1910 */ 181, 0, 35, 390, 0, 392, 62, 0, 0, 350,
+ /* 1920 */ 0, 0, 49, 378, 35, 62, 35, 0, 383, 39,
+ /* 1930 */ 35, 35, 39, 62, 0, 390, 110, 392, 14, 0,
+ /* 1940 */ 39, 49, 39, 49, 42, 0, 40, 378, 425, 44,
+ /* 1950 */ 427, 0, 383, 430, 431, 432, 433, 434, 435, 390,
+ /* 1960 */ 437, 392, 439, 1, 39, 0, 47, 39, 0, 47,
+ /* 1970 */ 425, 0, 427, 47, 0, 430, 431, 432, 433, 434,
+ /* 1980 */ 435, 19, 437, 0, 69, 35, 39, 49, 0, 35,
+ /* 1990 */ 49, 39, 0, 35, 425, 33, 427, 340, 49, 430,
+ /* 2000 */ 431, 432, 433, 434, 435, 39, 437, 350, 0, 49,
+ /* 2010 */ 35, 49, 39, 0, 0, 0, 340, 0, 0, 57,
+ /* 2020 */ 58, 59, 60, 0, 62, 112, 350, 340, 35, 22,
+ /* 2030 */ 0, 44, 35, 35, 35, 378, 35, 350, 35, 35,
+ /* 2040 */ 35, 35, 22, 0, 44, 35, 35, 390, 22, 392,
+ /* 2050 */ 0, 22, 0, 51, 378, 22, 35, 0, 0, 35,
+ /* 2060 */ 0, 22, 35, 35, 102, 378, 390, 105, 392, 20,
+ /* 2070 */ 35, 35, 0, 104, 0, 103, 35, 390, 22, 392,
+ /* 2080 */ 172, 103, 425, 22, 427, 3, 174, 430, 431, 432,
+ /* 2090 */ 433, 434, 435, 0, 437, 340, 0, 44, 103, 48,
+ /* 2100 */ 138, 425, 193, 427, 172, 350, 430, 431, 432, 433,
+ /* 2110 */ 434, 435, 425, 437, 427, 340, 172, 430, 431, 432,
+ /* 2120 */ 433, 434, 435, 104, 437, 350, 340, 197, 48, 3,
+ /* 2130 */ 44, 99, 179, 378, 103, 173, 350, 103, 101, 44,
+ /* 2140 */ 178, 44, 104, 44, 104, 390, 340, 392, 103, 103,
+ /* 2150 */ 47, 104, 47, 378, 44, 35, 350, 103, 35, 104,
+ /* 2160 */ 198, 44, 35, 104, 378, 390, 35, 392, 35, 35,
+ /* 2170 */ 104, 104, 47, 0, 0, 47, 390, 0, 392, 263,
+ /* 2180 */ 425, 0, 427, 39, 378, 430, 431, 432, 433, 434,
+ /* 2190 */ 435, 103, 437, 47, 263, 103, 390, 103, 392, 257,
+ /* 2200 */ 425, 103, 427, 263, 340, 430, 431, 432, 433, 434,
+ /* 2210 */ 435, 425, 437, 427, 350, 104, 430, 431, 432, 433,
+ /* 2220 */ 434, 435, 104, 437, 103, 340, 0, 39, 113, 47,
+ /* 2230 */ 44, 425, 103, 427, 244, 350, 430, 431, 432, 433,
+ /* 2240 */ 434, 435, 378, 437, 175, 2, 173, 22, 101, 101,
+ /* 2250 */ 340, 47, 103, 103, 390, 104, 392, 104, 103, 103,
+ /* 2260 */ 350, 104, 103, 378, 222, 47, 104, 22, 224, 103,
+ /* 2270 */ 35, 104, 114, 35, 103, 390, 340, 392, 44, 104,
+ /* 2280 */ 104, 35, 103, 35, 104, 35, 350, 103, 378, 425,
+ /* 2290 */ 35, 427, 103, 103, 430, 431, 432, 433, 434, 435,
+ /* 2300 */ 390, 437, 392, 104, 104, 35, 35, 22, 103, 69,
+ /* 2310 */ 425, 103, 427, 103, 378, 430, 431, 432, 433, 434,
+ /* 2320 */ 435, 125, 437, 125, 103, 68, 390, 125, 392, 35,
+ /* 2330 */ 35, 125, 35, 35, 35, 425, 340, 427, 35, 35,
+ /* 2340 */ 430, 431, 432, 433, 434, 435, 350, 437, 35, 75,
+ /* 2350 */ 97, 44, 340, 35, 35, 35, 22, 35, 35, 35,
+ /* 2360 */ 35, 425, 350, 427, 75, 340, 430, 431, 432, 433,
+ /* 2370 */ 434, 435, 35, 437, 378, 350, 35, 35, 35, 22,
+ /* 2380 */ 35, 0, 35, 39, 49, 0, 390, 35, 392, 49,
+ /* 2390 */ 378, 0, 39, 35, 39, 49, 0, 35, 49, 39,
+ /* 2400 */ 0, 35, 390, 378, 392, 35, 0, 20, 22, 21,
+ /* 2410 */ 485, 22, 22, 21, 485, 390, 485, 392, 485, 485,
+ /* 2420 */ 485, 425, 485, 427, 485, 340, 430, 431, 432, 433,
+ /* 2430 */ 434, 435, 485, 437, 485, 350, 485, 425, 485, 427,
+ /* 2440 */ 485, 340, 430, 431, 432, 433, 434, 435, 485, 437,
+ /* 2450 */ 425, 350, 427, 485, 340, 430, 431, 432, 433, 434,
+ /* 2460 */ 435, 485, 437, 378, 350, 485, 485, 485, 485, 485,
+ /* 2470 */ 485, 485, 485, 485, 485, 390, 485, 392, 485, 378,
+ /* 2480 */ 485, 485, 485, 485, 485, 485, 485, 485, 485, 485,
+ /* 2490 */ 485, 390, 378, 392, 485, 485, 485, 485, 485, 485,
+ /* 2500 */ 485, 485, 485, 485, 390, 485, 392, 485, 485, 485,
+ /* 2510 */ 425, 485, 427, 485, 485, 430, 431, 432, 433, 434,
+ /* 2520 */ 435, 485, 437, 485, 485, 485, 425, 340, 427, 485,
+ /* 2530 */ 485, 430, 431, 432, 433, 434, 435, 350, 437, 425,
+ /* 2540 */ 485, 427, 485, 340, 430, 431, 432, 433, 434, 435,
+ /* 2550 */ 485, 437, 485, 350, 340, 485, 485, 485, 485, 485,
+ /* 2560 */ 485, 485, 485, 485, 350, 378, 485, 485, 485, 485,
+ /* 2570 */ 485, 485, 485, 485, 485, 485, 485, 390, 485, 392,
+ /* 2580 */ 485, 378, 485, 485, 485, 485, 485, 485, 485, 485,
+ /* 2590 */ 485, 485, 378, 390, 485, 392, 485, 485, 485, 485,
+ /* 2600 */ 485, 485, 485, 485, 390, 485, 392, 485, 485, 485,
+ /* 2610 */ 485, 485, 425, 485, 427, 485, 340, 430, 431, 432,
+ /* 2620 */ 433, 434, 435, 485, 437, 485, 350, 485, 425, 485,
+ /* 2630 */ 427, 485, 340, 430, 431, 432, 433, 434, 435, 425,
+ /* 2640 */ 437, 427, 350, 485, 430, 431, 432, 433, 434, 435,
+ /* 2650 */ 485, 437, 485, 485, 378, 485, 485, 485, 485, 485,
+ /* 2660 */ 485, 485, 485, 485, 485, 485, 390, 485, 392, 485,
+ /* 2670 */ 378, 485, 485, 485, 485, 485, 485, 485, 485, 485,
+ /* 2680 */ 485, 485, 390, 485, 392, 485, 485, 485, 485, 485,
+ /* 2690 */ 485, 485, 485, 485, 485, 485, 485, 485, 485, 485,
+ /* 2700 */ 485, 425, 485, 427, 485, 485, 430, 431, 432, 433,
+ /* 2710 */ 434, 435, 485, 437, 485, 485, 485, 425, 485, 427,
+ /* 2720 */ 485, 485, 430, 431, 432, 433, 434, 435, 485, 437,
/* 2730 */ 485, 485, 485, 485, 485, 485, 485, 485, 485, 485,
/* 2740 */ 485, 485, 485, 485, 485, 485, 485, 485, 485, 485,
- /* 2750 */ 485, 485, 485, 485, 485, 485, 485, 485, 485, 485,
- /* 2760 */ 485, 485, 485, 337, 337, 337, 337, 337, 337, 337,
+ /* 2750 */ 485, 337, 337, 337, 337, 337, 337, 337, 337, 337,
+ /* 2760 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
/* 2770 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
/* 2780 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
/* 2790 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
@@ -799,211 +1138,213 @@ static const YYCODETYPE yy_lookahead[] = {
/* 3020 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
/* 3030 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
/* 3040 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
- /* 3050 */ 337, 337, 337,
+ /* 3050 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337,
+ /* 3060 */ 337, 337, 337, 337, 337, 337, 337,
};
-#define YY_SHIFT_COUNT (791)
+#define YY_SHIFT_COUNT (793)
#define YY_SHIFT_MIN (0)
-#define YY_SHIFT_MAX (2417)
+#define YY_SHIFT_MAX (2406)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 1097, 0, 104, 0, 336, 336, 336, 336, 336, 336,
/* 10 */ 336, 336, 336, 336, 336, 336, 440, 671, 671, 775,
/* 20 */ 671, 671, 671, 671, 671, 671, 671, 671, 671, 671,
/* 30 */ 671, 671, 671, 671, 671, 671, 671, 671, 671, 671,
/* 40 */ 671, 671, 671, 671, 671, 671, 671, 671, 671, 671,
- /* 50 */ 671, 173, 483, 524, 446, 426, 476, 523, 476, 446,
- /* 60 */ 446, 1111, 476, 1111, 1111, 275, 476, 141, 644, 223,
- /* 70 */ 223, 644, 496, 496, 413, 33, 293, 293, 223, 223,
- /* 80 */ 223, 223, 223, 223, 223, 410, 223, 223, 205, 141,
- /* 90 */ 223, 223, 458, 223, 141, 223, 410, 223, 410, 141,
- /* 100 */ 223, 223, 141, 223, 141, 141, 141, 223, 537, 917,
- /* 110 */ 15, 15, 565, 170, 953, 953, 953, 953, 953, 953,
- /* 120 */ 953, 953, 953, 953, 953, 953, 953, 953, 953, 953,
- /* 130 */ 953, 953, 953, 1095, 14, 413, 33, 994, 994, 113,
- /* 140 */ 116, 116, 116, 180, 266, 266, 113, 505, 505, 505,
- /* 150 */ 205, 510, 513, 141, 697, 141, 697, 697, 713, 711,
- /* 160 */ 297, 297, 297, 297, 297, 297, 297, 297, 1866, 2242,
- /* 170 */ 185, 31, 508, 282, 271, 281, 341, 341, 417, 720,
- /* 180 */ 330, 517, 1230, 826, 913, 970, 1008, 243, 352, 1008,
- /* 190 */ 1122, 1146, 1000, 1258, 1474, 1508, 1326, 205, 1508, 205,
- /* 200 */ 1350, 1505, 1529, 1505, 1383, 1536, 1536, 1505, 1383, 1383,
- /* 210 */ 1473, 1477, 1536, 1481, 1536, 1536, 1536, 1566, 1540, 1566,
- /* 220 */ 1540, 1508, 205, 1574, 205, 1578, 1580, 205, 1578, 205,
- /* 230 */ 205, 205, 1536, 205, 1566, 141, 141, 141, 141, 141,
- /* 240 */ 141, 141, 141, 141, 141, 141, 1536, 1566, 697, 697,
- /* 250 */ 697, 1416, 1526, 1508, 537, 1435, 1438, 1574, 537, 1471,
- /* 260 */ 1536, 1529, 1529, 697, 1414, 1409, 697, 1414, 1409, 697,
- /* 270 */ 697, 141, 1411, 1518, 1414, 1426, 1428, 1446, 1258, 1418,
- /* 280 */ 1430, 1434, 1452, 505, 1698, 1536, 1578, 537, 537, 1720,
- /* 290 */ 1409, 697, 697, 697, 697, 697, 1409, 697, 1581, 537,
- /* 300 */ 713, 537, 505, 1676, 1679, 697, 711, 1536, 537, 1750,
- /* 310 */ 1566, 2716, 2716, 2716, 2716, 2716, 2716, 2716, 2716, 2716,
- /* 320 */ 1018, 425, 224, 717, 306, 378, 1139, 718, 455, 871,
- /* 330 */ 1182, 824, 971, 971, 971, 971, 971, 971, 971, 971,
- /* 340 */ 971, 357, 1220, 118, 118, 451, 552, 556, 657, 76,
- /* 350 */ 772, 954, 731, 664, 494, 494, 924, 1191, 636, 924,
- /* 360 */ 924, 924, 645, 156, 821, 836, 1198, 1091, 362, 1153,
- /* 370 */ 1181, 1192, 1197, 1223, 1277, 1309, 1335, 1340, 1115, 1297,
- /* 380 */ 1314, 1120, 1324, 1325, 1327, 1165, 1130, 1037, 1244, 1328,
- /* 390 */ 1330, 1331, 1356, 1363, 1364, 1408, 1370, 1142, 1382, 1355,
- /* 400 */ 1389, 1398, 1410, 1412, 1420, 1425, 1286, 617, 1385, 1417,
- /* 410 */ 1476, 1437, 1421, 1798, 1804, 1806, 1765, 1808, 1774, 1596,
- /* 420 */ 1777, 1778, 1780, 1602, 1818, 1785, 1786, 1607, 1823, 1610,
- /* 430 */ 1826, 1792, 1828, 1807, 1830, 1797, 1625, 1834, 1638, 1837,
- /* 440 */ 1641, 1642, 1648, 1652, 1844, 1845, 1846, 1661, 1664, 1853,
- /* 450 */ 1860, 1815, 1864, 1869, 1870, 1824, 1877, 1879, 1880, 1881,
- /* 460 */ 1882, 1883, 1886, 1888, 1730, 1861, 1900, 1742, 1902, 1903,
- /* 470 */ 1904, 1905, 1906, 1907, 1909, 1910, 1911, 1912, 1913, 1914,
- /* 480 */ 1927, 1929, 1930, 1932, 1874, 1917, 1918, 1919, 1920, 1921,
- /* 490 */ 1922, 1915, 1933, 1934, 1935, 1795, 1939, 1940, 1923, 1894,
- /* 500 */ 1924, 1895, 1944, 1885, 1925, 1949, 1889, 1952, 1891, 1954,
- /* 510 */ 1955, 1926, 1908, 1928, 1956, 1931, 1938, 1936, 1958, 1941,
- /* 520 */ 1945, 1947, 1959, 1942, 1962, 1957, 1967, 1953, 1951, 1960,
- /* 530 */ 1965, 1961, 1963, 1969, 1964, 1970, 1972, 1973, 1974, 1784,
- /* 540 */ 1978, 1980, 1984, 1943, 1996, 2001, 1976, 1968, 1966, 2019,
- /* 550 */ 1985, 1981, 1988, 2029, 1997, 1982, 1995, 2035, 2002, 1987,
- /* 560 */ 2003, 2040, 2041, 2045, 2046, 2047, 2049, 1948, 1971, 2018,
- /* 570 */ 2043, 2063, 2031, 2032, 2033, 2034, 2038, 2039, 2042, 2026,
- /* 580 */ 2036, 2044, 2051, 2054, 2061, 2075, 2056, 2082, 2066, 2048,
- /* 590 */ 2089, 2076, 2067, 2103, 2069, 2105, 2071, 2107, 2079, 2088,
- /* 600 */ 2074, 2078, 2080, 2006, 2008, 2116, 1946, 2016, 1950, 2086,
- /* 610 */ 2109, 2129, 1975, 2111, 1986, 1989, 2134, 2135, 1990, 1991,
- /* 620 */ 2133, 2093, 1875, 2037, 2057, 2062, 2091, 2065, 2094, 2068,
- /* 630 */ 2060, 2099, 2100, 2072, 2070, 2077, 2081, 2073, 2104, 2098,
- /* 640 */ 2122, 2083, 2106, 1977, 2090, 2092, 2168, 2131, 1992, 2143,
- /* 650 */ 2146, 2147, 2148, 2150, 2153, 2096, 2097, 2140, 1993, 2151,
- /* 660 */ 2145, 2190, 2197, 2198, 2202, 2102, 2164, 1951, 2157, 2108,
- /* 670 */ 2117, 2118, 2120, 2121, 2055, 2123, 2207, 2171, 2064, 2126,
- /* 680 */ 2130, 1951, 2201, 2176, 2144, 2000, 2156, 2245, 2227, 2030,
- /* 690 */ 2158, 2149, 2159, 2155, 2160, 2161, 2204, 2165, 2166, 2217,
- /* 700 */ 2163, 2232, 2050, 2167, 2174, 2181, 2236, 2237, 2172, 2185,
- /* 710 */ 2243, 2187, 2189, 2256, 2193, 2203, 2262, 2206, 2212, 2269,
- /* 720 */ 2208, 2213, 2275, 2215, 2199, 2209, 2210, 2214, 2219, 2279,
- /* 730 */ 2223, 2293, 2234, 2279, 2279, 2316, 2272, 2274, 2309, 2317,
- /* 740 */ 2319, 2321, 2322, 2323, 2324, 2325, 2287, 2268, 2331, 2341,
- /* 750 */ 2342, 2343, 2344, 2345, 2346, 2347, 2304, 2026, 2349, 2036,
- /* 760 */ 2350, 2351, 2352, 2353, 2367, 2355, 2391, 2357, 2356, 2359,
- /* 770 */ 2394, 2361, 2358, 2360, 2400, 2369, 2362, 2363, 2406, 2373,
- /* 780 */ 2365, 2370, 2410, 2377, 2381, 2417, 2396, 2398, 2399, 2401,
- /* 790 */ 2404, 2402,
+ /* 50 */ 671, 335, 519, 1053, 263, 215, 156, 496, 156, 263,
+ /* 60 */ 263, 1333, 156, 1333, 1333, 621, 156, 34, 742, 111,
+ /* 70 */ 111, 742, 278, 278, 294, 138, 308, 308, 111, 111,
+ /* 80 */ 111, 111, 111, 111, 111, 199, 111, 111, 297, 34,
+ /* 90 */ 111, 111, 223, 111, 34, 111, 199, 111, 199, 34,
+ /* 100 */ 111, 111, 34, 111, 34, 34, 34, 111, 317, 917,
+ /* 110 */ 15, 15, 378, 170, 700, 700, 700, 700, 700, 700,
+ /* 120 */ 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
+ /* 130 */ 700, 700, 700, 326, 410, 294, 138, 633, 633, 721,
+ /* 140 */ 426, 426, 426, 618, 107, 107, 721, 299, 299, 299,
+ /* 150 */ 297, 470, 227, 34, 702, 34, 702, 702, 907, 985,
+ /* 160 */ 259, 259, 259, 259, 259, 259, 259, 259, 1962, 1116,
+ /* 170 */ 185, 31, 276, 249, 394, 176, 13, 13, 1073, 1107,
+ /* 180 */ 489, 1117, 932, 840, 1064, 1163, 996, 355, 806, 996,
+ /* 190 */ 814, 429, 256, 1219, 1434, 1468, 1287, 297, 1468, 297,
+ /* 200 */ 1320, 1467, 1498, 1467, 1352, 1510, 1510, 1467, 1352, 1352,
+ /* 210 */ 1444, 1449, 1510, 1452, 1510, 1510, 1510, 1541, 1516, 1541,
+ /* 220 */ 1516, 1468, 297, 1559, 297, 1562, 1563, 297, 1562, 297,
+ /* 230 */ 297, 297, 1510, 297, 1541, 34, 34, 34, 34, 34,
+ /* 240 */ 34, 34, 34, 34, 34, 34, 1510, 1541, 702, 702,
+ /* 250 */ 702, 1391, 1507, 1468, 317, 1423, 1425, 1559, 317, 1439,
+ /* 260 */ 1219, 1510, 1498, 1498, 702, 1368, 1373, 702, 1368, 1373,
+ /* 270 */ 702, 702, 34, 1362, 1465, 1368, 1375, 1403, 1427, 1219,
+ /* 280 */ 1369, 1409, 1413, 1438, 299, 1679, 1219, 1510, 1562, 317,
+ /* 290 */ 317, 1688, 1373, 702, 702, 702, 702, 702, 1373, 702,
+ /* 300 */ 1535, 317, 907, 317, 299, 1631, 1639, 702, 985, 1510,
+ /* 310 */ 317, 1712, 1541, 2730, 2730, 2730, 2730, 2730, 2730, 2730,
+ /* 320 */ 2730, 2730, 1018, 679, 224, 1543, 736, 745, 858, 418,
+ /* 330 */ 974, 1041, 1110, 1166, 1377, 1377, 1377, 1377, 1377, 1377,
+ /* 340 */ 1377, 1377, 1377, 500, 729, 51, 51, 441, 484, 446,
+ /* 350 */ 660, 76, 121, 827, 593, 291, 582, 582, 787, 536,
+ /* 360 */ 984, 787, 787, 787, 816, 992, 1125, 934, 997, 762,
+ /* 370 */ 1190, 1183, 1224, 1241, 1242, 514, 566, 1227, 1288, 1340,
+ /* 380 */ 1062, 1250, 1319, 1302, 1321, 1323, 1325, 1124, 1140, 1154,
+ /* 390 */ 1244, 1328, 1330, 1331, 1338, 1344, 1361, 1356, 1378, 980,
+ /* 400 */ 1380, 549, 1382, 1387, 1392, 1396, 1399, 1400, 829, 1298,
+ /* 410 */ 1306, 1374, 1426, 1201, 1456, 1767, 1768, 1769, 1728, 1771,
+ /* 420 */ 1740, 1561, 1748, 1751, 1753, 1574, 1790, 1756, 1757, 1578,
+ /* 430 */ 1794, 1580, 1797, 1765, 1807, 1788, 1811, 1777, 1603, 1814,
+ /* 440 */ 1617, 1816, 1619, 1620, 1626, 1633, 1821, 1824, 1831, 1647,
+ /* 450 */ 1649, 1835, 1836, 1791, 1839, 1840, 1841, 1801, 1844, 1845,
+ /* 460 */ 1846, 1847, 1848, 1850, 1852, 1853, 1695, 1820, 1856, 1698,
+ /* 470 */ 1858, 1859, 1860, 1861, 1862, 1874, 1875, 1876, 1878, 1879,
+ /* 480 */ 1880, 1881, 1882, 1883, 1887, 1888, 1822, 1865, 1866, 1867,
+ /* 490 */ 1868, 1869, 1870, 1849, 1872, 1897, 1898, 1759, 1899, 1900,
+ /* 500 */ 1884, 1855, 1886, 1857, 1904, 1854, 1877, 1907, 1863, 1914,
+ /* 510 */ 1871, 1917, 1918, 1889, 1873, 1890, 1920, 1891, 1892, 1893,
+ /* 520 */ 1921, 1895, 1894, 1901, 1927, 1896, 1934, 1902, 1903, 1905,
+ /* 530 */ 1919, 1922, 1924, 1926, 1939, 1906, 1925, 1945, 1951, 1965,
+ /* 540 */ 1928, 1729, 1911, 1968, 1971, 1915, 1974, 1983, 1950, 1938,
+ /* 550 */ 1947, 1988, 1954, 1941, 1952, 1992, 1958, 1949, 1966, 2008,
+ /* 560 */ 1975, 1960, 1973, 2013, 2014, 2015, 2017, 2018, 2023, 1913,
+ /* 570 */ 1826, 1993, 2007, 2030, 1997, 1998, 1999, 2001, 2003, 2004,
+ /* 580 */ 2005, 1987, 2000, 2006, 2010, 2020, 2011, 2043, 2026, 2050,
+ /* 590 */ 2029, 2002, 2052, 2033, 2021, 2057, 2024, 2058, 2027, 2060,
+ /* 600 */ 2039, 2049, 2028, 2035, 2036, 1969, 1972, 2072, 1908, 1978,
+ /* 610 */ 1930, 2041, 2056, 2074, 1909, 2061, 1932, 1912, 2093, 2096,
+ /* 620 */ 1944, 1953, 2082, 2053, 1916, 1995, 2019, 2031, 2051, 2037,
+ /* 630 */ 2080, 2032, 2038, 2086, 2095, 2040, 2034, 2045, 2046, 2047,
+ /* 640 */ 2097, 2103, 2105, 2054, 2099, 1931, 2055, 2059, 2126, 2110,
+ /* 650 */ 1940, 2120, 2123, 2127, 2131, 2133, 2134, 2066, 2067, 2125,
+ /* 660 */ 1942, 2117, 2128, 2173, 2174, 2177, 2181, 2088, 2144, 1919,
+ /* 670 */ 2146, 2092, 2111, 2118, 2094, 2098, 2069, 2121, 2226, 2188,
+ /* 680 */ 2073, 2129, 2115, 1919, 2182, 2186, 2147, 1990, 2148, 2243,
+ /* 690 */ 2225, 2042, 2149, 2151, 2150, 2153, 2155, 2157, 2204, 2156,
+ /* 700 */ 2159, 2218, 2162, 2245, 2044, 2166, 2158, 2167, 2235, 2238,
+ /* 710 */ 2171, 2175, 2246, 2179, 2176, 2248, 2184, 2180, 2250, 2189,
+ /* 720 */ 2199, 2255, 2190, 2200, 2270, 2205, 2196, 2198, 2202, 2206,
+ /* 730 */ 2208, 2234, 2210, 2271, 2221, 2234, 2234, 2285, 2240, 2257,
+ /* 740 */ 2294, 2295, 2297, 2298, 2299, 2303, 2304, 2313, 2274, 2253,
+ /* 750 */ 2307, 2318, 2319, 2320, 2334, 2322, 2323, 2324, 2289, 1987,
+ /* 760 */ 2325, 2000, 2337, 2341, 2342, 2343, 2357, 2345, 2381, 2347,
+ /* 770 */ 2335, 2344, 2385, 2352, 2340, 2353, 2391, 2358, 2346, 2355,
+ /* 780 */ 2396, 2362, 2349, 2360, 2400, 2366, 2370, 2406, 2386, 2388,
+ /* 790 */ 2389, 2390, 2392, 2387,
};
-#define YY_REDUCE_COUNT (319)
-#define YY_REDUCE_MIN (-454)
-#define YY_REDUCE_MAX (2278)
+#define YY_REDUCE_COUNT (321)
+#define YY_REDUCE_MIN (-438)
+#define YY_REDUCE_MAX (2292)
static const short yy_reduce_ofst[] = {
- /* 0 */ 583, -340, -280, -67, -132, 158, 268, 603, 789, 895,
- /* 10 */ 946, 1013, 1046, 369, 1073, 1109, 11, 399, 1135, 1214,
- /* 20 */ 499, 1240, 1302, 837, 1319, 1338, 1424, 1441, 1460, 1558,
- /* 30 */ 1591, 1624, 1660, 1693, 1722, 1782, 1801, 1849, 1868, 1916,
- /* 40 */ 1937, 2005, 2023, 2053, 2084, 2101, 2152, 2173, 2200, 2261,
- /* 50 */ 2278, 301, 1227, -402, -167, -360, 252, 709, 803, 465,
- /* 60 */ 674, -348, 886, 259, 819, -454, -374, -322, -8, -227,
- /* 70 */ -72, -249, -289, 61, -362, 332, -284, -238, -204, -41,
- /* 80 */ 130, 169, 265, 272, 338, -214, 379, 394, 97, -5,
- /* 90 */ 495, 622, 29, 672, 450, 767, -182, 809, -144, 119,
- /* 100 */ 944, 1035, 481, 1043, 344, 563, 392, 1048, 78, -308,
- /* 110 */ -442, -442, -358, -333, -321, -215, 204, 307, 498, 574,
- /* 120 */ 584, 587, 588, 609, 642, 654, 703, 747, 779, 781,
- /* 130 */ 782, 817, 840, -301, -70, -4, 346, 701, 705, 662,
- /* 140 */ -70, 296, 335, 84, 197, 419, 722, 136, 164, 806,
- /* 150 */ 850, -293, 774, -312, 854, 576, 861, 862, 879, 889,
- /* 160 */ -364, 497, 502, 516, 650, 746, 761, 650, 528, 851,
- /* 170 */ 948, 900, 884, 910, 1034, 949, 1075, 1087, 1061, 1061,
- /* 180 */ 1113, 1082, 1136, 1141, 1103, 1096, 1040, 1040, 1033, 1040,
- /* 190 */ 1065, 1058, 1061, 1094, 1101, 1112, 1114, 1174, 1116, 1177,
- /* 200 */ 1134, 1151, 1150, 1154, 1160, 1211, 1212, 1166, 1176, 1178,
- /* 210 */ 1213, 1217, 1232, 1222, 1234, 1235, 1236, 1245, 1243, 1249,
- /* 220 */ 1247, 1179, 1237, 1204, 1241, 1250, 1193, 1251, 1256, 1252,
- /* 230 */ 1253, 1255, 1259, 1257, 1260, 1246, 1248, 1261, 1262, 1265,
- /* 240 */ 1272, 1275, 1276, 1278, 1279, 1282, 1270, 1280, 1224, 1231,
- /* 250 */ 1238, 1205, 1215, 1216, 1281, 1219, 1239, 1269, 1306, 1264,
- /* 260 */ 1317, 1268, 1284, 1291, 1225, 1288, 1299, 1226, 1290, 1308,
- /* 270 */ 1310, 1061, 1228, 1271, 1254, 1263, 1285, 1283, 1287, 1233,
- /* 280 */ 1242, 1267, 1040, 1365, 1293, 1374, 1373, 1369, 1375, 1339,
- /* 290 */ 1336, 1357, 1367, 1368, 1371, 1376, 1354, 1377, 1358, 1407,
- /* 300 */ 1402, 1422, 1427, 1333, 1401, 1394, 1419, 1436, 1432, 1447,
- /* 310 */ 1450, 1381, 1378, 1388, 1390, 1423, 1431, 1433, 1442, 1451,
+ /* 0 */ 311, -340, -280, -25, -132, 158, 603, 789, 895, 969,
+ /* 10 */ 265, 1020, 1080, 390, 1109, 1225, 53, 454, 825, 1251,
+ /* 20 */ 1285, 1347, 1371, 946, 1395, 1459, 1523, 1545, 1569, 1657,
+ /* 30 */ 1676, 1687, 1755, 1775, 1786, 1806, 1864, 1885, 1910, 1936,
+ /* 40 */ 1996, 2012, 2025, 2085, 2101, 2114, 2187, 2203, 2214, 2276,
+ /* 50 */ 2292, 167, 792, -403, 78, -401, -360, 252, 672, 47,
+ /* 60 */ 197, 1048, -438, -244, 339, -331, 505, -211, -274, -63,
+ /* 70 */ 23, -391, -40, 149, -317, -31, -342, -265, 295, 414,
+ /* 80 */ 449, 457, 464, 486, 571, -344, 589, 610, -252, -205,
+ /* 90 */ 622, 625, -243, 673, 219, 675, -92, 677, 19, -16,
+ /* 100 */ 423, 795, 325, 805, 563, 755, 772, 822, -268, -207,
+ /* 110 */ -173, -173, 327, -337, -321, -229, -93, 61, 375, 403,
+ /* 120 */ 439, 630, 746, 790, 819, 828, 838, 842, 856, 871,
+ /* 130 */ 873, 885, 901, -288, -34, -213, 90, 476, 575, 695,
+ /* 140 */ -34, 50, 688, 247, -409, 402, 699, 351, 373, 455,
+ /* 150 */ 511, 234, 474, 356, 567, 570, 609, 642, 802, 824,
+ /* 160 */ -364, 753, 778, 833, 890, 899, 904, 890, 880, 956,
+ /* 170 */ 972, 942, 867, 881, 1031, 931, 1049, 1075, 1068, 1068,
+ /* 180 */ 1113, 1060, 1115, 1121, 1078, 1074, 1015, 1015, 1001, 1015,
+ /* 190 */ 1028, 1019, 1068, 1071, 1063, 1076, 1069, 1136, 1083, 1139,
+ /* 200 */ 1104, 1122, 1120, 1129, 1132, 1182, 1184, 1135, 1142, 1143,
+ /* 210 */ 1173, 1188, 1202, 1192, 1205, 1210, 1211, 1221, 1220, 1235,
+ /* 220 */ 1232, 1148, 1222, 1189, 1226, 1234, 1175, 1229, 1237, 1231,
+ /* 230 */ 1236, 1238, 1246, 1239, 1248, 1215, 1228, 1230, 1233, 1240,
+ /* 240 */ 1243, 1245, 1249, 1252, 1253, 1254, 1255, 1256, 1212, 1217,
+ /* 250 */ 1223, 1186, 1191, 1195, 1260, 1204, 1207, 1247, 1270, 1218,
+ /* 260 */ 1257, 1279, 1261, 1264, 1259, 1172, 1263, 1275, 1177, 1265,
+ /* 270 */ 1276, 1281, 1068, 1176, 1180, 1214, 1187, 1209, 1262, 1280,
+ /* 280 */ 1208, 1216, 1266, 1015, 1348, 1272, 1292, 1354, 1353, 1349,
+ /* 290 */ 1350, 1304, 1308, 1324, 1336, 1337, 1339, 1341, 1318, 1342,
+ /* 300 */ 1326, 1384, 1359, 1385, 1386, 1291, 1364, 1357, 1376, 1401,
+ /* 310 */ 1397, 1408, 1410, 1345, 1335, 1351, 1358, 1388, 1390, 1393,
+ /* 320 */ 1402, 1428,
};
static const YYACTIONTYPE yy_default[] = {
- /* 0 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 10 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 20 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 30 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 40 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 50 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 60 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 70 */ 1764, 1764, 1764, 1764, 2045, 1764, 1764, 1764, 1764, 1764,
- /* 80 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1853, 1764,
- /* 90 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 100 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1851, 2038,
- /* 110 */ 2263, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 120 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 130 */ 1764, 1764, 1764, 1764, 2275, 1764, 1764, 1827, 1827, 1764,
- /* 140 */ 2275, 2275, 2275, 1851, 2235, 2235, 1764, 1764, 1764, 1764,
- /* 150 */ 1853, 2105, 1764, 1764, 1764, 1764, 1764, 1764, 1973, 1764,
- /* 160 */ 1764, 1764, 1764, 1764, 1997, 1764, 1764, 1764, 2097, 1764,
- /* 170 */ 1764, 2300, 2356, 1764, 1764, 2303, 1764, 1764, 1764, 1764,
- /* 180 */ 1764, 2050, 1764, 1764, 1926, 2290, 2267, 2281, 2340, 2268,
- /* 190 */ 2265, 2284, 1764, 2294, 1764, 1764, 2119, 1853, 1764, 1853,
- /* 200 */ 2084, 2043, 1764, 2043, 2040, 1764, 1764, 2043, 2040, 2040,
- /* 210 */ 1915, 1911, 1764, 1909, 1764, 1764, 1764, 1764, 1811, 1764,
- /* 220 */ 1811, 1764, 1853, 1764, 1853, 1764, 1764, 1853, 1764, 1853,
- /* 230 */ 1853, 1853, 1764, 1853, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 240 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 250 */ 1764, 2117, 2103, 1764, 1851, 2095, 2093, 1764, 1851, 2091,
- /* 260 */ 1764, 1764, 1764, 1764, 2311, 2309, 1764, 2311, 2309, 1764,
- /* 270 */ 1764, 1764, 2325, 2321, 2311, 2329, 2327, 2296, 2294, 2359,
- /* 280 */ 2346, 2342, 2281, 1764, 1764, 1764, 1764, 1851, 1851, 1764,
- /* 290 */ 2309, 1764, 1764, 1764, 1764, 1764, 2309, 1764, 1764, 1851,
- /* 300 */ 1764, 1851, 1764, 1764, 1942, 1764, 1764, 1764, 1851, 1796,
- /* 310 */ 1764, 2086, 2108, 2068, 2068, 1976, 1976, 1976, 1854, 1769,
- /* 320 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 330 */ 1764, 1764, 2324, 2323, 2190, 1764, 2239, 2238, 2237, 2228,
- /* 340 */ 2189, 1938, 1764, 2188, 2187, 1764, 1764, 1764, 1764, 1764,
- /* 350 */ 1764, 1764, 1764, 1764, 2059, 2058, 2181, 1764, 1764, 2182,
- /* 360 */ 2180, 2179, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 370 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 380 */ 1764, 1764, 1764, 1764, 1764, 1764, 2343, 2347, 1764, 1764,
- /* 390 */ 1764, 1764, 1764, 1764, 1764, 2264, 1764, 1764, 1764, 2163,
- /* 400 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 410 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 420 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 430 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 440 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 450 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 460 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 470 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 480 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 490 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 500 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 510 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 520 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1801, 2168, 1764,
- /* 530 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 540 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 550 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 560 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 570 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1892,
- /* 580 */ 1891, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 590 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 600 */ 1764, 1764, 1764, 2172, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 610 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 620 */ 2339, 2297, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 630 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 640 */ 2163, 1764, 2322, 1764, 1764, 2337, 1764, 2341, 1764, 1764,
- /* 650 */ 1764, 1764, 1764, 1764, 1764, 2274, 2270, 1764, 1764, 2266,
- /* 660 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 2171, 1764, 1764,
- /* 670 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 680 */ 1764, 2162, 1764, 2225, 1764, 1764, 1764, 2259, 1764, 1764,
- /* 690 */ 2210, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 700 */ 2172, 1764, 2175, 1764, 1764, 1764, 1764, 1764, 1970, 1764,
- /* 710 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 720 */ 1764, 1764, 1764, 1764, 1954, 1952, 1951, 1950, 1764, 1983,
- /* 730 */ 1764, 1764, 1764, 1979, 1978, 1764, 1764, 1764, 1764, 1764,
- /* 740 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1872, 1764,
- /* 750 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1864, 1764, 1863,
- /* 760 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 770 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 780 */ 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764, 1764,
- /* 790 */ 1764, 1764,
+ /* 0 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 10 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 20 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 30 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 40 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 50 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 60 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 70 */ 1766, 1766, 1766, 1766, 2047, 1766, 1766, 1766, 1766, 1766,
+ /* 80 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1855, 1766,
+ /* 90 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 100 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1853, 2040,
+ /* 110 */ 2265, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 120 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 130 */ 1766, 1766, 1766, 1766, 2277, 1766, 1766, 1829, 1829, 1766,
+ /* 140 */ 2277, 2277, 2277, 1853, 2237, 2237, 1766, 1766, 1766, 1766,
+ /* 150 */ 1855, 2107, 1766, 1766, 1766, 1766, 1766, 1766, 1975, 1766,
+ /* 160 */ 1766, 1766, 1766, 1766, 1999, 1766, 1766, 1766, 2099, 1766,
+ /* 170 */ 1766, 2302, 2358, 1766, 1766, 2305, 1766, 1766, 1766, 1766,
+ /* 180 */ 1766, 2052, 1766, 1766, 1928, 2292, 2269, 2283, 2342, 2270,
+ /* 190 */ 2267, 2286, 1766, 2296, 1766, 1766, 2121, 1855, 1766, 1855,
+ /* 200 */ 2086, 2045, 1766, 2045, 2042, 1766, 1766, 2045, 2042, 2042,
+ /* 210 */ 1917, 1913, 1766, 1911, 1766, 1766, 1766, 1766, 1813, 1766,
+ /* 220 */ 1813, 1766, 1855, 1766, 1855, 1766, 1766, 1855, 1766, 1855,
+ /* 230 */ 1855, 1855, 1766, 1855, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 240 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 250 */ 1766, 2119, 2105, 1766, 1853, 2097, 2095, 1766, 1853, 2093,
+ /* 260 */ 2296, 1766, 1766, 1766, 1766, 2313, 2311, 1766, 2313, 2311,
+ /* 270 */ 1766, 1766, 1766, 2327, 2323, 2313, 2331, 2329, 2298, 2296,
+ /* 280 */ 2361, 2348, 2344, 2283, 1766, 1766, 2296, 1766, 1766, 1853,
+ /* 290 */ 1853, 1766, 2311, 1766, 1766, 1766, 1766, 1766, 2311, 1766,
+ /* 300 */ 1766, 1853, 1766, 1853, 1766, 1766, 1944, 1766, 1766, 1766,
+ /* 310 */ 1853, 1798, 1766, 2088, 2110, 2070, 2070, 1978, 1978, 1978,
+ /* 320 */ 1856, 1771, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 330 */ 1766, 1766, 1766, 1766, 2326, 2325, 2192, 1766, 2241, 2240,
+ /* 340 */ 2239, 2230, 2191, 1940, 1766, 2190, 2189, 1766, 1766, 1766,
+ /* 350 */ 1766, 1766, 1766, 1766, 1766, 1766, 2061, 2060, 2183, 1766,
+ /* 360 */ 1766, 2184, 2182, 2181, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 370 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 380 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 2345, 2349,
+ /* 390 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 2266, 1766, 1766,
+ /* 400 */ 1766, 2165, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 410 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 420 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 430 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 440 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 450 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 460 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 470 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 480 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 490 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 500 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 510 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 520 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1803,
+ /* 530 */ 2170, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 540 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 550 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 560 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 570 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 580 */ 1766, 1894, 1893, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 590 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 600 */ 1766, 1766, 1766, 1766, 1766, 2174, 1766, 1766, 1766, 1766,
+ /* 610 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 620 */ 1766, 1766, 2341, 2299, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 630 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 640 */ 1766, 1766, 2165, 1766, 2324, 1766, 1766, 2339, 1766, 2343,
+ /* 650 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 2276, 2272, 1766,
+ /* 660 */ 1766, 2268, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 2173,
+ /* 670 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 680 */ 1766, 1766, 1766, 2164, 1766, 2227, 1766, 1766, 1766, 2261,
+ /* 690 */ 1766, 1766, 2212, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 700 */ 1766, 1766, 2174, 1766, 2177, 1766, 1766, 1766, 1766, 1766,
+ /* 710 */ 1972, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 720 */ 1766, 1766, 1766, 1766, 1766, 1766, 1956, 1954, 1953, 1952,
+ /* 730 */ 1766, 1985, 1766, 1766, 1766, 1981, 1980, 1766, 1766, 1766,
+ /* 740 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 750 */ 1874, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1866,
+ /* 760 */ 1766, 1865, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 770 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 780 */ 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766, 1766,
+ /* 790 */ 1766, 1766, 1766, 1766,
};
/********** End of lemon-generated parsing tables *****************************/
@@ -1413,6 +1754,7 @@ typedef struct yyParser yyParser;
#ifndef NDEBUG
#include
+#include
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */
@@ -1857,23 +2199,23 @@ static const char *const yyTokenName[] = {
/* 407 */ "func",
/* 408 */ "sma_func_name",
/* 409 */ "query_or_subquery",
- /* 410 */ "cgroup_name",
- /* 411 */ "analyze_opt",
- /* 412 */ "explain_options",
- /* 413 */ "insert_query",
- /* 414 */ "or_replace_opt",
- /* 415 */ "agg_func_opt",
- /* 416 */ "bufsize_opt",
- /* 417 */ "language_opt",
- /* 418 */ "stream_name",
- /* 419 */ "stream_options",
- /* 420 */ "col_list_opt",
- /* 421 */ "tag_def_or_ref_opt",
- /* 422 */ "subtable_opt",
- /* 423 */ "ignore_opt",
- /* 424 */ "expression",
- /* 425 */ "dnode_list",
- /* 426 */ "where_clause_opt",
+ /* 410 */ "where_clause_opt",
+ /* 411 */ "cgroup_name",
+ /* 412 */ "analyze_opt",
+ /* 413 */ "explain_options",
+ /* 414 */ "insert_query",
+ /* 415 */ "or_replace_opt",
+ /* 416 */ "agg_func_opt",
+ /* 417 */ "bufsize_opt",
+ /* 418 */ "language_opt",
+ /* 419 */ "stream_name",
+ /* 420 */ "stream_options",
+ /* 421 */ "col_list_opt",
+ /* 422 */ "tag_def_or_ref_opt",
+ /* 423 */ "subtable_opt",
+ /* 424 */ "ignore_opt",
+ /* 425 */ "expression",
+ /* 426 */ "dnode_list",
/* 427 */ "literal_func",
/* 428 */ "literal_list",
/* 429 */ "table_alias",
@@ -2247,8 +2589,8 @@ static const char *const yyRuleName[] = {
/* 305 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery",
/* 306 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name",
/* 307 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name",
- /* 308 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name",
- /* 309 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name",
+ /* 308 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt",
+ /* 309 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt",
/* 310 */ "cmd ::= DROP TOPIC exists_opt topic_name",
/* 311 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
/* 312 */ "cmd ::= DESC full_table_name",
@@ -2692,12 +3034,12 @@ static void yy_destructor(
case 406: /* sma_stream_opt */
case 407: /* func */
case 409: /* query_or_subquery */
- case 412: /* explain_options */
- case 413: /* insert_query */
- case 419: /* stream_options */
- case 422: /* subtable_opt */
- case 424: /* expression */
- case 426: /* where_clause_opt */
+ case 410: /* where_clause_opt */
+ case 413: /* explain_options */
+ case 414: /* insert_query */
+ case 420: /* stream_options */
+ case 423: /* subtable_opt */
+ case 425: /* expression */
case 427: /* literal_func */
case 430: /* expr_or_subquery */
case 431: /* pseudo_column */
@@ -2735,16 +3077,20 @@ static void yy_destructor(
case 480: /* query_simple_or_subquery */
case 482: /* sort_specification */
{
+#line 7 "sql.y"
nodesDestroyNode((yypminor->yy242));
+#line 3082 "sql.c"
}
break;
case 338: /* account_options */
case 339: /* alter_account_options */
case 341: /* alter_account_option */
case 360: /* speed_opt */
- case 416: /* bufsize_opt */
+ case 417: /* bufsize_opt */
{
+#line 54 "sql.y"
+#line 3093 "sql.c"
}
break;
case 342: /* user_name */
@@ -2757,45 +3103,55 @@ static void yy_destructor(
case 400: /* column_alias */
case 403: /* index_name */
case 408: /* sma_func_name */
- case 410: /* cgroup_name */
- case 417: /* language_opt */
- case 418: /* stream_name */
+ case 411: /* cgroup_name */
+ case 418: /* language_opt */
+ case 419: /* stream_name */
case 429: /* table_alias */
case 435: /* star_func */
case 437: /* noarg_func */
case 455: /* alias_opt */
{
+#line 735 "sql.y"
+#line 3116 "sql.c"
}
break;
case 343: /* sysinfo_opt */
{
+#line 92 "sql.y"
+#line 3123 "sql.c"
}
break;
case 344: /* privileges */
case 347: /* priv_type_list */
case 348: /* priv_type */
{
+#line 101 "sql.y"
+#line 3132 "sql.c"
}
break;
case 345: /* priv_level */
{
+#line 117 "sql.y"
+#line 3139 "sql.c"
}
break;
case 354: /* force_opt */
case 355: /* unsafe_opt */
case 356: /* not_exists_opt */
case 358: /* exists_opt */
- case 411: /* analyze_opt */
- case 414: /* or_replace_opt */
- case 415: /* agg_func_opt */
- case 423: /* ignore_opt */
+ case 412: /* analyze_opt */
+ case 415: /* or_replace_opt */
+ case 416: /* agg_func_opt */
+ case 424: /* ignore_opt */
case 460: /* set_quantifier_opt */
{
+#line 146 "sql.y"
+#line 3154 "sql.c"
}
break;
case 363: /* integer_list */
@@ -2813,9 +3169,9 @@ static void yy_destructor(
case 388: /* rollup_func_list */
case 398: /* tag_list_opt */
case 404: /* func_list */
- case 420: /* col_list_opt */
- case 421: /* tag_def_or_ref_opt */
- case 425: /* dnode_list */
+ case 421: /* col_list_opt */
+ case 422: /* tag_def_or_ref_opt */
+ case 426: /* dnode_list */
case 428: /* literal_list */
case 436: /* star_func_para_list */
case 438: /* other_para_list */
@@ -2828,44 +3184,60 @@ static void yy_destructor(
case 476: /* order_by_clause_opt */
case 481: /* sort_specification_list */
{
+#line 270 "sql.y"
nodesDestroyList((yypminor->yy174));
+#line 3189 "sql.c"
}
break;
case 367: /* alter_db_option */
case 389: /* alter_table_option */
{
+#line 243 "sql.y"
+#line 3197 "sql.c"
}
break;
case 379: /* type_name */
{
+#line 364 "sql.y"
+#line 3204 "sql.c"
}
break;
case 445: /* compare_op */
case 446: /* in_op */
{
+#line 923 "sql.y"
+#line 3212 "sql.c"
}
break;
case 458: /* join_type */
{
+#line 999 "sql.y"
+#line 3219 "sql.c"
}
break;
case 472: /* fill_mode */
{
+#line 1074 "sql.y"
+#line 3226 "sql.c"
}
break;
case 483: /* ordering_specification_opt */
{
+#line 1157 "sql.y"
+#line 3233 "sql.c"
}
break;
case 484: /* null_ordering_opt */
{
+#line 1163 "sql.y"
+#line 3240 "sql.c"
}
break;
/********* End destructor definitions *****************************************/
@@ -3032,7 +3404,7 @@ static YYACTIONTYPE yy_find_shift_action(
#endif /* YYWILDCARD */
return yy_default[stateno];
}else{
- assert( i>=0 && i=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
return yy_action[i];
}
}while(1);
@@ -3462,8 +3834,8 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
337, /* (305) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
337, /* (306) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
337, /* (307) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
- 337, /* (308) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
- 337, /* (309) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
+ 337, /* (308) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt */
+ 337, /* (309) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt */
337, /* (310) cmd ::= DROP TOPIC exists_opt topic_name */
337, /* (311) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
337, /* (312) cmd ::= DESC full_table_name */
@@ -3471,43 +3843,43 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
337, /* (314) cmd ::= RESET QUERY CACHE */
337, /* (315) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
337, /* (316) cmd ::= EXPLAIN analyze_opt explain_options insert_query */
- 411, /* (317) analyze_opt ::= */
- 411, /* (318) analyze_opt ::= ANALYZE */
- 412, /* (319) explain_options ::= */
- 412, /* (320) explain_options ::= explain_options VERBOSE NK_BOOL */
- 412, /* (321) explain_options ::= explain_options RATIO NK_FLOAT */
+ 412, /* (317) analyze_opt ::= */
+ 412, /* (318) analyze_opt ::= ANALYZE */
+ 413, /* (319) explain_options ::= */
+ 413, /* (320) explain_options ::= explain_options VERBOSE NK_BOOL */
+ 413, /* (321) explain_options ::= explain_options RATIO NK_FLOAT */
337, /* (322) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
337, /* (323) cmd ::= DROP FUNCTION exists_opt function_name */
- 415, /* (324) agg_func_opt ::= */
- 415, /* (325) agg_func_opt ::= AGGREGATE */
- 416, /* (326) bufsize_opt ::= */
- 416, /* (327) bufsize_opt ::= BUFSIZE NK_INTEGER */
- 417, /* (328) language_opt ::= */
- 417, /* (329) language_opt ::= LANGUAGE NK_STRING */
- 414, /* (330) or_replace_opt ::= */
- 414, /* (331) or_replace_opt ::= OR REPLACE */
+ 416, /* (324) agg_func_opt ::= */
+ 416, /* (325) agg_func_opt ::= AGGREGATE */
+ 417, /* (326) bufsize_opt ::= */
+ 417, /* (327) bufsize_opt ::= BUFSIZE NK_INTEGER */
+ 418, /* (328) language_opt ::= */
+ 418, /* (329) language_opt ::= LANGUAGE NK_STRING */
+ 415, /* (330) or_replace_opt ::= */
+ 415, /* (331) or_replace_opt ::= OR REPLACE */
337, /* (332) 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 */
337, /* (333) cmd ::= DROP STREAM exists_opt stream_name */
337, /* (334) cmd ::= PAUSE STREAM exists_opt stream_name */
337, /* (335) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
- 420, /* (336) col_list_opt ::= */
- 420, /* (337) col_list_opt ::= NK_LP col_name_list NK_RP */
- 421, /* (338) tag_def_or_ref_opt ::= */
- 421, /* (339) tag_def_or_ref_opt ::= tags_def */
- 421, /* (340) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
- 419, /* (341) stream_options ::= */
- 419, /* (342) stream_options ::= stream_options TRIGGER AT_ONCE */
- 419, /* (343) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
- 419, /* (344) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
- 419, /* (345) stream_options ::= stream_options WATERMARK duration_literal */
- 419, /* (346) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
- 419, /* (347) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
- 419, /* (348) stream_options ::= stream_options DELETE_MARK duration_literal */
- 419, /* (349) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
- 422, /* (350) subtable_opt ::= */
- 422, /* (351) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
- 423, /* (352) ignore_opt ::= */
- 423, /* (353) ignore_opt ::= IGNORE UNTREATED */
+ 421, /* (336) col_list_opt ::= */
+ 421, /* (337) col_list_opt ::= NK_LP col_name_list NK_RP */
+ 422, /* (338) tag_def_or_ref_opt ::= */
+ 422, /* (339) tag_def_or_ref_opt ::= tags_def */
+ 422, /* (340) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
+ 420, /* (341) stream_options ::= */
+ 420, /* (342) stream_options ::= stream_options TRIGGER AT_ONCE */
+ 420, /* (343) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
+ 420, /* (344) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+ 420, /* (345) stream_options ::= stream_options WATERMARK duration_literal */
+ 420, /* (346) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+ 420, /* (347) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
+ 420, /* (348) stream_options ::= stream_options DELETE_MARK duration_literal */
+ 420, /* (349) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
+ 423, /* (350) subtable_opt ::= */
+ 423, /* (351) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
+ 424, /* (352) ignore_opt ::= */
+ 424, /* (353) ignore_opt ::= IGNORE UNTREATED */
337, /* (354) cmd ::= KILL CONNECTION NK_INTEGER */
337, /* (355) cmd ::= KILL QUERY NK_STRING */
337, /* (356) cmd ::= KILL TRANSACTION NK_INTEGER */
@@ -3516,13 +3888,13 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
337, /* (359) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
337, /* (360) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
337, /* (361) cmd ::= SPLIT VGROUP NK_INTEGER */
- 425, /* (362) dnode_list ::= DNODE NK_INTEGER */
- 425, /* (363) dnode_list ::= dnode_list DNODE NK_INTEGER */
+ 426, /* (362) dnode_list ::= DNODE NK_INTEGER */
+ 426, /* (363) dnode_list ::= dnode_list DNODE NK_INTEGER */
337, /* (364) cmd ::= DELETE FROM full_table_name where_clause_opt */
337, /* (365) cmd ::= query_or_subquery */
337, /* (366) cmd ::= insert_query */
- 413, /* (367) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
- 413, /* (368) insert_query ::= INSERT INTO full_table_name query_or_subquery */
+ 414, /* (367) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+ 414, /* (368) insert_query ::= INSERT INTO full_table_name query_or_subquery */
340, /* (369) literal ::= NK_INTEGER */
340, /* (370) literal ::= NK_FLOAT */
340, /* (371) literal ::= NK_STRING */
@@ -3556,26 +3928,26 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
400, /* (399) column_alias ::= NK_ID */
342, /* (400) user_name ::= NK_ID */
351, /* (401) topic_name ::= NK_ID */
- 418, /* (402) stream_name ::= NK_ID */
- 410, /* (403) cgroup_name ::= NK_ID */
+ 419, /* (402) stream_name ::= NK_ID */
+ 411, /* (403) cgroup_name ::= NK_ID */
403, /* (404) index_name ::= NK_ID */
430, /* (405) expr_or_subquery ::= expression */
- 424, /* (406) expression ::= literal */
- 424, /* (407) expression ::= pseudo_column */
- 424, /* (408) expression ::= column_reference */
- 424, /* (409) expression ::= function_expression */
- 424, /* (410) expression ::= case_when_expression */
- 424, /* (411) expression ::= NK_LP expression NK_RP */
- 424, /* (412) expression ::= NK_PLUS expr_or_subquery */
- 424, /* (413) expression ::= NK_MINUS expr_or_subquery */
- 424, /* (414) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
- 424, /* (415) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
- 424, /* (416) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
- 424, /* (417) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
- 424, /* (418) expression ::= expr_or_subquery NK_REM expr_or_subquery */
- 424, /* (419) expression ::= column_reference NK_ARROW NK_STRING */
- 424, /* (420) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
- 424, /* (421) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
+ 425, /* (406) expression ::= literal */
+ 425, /* (407) expression ::= pseudo_column */
+ 425, /* (408) expression ::= column_reference */
+ 425, /* (409) expression ::= function_expression */
+ 425, /* (410) expression ::= case_when_expression */
+ 425, /* (411) expression ::= NK_LP expression NK_RP */
+ 425, /* (412) expression ::= NK_PLUS expr_or_subquery */
+ 425, /* (413) expression ::= NK_MINUS expr_or_subquery */
+ 425, /* (414) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
+ 425, /* (415) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
+ 425, /* (416) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
+ 425, /* (417) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
+ 425, /* (418) expression ::= expr_or_subquery NK_REM expr_or_subquery */
+ 425, /* (419) expression ::= column_reference NK_ARROW NK_STRING */
+ 425, /* (420) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
+ 425, /* (421) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
383, /* (422) expression_list ::= expr_or_subquery */
383, /* (423) expression_list ::= expression_list NK_COMMA expr_or_subquery */
432, /* (424) column_reference ::= column_name */
@@ -3681,8 +4053,8 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
469, /* (524) select_item ::= common_expression column_alias */
469, /* (525) select_item ::= common_expression AS column_alias */
469, /* (526) select_item ::= table_name NK_DOT NK_STAR */
- 426, /* (527) where_clause_opt ::= */
- 426, /* (528) where_clause_opt ::= WHERE search_condition */
+ 410, /* (527) where_clause_opt ::= */
+ 410, /* (528) where_clause_opt ::= WHERE search_condition */
462, /* (529) partition_by_clause_opt ::= */
462, /* (530) partition_by_clause_opt ::= PARTITION BY partition_list */
470, /* (531) partition_list ::= partition_item */
@@ -4062,8 +4434,8 @@ static const signed char yyRuleInfoNRhs[] = {
-6, /* (305) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
-7, /* (306) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
-9, /* (307) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
- -7, /* (308) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
- -9, /* (309) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
+ -8, /* (308) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt */
+ -10, /* (309) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt */
-4, /* (310) cmd ::= DROP TOPIC exists_opt topic_name */
-7, /* (311) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
-2, /* (312) cmd ::= DESC full_table_name */
@@ -4378,54 +4750,6 @@ static YYACTIONTYPE yy_reduce(
(void)yyLookahead;
(void)yyLookaheadToken;
yymsp = yypParser->yytos;
-#ifndef NDEBUG
- if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
- yysize = yyRuleInfoNRhs[yyruleno];
- if( yysize ){
- fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
- yyTracePrompt,
- yyruleno, yyRuleName[yyruleno],
- yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){
- yypParser->yyhwm++;
- assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
- }
-#endif
-#if YYSTACKDEPTH>0
- if( yypParser->yytos>=yypParser->yystackEnd ){
- yyStackOverflow(yypParser);
- /* The call to yyStackOverflow() above pops the stack until it is
- ** empty, causing the main parser loop to exit. So the return value
- ** is never used and does not matter. */
- return 0;
- }
-#else
- if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
- if( yyGrowStack(yypParser) ){
- yyStackOverflow(yypParser);
- /* The call to yyStackOverflow() above pops the stack until it is
- ** empty, causing the main parser loop to exit. So the return value
- ** is never used and does not matter. */
- return 0;
- }
- yymsp = yypParser->yytos;
- }
-#endif
- }
switch( yyruleno ){
/* Beginning here are the reduction cases. A typical example
@@ -4439,15 +4763,21 @@ static YYACTIONTYPE yy_reduce(
/********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor;
case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
+#line 50 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
+#line 4768 "sql.c"
yy_destructor(yypParser,338,&yymsp[0].minor);
break;
case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
+#line 51 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
+#line 4774 "sql.c"
yy_destructor(yypParser,339,&yymsp[0].minor);
break;
case 2: /* account_options ::= */
+#line 55 "sql.y"
{ }
+#line 4780 "sql.c"
break;
case 3: /* account_options ::= account_options PPS literal */
case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4);
@@ -4459,18 +4789,24 @@ static YYACTIONTYPE yy_reduce(
case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10);
case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11);
{ yy_destructor(yypParser,338,&yymsp[-2].minor);
+#line 56 "sql.y"
{ }
+#line 4794 "sql.c"
yy_destructor(yypParser,340,&yymsp[0].minor);
}
break;
case 12: /* alter_account_options ::= alter_account_option */
{ yy_destructor(yypParser,341,&yymsp[0].minor);
+#line 68 "sql.y"
{ }
+#line 4802 "sql.c"
}
break;
case 13: /* alter_account_options ::= alter_account_options alter_account_option */
{ yy_destructor(yypParser,339,&yymsp[-1].minor);
+#line 69 "sql.y"
{ }
+#line 4809 "sql.c"
yy_destructor(yypParser,341,&yymsp[0].minor);
}
break;
@@ -4484,71 +4820,111 @@ static YYACTIONTYPE yy_reduce(
case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21);
case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22);
case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23);
+#line 73 "sql.y"
{ }
+#line 4825 "sql.c"
yy_destructor(yypParser,340,&yymsp[0].minor);
break;
case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
+#line 85 "sql.y"
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy669, &yymsp[-1].minor.yy0, yymsp[0].minor.yy73); }
+#line 4831 "sql.c"
break;
case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
+#line 86 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy669, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
+#line 4836 "sql.c"
break;
case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
+#line 87 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy669, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
+#line 4841 "sql.c"
break;
case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
+#line 88 "sql.y"
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy669, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
+#line 4846 "sql.c"
break;
case 28: /* cmd ::= DROP USER user_name */
+#line 89 "sql.y"
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy669); }
+#line 4851 "sql.c"
break;
case 29: /* sysinfo_opt ::= */
+#line 93 "sql.y"
{ yymsp[1].minor.yy73 = 1; }
+#line 4856 "sql.c"
break;
case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
+#line 94 "sql.y"
{ yymsp[-1].minor.yy73 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
+#line 4861 "sql.c"
break;
case 31: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
+#line 97 "sql.y"
{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy349, &yymsp[-3].minor.yy257, &yymsp[0].minor.yy669, yymsp[-2].minor.yy242); }
+#line 4866 "sql.c"
break;
case 32: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
+#line 98 "sql.y"
{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy349, &yymsp[-3].minor.yy257, &yymsp[0].minor.yy669, yymsp[-2].minor.yy242); }
+#line 4871 "sql.c"
break;
case 33: /* privileges ::= ALL */
+#line 102 "sql.y"
{ yymsp[0].minor.yy349 = PRIVILEGE_TYPE_ALL; }
+#line 4876 "sql.c"
break;
case 34: /* privileges ::= priv_type_list */
case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36);
+#line 103 "sql.y"
{ yylhsminor.yy349 = yymsp[0].minor.yy349; }
+#line 4882 "sql.c"
yymsp[0].minor.yy349 = yylhsminor.yy349;
break;
case 35: /* privileges ::= SUBSCRIBE */
+#line 104 "sql.y"
{ yymsp[0].minor.yy349 = PRIVILEGE_TYPE_SUBSCRIBE; }
+#line 4888 "sql.c"
break;
case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
+#line 109 "sql.y"
{ yylhsminor.yy349 = yymsp[-2].minor.yy349 | yymsp[0].minor.yy349; }
+#line 4893 "sql.c"
yymsp[-2].minor.yy349 = yylhsminor.yy349;
break;
case 38: /* priv_type ::= READ */
+#line 113 "sql.y"
{ yymsp[0].minor.yy349 = PRIVILEGE_TYPE_READ; }
+#line 4899 "sql.c"
break;
case 39: /* priv_type ::= WRITE */
+#line 114 "sql.y"
{ yymsp[0].minor.yy349 = PRIVILEGE_TYPE_WRITE; }
+#line 4904 "sql.c"
break;
case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
+#line 118 "sql.y"
{ yylhsminor.yy257.first = yymsp[-2].minor.yy0; yylhsminor.yy257.second = yymsp[0].minor.yy0; }
+#line 4909 "sql.c"
yymsp[-2].minor.yy257 = yylhsminor.yy257;
break;
case 41: /* priv_level ::= db_name NK_DOT NK_STAR */
+#line 119 "sql.y"
{ yylhsminor.yy257.first = yymsp[-2].minor.yy669; yylhsminor.yy257.second = yymsp[0].minor.yy0; }
+#line 4915 "sql.c"
yymsp[-2].minor.yy257 = yylhsminor.yy257;
break;
case 42: /* priv_level ::= db_name NK_DOT table_name */
+#line 120 "sql.y"
{ yylhsminor.yy257.first = yymsp[-2].minor.yy669; yylhsminor.yy257.second = yymsp[0].minor.yy669; }
+#line 4921 "sql.c"
yymsp[-2].minor.yy257 = yylhsminor.yy257;
break;
case 43: /* priv_level ::= topic_name */
+#line 121 "sql.y"
{ yylhsminor.yy257.first = yymsp[0].minor.yy669; yylhsminor.yy257.second = nil_token; }
+#line 4927 "sql.c"
yymsp[0].minor.yy257 = yylhsminor.yy257;
break;
case 44: /* with_opt ::= */
@@ -4567,46 +4943,72 @@ static YYACTIONTYPE yy_reduce(
case 562: /* every_opt ::= */ yytestcase(yyruleno==562);
case 575: /* slimit_clause_opt ::= */ yytestcase(yyruleno==575);
case 579: /* limit_clause_opt ::= */ yytestcase(yyruleno==579);
+#line 123 "sql.y"
{ yymsp[1].minor.yy242 = NULL; }
+#line 4948 "sql.c"
break;
case 45: /* with_opt ::= WITH search_condition */
case 499: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==499);
case 528: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==528);
case 559: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==559);
+#line 124 "sql.y"
{ yymsp[-1].minor.yy242 = yymsp[0].minor.yy242; }
+#line 4956 "sql.c"
break;
case 46: /* cmd ::= CREATE DNODE dnode_endpoint */
+#line 127 "sql.y"
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy669, NULL); }
+#line 4961 "sql.c"
break;
case 47: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
+#line 128 "sql.y"
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy0); }
+#line 4966 "sql.c"
break;
case 48: /* cmd ::= DROP DNODE NK_INTEGER force_opt */
+#line 129 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy777, false); }
+#line 4971 "sql.c"
break;
case 49: /* cmd ::= DROP DNODE dnode_endpoint force_opt */
+#line 130 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy669, yymsp[0].minor.yy777, false); }
+#line 4976 "sql.c"
break;
case 50: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */
+#line 131 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy777); }
+#line 4981 "sql.c"
break;
case 51: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */
+#line 132 "sql.y"
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy669, false, yymsp[0].minor.yy777); }
+#line 4986 "sql.c"
break;
case 52: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
+#line 133 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
+#line 4991 "sql.c"
break;
case 53: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
+#line 134 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 4996 "sql.c"
break;
case 54: /* cmd ::= ALTER ALL DNODES NK_STRING */
+#line 135 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); }
+#line 5001 "sql.c"
break;
case 55: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
+#line 136 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 5006 "sql.c"
break;
case 56: /* cmd ::= RESTORE DNODE NK_INTEGER */
+#line 137 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5011 "sql.c"
break;
case 57: /* dnode_endpoint ::= NK_STRING */
case 58: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==58);
@@ -4639,7 +5041,9 @@ static YYACTIONTYPE yy_reduce(
case 454: /* star_func ::= FIRST */ yytestcase(yyruleno==454);
case 455: /* star_func ::= LAST */ yytestcase(yyruleno==455);
case 456: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==456);
+#line 141 "sql.y"
{ yylhsminor.yy669 = yymsp[0].minor.yy0; }
+#line 5046 "sql.c"
yymsp[0].minor.yy669 = yylhsminor.yy669;
break;
case 60: /* force_opt ::= */
@@ -4650,282 +5054,428 @@ static YYACTIONTYPE yy_reduce(
case 330: /* or_replace_opt ::= */ yytestcase(yyruleno==330);
case 352: /* ignore_opt ::= */ yytestcase(yyruleno==352);
case 517: /* set_quantifier_opt ::= */ yytestcase(yyruleno==517);
+#line 147 "sql.y"
{ yymsp[1].minor.yy777 = false; }
+#line 5059 "sql.c"
break;
case 61: /* force_opt ::= FORCE */
case 62: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==62);
case 318: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==318);
case 325: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==325);
case 518: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==518);
+#line 148 "sql.y"
{ yymsp[0].minor.yy777 = true; }
+#line 5068 "sql.c"
break;
case 63: /* cmd ::= ALTER LOCAL NK_STRING */
+#line 155 "sql.y"
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
+#line 5073 "sql.c"
break;
case 64: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
+#line 156 "sql.y"
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 5078 "sql.c"
break;
case 65: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
+#line 159 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5083 "sql.c"
break;
case 66: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
+#line 160 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5088 "sql.c"
break;
case 67: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */
+#line 161 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5093 "sql.c"
break;
case 68: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
+#line 164 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5098 "sql.c"
break;
case 69: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
+#line 165 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5103 "sql.c"
break;
case 70: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
+#line 168 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5108 "sql.c"
break;
case 71: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
+#line 169 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5113 "sql.c"
break;
case 72: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
+#line 172 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5118 "sql.c"
break;
case 73: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
+#line 173 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5123 "sql.c"
break;
case 74: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */
+#line 174 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5128 "sql.c"
break;
case 75: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */
+#line 177 "sql.y"
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); }
+#line 5133 "sql.c"
break;
case 76: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
+#line 180 "sql.y"
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy777, &yymsp[-1].minor.yy669, yymsp[0].minor.yy242); }
+#line 5138 "sql.c"
break;
case 77: /* cmd ::= DROP DATABASE exists_opt db_name */
+#line 181 "sql.y"
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy777, &yymsp[0].minor.yy669); }
+#line 5143 "sql.c"
break;
case 78: /* cmd ::= USE db_name */
+#line 182 "sql.y"
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy669); }
+#line 5148 "sql.c"
break;
case 79: /* cmd ::= ALTER DATABASE db_name alter_db_options */
+#line 183 "sql.y"
{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy669, yymsp[0].minor.yy242); }
+#line 5153 "sql.c"
break;
case 80: /* cmd ::= FLUSH DATABASE db_name */
+#line 184 "sql.y"
{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy669); }
+#line 5158 "sql.c"
break;
case 81: /* cmd ::= TRIM DATABASE db_name speed_opt */
+#line 185 "sql.y"
{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy669, yymsp[0].minor.yy120); }
+#line 5163 "sql.c"
break;
case 82: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */
+#line 186 "sql.y"
{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy669, yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 5168 "sql.c"
break;
case 83: /* not_exists_opt ::= IF NOT EXISTS */
+#line 190 "sql.y"
{ yymsp[-2].minor.yy777 = true; }
+#line 5173 "sql.c"
break;
case 85: /* exists_opt ::= IF EXISTS */
case 331: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==331);
case 353: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==353);
+#line 195 "sql.y"
{ yymsp[-1].minor.yy777 = true; }
+#line 5180 "sql.c"
break;
case 87: /* db_options ::= */
+#line 198 "sql.y"
{ yymsp[1].minor.yy242 = createDefaultDatabaseOptions(pCxt); }
+#line 5185 "sql.c"
break;
case 88: /* db_options ::= db_options BUFFER NK_INTEGER */
+#line 199 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
+#line 5190 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 89: /* db_options ::= db_options CACHEMODEL NK_STRING */
+#line 200 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
+#line 5196 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 90: /* db_options ::= db_options CACHESIZE NK_INTEGER */
+#line 201 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
+#line 5202 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 91: /* db_options ::= db_options COMP NK_INTEGER */
+#line 202 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
+#line 5208 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 92: /* db_options ::= db_options DURATION NK_INTEGER */
case 93: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==93);
+#line 203 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
+#line 5215 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 94: /* db_options ::= db_options MAXROWS NK_INTEGER */
+#line 205 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
+#line 5221 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 95: /* db_options ::= db_options MINROWS NK_INTEGER */
+#line 206 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
+#line 5227 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 96: /* db_options ::= db_options KEEP integer_list */
case 97: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==97);
+#line 207 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_KEEP, yymsp[0].minor.yy174); }
+#line 5234 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 98: /* db_options ::= db_options PAGES NK_INTEGER */
+#line 209 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
+#line 5240 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 99: /* db_options ::= db_options PAGESIZE NK_INTEGER */
+#line 210 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
+#line 5246 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 100: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
+#line 211 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
+#line 5252 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 101: /* db_options ::= db_options PRECISION NK_STRING */
+#line 212 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
+#line 5258 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 102: /* db_options ::= db_options REPLICA NK_INTEGER */
+#line 213 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
+#line 5264 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 103: /* db_options ::= db_options VGROUPS NK_INTEGER */
+#line 215 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
+#line 5270 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 104: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
+#line 216 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
+#line 5276 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 105: /* db_options ::= db_options RETENTIONS retention_list */
+#line 217 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_RETENTIONS, yymsp[0].minor.yy174); }
+#line 5282 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 106: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
+#line 218 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
+#line 5288 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 107: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
+#line 219 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
+#line 5294 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 108: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
+#line 220 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
+#line 5300 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 109: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
+#line 221 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
+#line 5306 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 110: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
+#line 222 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-3].minor.yy242, DB_OPTION_WAL_RETENTION_PERIOD, &t);
}
+#line 5316 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 111: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
+#line 227 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
+#line 5322 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 112: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
+#line 228 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-3].minor.yy242, DB_OPTION_WAL_RETENTION_SIZE, &t);
}
+#line 5332 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 113: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
+#line 233 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
+#line 5338 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 114: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
+#line 234 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
+#line 5344 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 115: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
+#line 235 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
+#line 5350 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 116: /* db_options ::= db_options TABLE_PREFIX signed */
+#line 236 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy242); }
+#line 5356 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 117: /* db_options ::= db_options TABLE_SUFFIX signed */
+#line 237 "sql.y"
{ yylhsminor.yy242 = setDatabaseOption(pCxt, yymsp[-2].minor.yy242, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy242); }
+#line 5362 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 118: /* alter_db_options ::= alter_db_option */
+#line 239 "sql.y"
{ yylhsminor.yy242 = createAlterDatabaseOptions(pCxt); yylhsminor.yy242 = setAlterDatabaseOption(pCxt, yylhsminor.yy242, &yymsp[0].minor.yy535); }
+#line 5368 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 119: /* alter_db_options ::= alter_db_options alter_db_option */
+#line 240 "sql.y"
{ yylhsminor.yy242 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy242, &yymsp[0].minor.yy535); }
+#line 5374 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 120: /* alter_db_option ::= BUFFER NK_INTEGER */
+#line 244 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5380 "sql.c"
break;
case 121: /* alter_db_option ::= CACHEMODEL NK_STRING */
+#line 245 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5385 "sql.c"
break;
case 122: /* alter_db_option ::= CACHESIZE NK_INTEGER */
+#line 246 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5390 "sql.c"
break;
case 123: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
+#line 247 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5395 "sql.c"
break;
case 124: /* alter_db_option ::= KEEP integer_list */
case 125: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==125);
+#line 248 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_KEEP; yymsp[-1].minor.yy535.pList = yymsp[0].minor.yy174; }
+#line 5401 "sql.c"
break;
case 126: /* alter_db_option ::= PAGES NK_INTEGER */
+#line 250 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_PAGES; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5406 "sql.c"
break;
case 127: /* alter_db_option ::= REPLICA NK_INTEGER */
+#line 251 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5411 "sql.c"
break;
case 128: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
+#line 253 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_WAL; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5416 "sql.c"
break;
case 129: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
+#line 254 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5421 "sql.c"
break;
case 130: /* alter_db_option ::= MINROWS NK_INTEGER */
+#line 255 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5426 "sql.c"
break;
case 131: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
+#line 256 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5431 "sql.c"
break;
case 132: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
+#line 257 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yymsp[-2].minor.yy535.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy535.val = t;
}
+#line 5440 "sql.c"
break;
case 133: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
+#line 262 "sql.y"
{ yymsp[-1].minor.yy535.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5445 "sql.c"
break;
case 134: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
+#line 263 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yymsp[-2].minor.yy535.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy535.val = t;
}
+#line 5454 "sql.c"
break;
case 135: /* integer_list ::= NK_INTEGER */
+#line 271 "sql.y"
{ yylhsminor.yy174 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+#line 5459 "sql.c"
yymsp[0].minor.yy174 = yylhsminor.yy174;
break;
case 136: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
case 363: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==363);
+#line 272 "sql.y"
{ yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+#line 5466 "sql.c"
yymsp[-2].minor.yy174 = yylhsminor.yy174;
break;
case 137: /* variable_list ::= NK_VARIABLE */
+#line 276 "sql.y"
{ yylhsminor.yy174 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 5472 "sql.c"
yymsp[0].minor.yy174 = yylhsminor.yy174;
break;
case 138: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
+#line 277 "sql.y"
{ yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 5478 "sql.c"
yymsp[-2].minor.yy174 = yylhsminor.yy174;
break;
case 139: /* retention_list ::= retention */
@@ -4942,7 +5492,9 @@ static YYACTIONTYPE yy_reduce(
case 520: /* select_list ::= select_item */ yytestcase(yyruleno==520);
case 531: /* partition_list ::= partition_item */ yytestcase(yyruleno==531);
case 586: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==586);
+#line 281 "sql.y"
{ yylhsminor.yy174 = createNodeList(pCxt, yymsp[0].minor.yy242); }
+#line 5497 "sql.c"
yymsp[0].minor.yy174 = yylhsminor.yy174;
break;
case 140: /* retention_list ::= retention_list NK_COMMA retention */
@@ -4957,105 +5509,157 @@ static YYACTIONTYPE yy_reduce(
case 521: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==521);
case 532: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==532);
case 587: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==587);
+#line 282 "sql.y"
{ yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, yymsp[0].minor.yy242); }
+#line 5514 "sql.c"
yymsp[-2].minor.yy174 = yylhsminor.yy174;
break;
case 141: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
+#line 284 "sql.y"
{ yylhsminor.yy242 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 5520 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 142: /* speed_opt ::= */
case 326: /* bufsize_opt ::= */ yytestcase(yyruleno==326);
+#line 288 "sql.y"
{ yymsp[1].minor.yy120 = 0; }
+#line 5527 "sql.c"
break;
case 143: /* speed_opt ::= MAX_SPEED NK_INTEGER */
case 327: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==327);
+#line 289 "sql.y"
{ yymsp[-1].minor.yy120 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
+#line 5533 "sql.c"
break;
case 145: /* start_opt ::= START WITH NK_INTEGER */
case 149: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==149);
+#line 292 "sql.y"
{ yymsp[-2].minor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
+#line 5539 "sql.c"
break;
case 146: /* start_opt ::= START WITH NK_STRING */
case 150: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==150);
+#line 293 "sql.y"
{ yymsp[-2].minor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+#line 5545 "sql.c"
break;
case 147: /* start_opt ::= START WITH TIMESTAMP NK_STRING */
case 151: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==151);
+#line 294 "sql.y"
{ yymsp[-3].minor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+#line 5551 "sql.c"
break;
case 152: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 154: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==154);
+#line 303 "sql.y"
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy777, yymsp[-5].minor.yy242, yymsp[-3].minor.yy174, yymsp[-1].minor.yy174, yymsp[0].minor.yy242); }
+#line 5557 "sql.c"
break;
case 153: /* cmd ::= CREATE TABLE multi_create_clause */
+#line 304 "sql.y"
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy174); }
+#line 5562 "sql.c"
break;
case 155: /* cmd ::= DROP TABLE multi_drop_clause */
+#line 307 "sql.y"
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy174); }
+#line 5567 "sql.c"
break;
case 156: /* cmd ::= DROP STABLE exists_opt full_table_name */
+#line 308 "sql.y"
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy777, yymsp[0].minor.yy242); }
+#line 5572 "sql.c"
break;
case 157: /* cmd ::= ALTER TABLE alter_table_clause */
case 365: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==365);
case 366: /* cmd ::= insert_query */ yytestcase(yyruleno==366);
+#line 310 "sql.y"
{ pCxt->pRootNode = yymsp[0].minor.yy242; }
+#line 5579 "sql.c"
break;
case 158: /* cmd ::= ALTER STABLE alter_table_clause */
+#line 311 "sql.y"
{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy242); }
+#line 5584 "sql.c"
break;
case 159: /* alter_table_clause ::= full_table_name alter_table_options */
+#line 313 "sql.y"
{ yylhsminor.yy242 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 5589 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 160: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
+#line 315 "sql.y"
{ yylhsminor.yy242 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy242, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy669, yymsp[0].minor.yy794); }
+#line 5595 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 161: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
+#line 316 "sql.y"
{ yylhsminor.yy242 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy242, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy669); }
+#line 5601 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 162: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
+#line 318 "sql.y"
{ yylhsminor.yy242 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy242, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy669, yymsp[0].minor.yy794); }
+#line 5607 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 163: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
+#line 320 "sql.y"
{ yylhsminor.yy242 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy242, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy669, &yymsp[0].minor.yy669); }
+#line 5613 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 164: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
+#line 322 "sql.y"
{ yylhsminor.yy242 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy242, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy669, yymsp[0].minor.yy794); }
+#line 5619 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 165: /* alter_table_clause ::= full_table_name DROP TAG column_name */
+#line 323 "sql.y"
{ yylhsminor.yy242 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy242, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy669); }
+#line 5625 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 166: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
+#line 325 "sql.y"
{ yylhsminor.yy242 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy242, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy669, yymsp[0].minor.yy794); }
+#line 5631 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 167: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
+#line 327 "sql.y"
{ yylhsminor.yy242 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy242, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy669, &yymsp[0].minor.yy669); }
+#line 5637 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 168: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
+#line 329 "sql.y"
{ yylhsminor.yy242 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy242, &yymsp[-2].minor.yy669, yymsp[0].minor.yy242); }
+#line 5643 "sql.c"
yymsp[-5].minor.yy242 = yylhsminor.yy242;
break;
case 170: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 466: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==466);
+#line 334 "sql.y"
{ yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-1].minor.yy174, yymsp[0].minor.yy242); }
+#line 5650 "sql.c"
yymsp[-1].minor.yy174 = yylhsminor.yy174;
break;
case 171: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
+#line 338 "sql.y"
{ yylhsminor.yy242 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy777, yymsp[-8].minor.yy242, yymsp[-6].minor.yy242, yymsp[-5].minor.yy174, yymsp[-2].minor.yy174, yymsp[0].minor.yy242); }
+#line 5656 "sql.c"
yymsp[-9].minor.yy242 = yylhsminor.yy242;
break;
case 174: /* drop_table_clause ::= exists_opt full_table_name */
+#line 345 "sql.y"
{ yylhsminor.yy242 = createDropTableClause(pCxt, yymsp[-1].minor.yy777, yymsp[0].minor.yy242); }
+#line 5662 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 175: /* specific_cols_opt ::= */
@@ -5066,523 +5670,827 @@ static YYACTIONTYPE yy_reduce(
case 529: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==529);
case 554: /* group_by_clause_opt ::= */ yytestcase(yyruleno==554);
case 573: /* order_by_clause_opt ::= */ yytestcase(yyruleno==573);
+#line 349 "sql.y"
{ yymsp[1].minor.yy174 = NULL; }
+#line 5675 "sql.c"
break;
case 176: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
case 337: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==337);
+#line 350 "sql.y"
{ yymsp[-2].minor.yy174 = yymsp[-1].minor.yy174; }
+#line 5681 "sql.c"
break;
case 177: /* full_table_name ::= table_name */
+#line 352 "sql.y"
{ yylhsminor.yy242 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy669, NULL); }
+#line 5686 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 178: /* full_table_name ::= db_name NK_DOT table_name */
+#line 353 "sql.y"
{ yylhsminor.yy242 = createRealTableNode(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy669, NULL); }
+#line 5692 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 181: /* column_def ::= column_name type_name */
+#line 360 "sql.y"
{ yylhsminor.yy242 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy669, yymsp[0].minor.yy794, NULL); }
+#line 5698 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 182: /* type_name ::= BOOL */
+#line 365 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_BOOL); }
+#line 5704 "sql.c"
break;
case 183: /* type_name ::= TINYINT */
+#line 366 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_TINYINT); }
+#line 5709 "sql.c"
break;
case 184: /* type_name ::= SMALLINT */
+#line 367 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
+#line 5714 "sql.c"
break;
case 185: /* type_name ::= INT */
case 186: /* type_name ::= INTEGER */ yytestcase(yyruleno==186);
+#line 368 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_INT); }
+#line 5720 "sql.c"
break;
case 187: /* type_name ::= BIGINT */
+#line 370 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_BIGINT); }
+#line 5725 "sql.c"
break;
case 188: /* type_name ::= FLOAT */
+#line 371 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_FLOAT); }
+#line 5730 "sql.c"
break;
case 189: /* type_name ::= DOUBLE */
+#line 372 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
+#line 5735 "sql.c"
break;
case 190: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
+#line 373 "sql.y"
{ yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
+#line 5740 "sql.c"
break;
case 191: /* type_name ::= TIMESTAMP */
+#line 374 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
+#line 5745 "sql.c"
break;
case 192: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
+#line 375 "sql.y"
{ yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
+#line 5750 "sql.c"
break;
case 193: /* type_name ::= TINYINT UNSIGNED */
+#line 376 "sql.y"
{ yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
+#line 5755 "sql.c"
break;
case 194: /* type_name ::= SMALLINT UNSIGNED */
+#line 377 "sql.y"
{ yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
+#line 5760 "sql.c"
break;
case 195: /* type_name ::= INT UNSIGNED */
+#line 378 "sql.y"
{ yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_UINT); }
+#line 5765 "sql.c"
break;
case 196: /* type_name ::= BIGINT UNSIGNED */
+#line 379 "sql.y"
{ yymsp[-1].minor.yy794 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
+#line 5770 "sql.c"
break;
case 197: /* type_name ::= JSON */
+#line 380 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_JSON); }
+#line 5775 "sql.c"
break;
case 198: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
+#line 381 "sql.y"
{ yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
+#line 5780 "sql.c"
break;
case 199: /* type_name ::= MEDIUMBLOB */
+#line 382 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
+#line 5785 "sql.c"
break;
case 200: /* type_name ::= BLOB */
+#line 383 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_BLOB); }
+#line 5790 "sql.c"
break;
case 201: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
+#line 384 "sql.y"
{ yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
+#line 5795 "sql.c"
break;
case 202: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */
+#line 385 "sql.y"
{ yymsp[-3].minor.yy794 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); }
+#line 5800 "sql.c"
break;
case 203: /* type_name ::= DECIMAL */
+#line 386 "sql.y"
{ yymsp[0].minor.yy794 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+#line 5805 "sql.c"
break;
case 204: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
+#line 387 "sql.y"
{ yymsp[-3].minor.yy794 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+#line 5810 "sql.c"
break;
case 205: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
+#line 388 "sql.y"
{ yymsp[-5].minor.yy794 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
+#line 5815 "sql.c"
break;
case 207: /* tags_def_opt ::= tags_def */
case 339: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==339);
case 458: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==458);
+#line 393 "sql.y"
{ yylhsminor.yy174 = yymsp[0].minor.yy174; }
+#line 5822 "sql.c"
yymsp[0].minor.yy174 = yylhsminor.yy174;
break;
case 208: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
case 340: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==340);
+#line 397 "sql.y"
{ yymsp[-3].minor.yy174 = yymsp[-1].minor.yy174; }
+#line 5829 "sql.c"
break;
case 209: /* table_options ::= */
+#line 399 "sql.y"
{ yymsp[1].minor.yy242 = createDefaultTableOptions(pCxt); }
+#line 5834 "sql.c"
break;
case 210: /* table_options ::= table_options COMMENT NK_STRING */
+#line 400 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-2].minor.yy242, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
+#line 5839 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 211: /* table_options ::= table_options MAX_DELAY duration_list */
+#line 401 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-2].minor.yy242, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy174); }
+#line 5845 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 212: /* table_options ::= table_options WATERMARK duration_list */
+#line 402 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-2].minor.yy242, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy174); }
+#line 5851 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 213: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
+#line 403 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-4].minor.yy242, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy174); }
+#line 5857 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 214: /* table_options ::= table_options TTL NK_INTEGER */
+#line 404 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-2].minor.yy242, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
+#line 5863 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 215: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
+#line 405 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-4].minor.yy242, TABLE_OPTION_SMA, yymsp[-1].minor.yy174); }
+#line 5869 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 216: /* table_options ::= table_options DELETE_MARK duration_list */
+#line 406 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-2].minor.yy242, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy174); }
+#line 5875 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 217: /* alter_table_options ::= alter_table_option */
+#line 408 "sql.y"
{ yylhsminor.yy242 = createAlterTableOptions(pCxt); yylhsminor.yy242 = setTableOption(pCxt, yylhsminor.yy242, yymsp[0].minor.yy535.type, &yymsp[0].minor.yy535.val); }
+#line 5881 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 218: /* alter_table_options ::= alter_table_options alter_table_option */
+#line 409 "sql.y"
{ yylhsminor.yy242 = setTableOption(pCxt, yymsp[-1].minor.yy242, yymsp[0].minor.yy535.type, &yymsp[0].minor.yy535.val); }
+#line 5887 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 219: /* alter_table_option ::= COMMENT NK_STRING */
+#line 413 "sql.y"
{ yymsp[-1].minor.yy535.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5893 "sql.c"
break;
case 220: /* alter_table_option ::= TTL NK_INTEGER */
+#line 414 "sql.y"
{ yymsp[-1].minor.yy535.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy535.val = yymsp[0].minor.yy0; }
+#line 5898 "sql.c"
break;
case 221: /* duration_list ::= duration_literal */
case 422: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==422);
+#line 418 "sql.y"
{ yylhsminor.yy174 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy242)); }
+#line 5904 "sql.c"
yymsp[0].minor.yy174 = yylhsminor.yy174;
break;
case 222: /* duration_list ::= duration_list NK_COMMA duration_literal */
case 423: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==423);
+#line 419 "sql.y"
{ yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, releaseRawExprNode(pCxt, yymsp[0].minor.yy242)); }
+#line 5911 "sql.c"
yymsp[-2].minor.yy174 = yylhsminor.yy174;
break;
case 225: /* rollup_func_name ::= function_name */
+#line 426 "sql.y"
{ yylhsminor.yy242 = createFunctionNode(pCxt, &yymsp[0].minor.yy669, NULL); }
+#line 5917 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 226: /* rollup_func_name ::= FIRST */
case 227: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==227);
case 282: /* tag_item ::= QTAGS */ yytestcase(yyruleno==282);
+#line 427 "sql.y"
{ yylhsminor.yy242 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+#line 5925 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 230: /* col_name ::= column_name */
case 283: /* tag_item ::= column_name */ yytestcase(yyruleno==283);
+#line 435 "sql.y"
{ yylhsminor.yy242 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy669); }
+#line 5932 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 231: /* cmd ::= SHOW DNODES */
+#line 438 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
+#line 5938 "sql.c"
break;
case 232: /* cmd ::= SHOW USERS */
+#line 439 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); }
+#line 5943 "sql.c"
break;
case 233: /* cmd ::= SHOW USER PRIVILEGES */
+#line 440 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); }
+#line 5948 "sql.c"
break;
case 234: /* cmd ::= SHOW DATABASES */
+#line 441 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
+#line 5953 "sql.c"
break;
case 235: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
+#line 442 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, OP_TYPE_LIKE); }
+#line 5958 "sql.c"
break;
case 236: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
+#line 443 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, OP_TYPE_LIKE); }
+#line 5963 "sql.c"
break;
case 237: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
+#line 444 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy242, NULL, OP_TYPE_LIKE); }
+#line 5968 "sql.c"
break;
case 238: /* cmd ::= SHOW MNODES */
+#line 445 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
+#line 5973 "sql.c"
break;
case 239: /* cmd ::= SHOW QNODES */
+#line 447 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); }
+#line 5978 "sql.c"
break;
case 240: /* cmd ::= SHOW FUNCTIONS */
+#line 448 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
+#line 5983 "sql.c"
break;
case 241: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
+#line 449 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy242, yymsp[-1].minor.yy242, OP_TYPE_EQUAL); }
+#line 5988 "sql.c"
break;
case 242: /* cmd ::= SHOW STREAMS */
+#line 450 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
+#line 5993 "sql.c"
break;
case 243: /* cmd ::= SHOW ACCOUNTS */
+#line 451 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
+#line 5998 "sql.c"
break;
case 244: /* cmd ::= SHOW APPS */
+#line 452 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); }
+#line 6003 "sql.c"
break;
case 245: /* cmd ::= SHOW CONNECTIONS */
+#line 453 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
+#line 6008 "sql.c"
break;
case 246: /* cmd ::= SHOW LICENCES */
case 247: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==247);
+#line 454 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
+#line 6014 "sql.c"
break;
case 248: /* cmd ::= SHOW CREATE DATABASE db_name */
+#line 456 "sql.y"
{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy669); }
+#line 6019 "sql.c"
break;
case 249: /* cmd ::= SHOW CREATE TABLE full_table_name */
+#line 457 "sql.y"
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy242); }
+#line 6024 "sql.c"
break;
case 250: /* cmd ::= SHOW CREATE STABLE full_table_name */
+#line 458 "sql.y"
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy242); }
+#line 6029 "sql.c"
break;
case 251: /* cmd ::= SHOW QUERIES */
+#line 459 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
+#line 6034 "sql.c"
break;
case 252: /* cmd ::= SHOW SCORES */
+#line 460 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); }
+#line 6039 "sql.c"
break;
case 253: /* cmd ::= SHOW TOPICS */
+#line 461 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); }
+#line 6044 "sql.c"
break;
case 254: /* cmd ::= SHOW VARIABLES */
case 255: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==255);
+#line 462 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); }
+#line 6050 "sql.c"
break;
case 256: /* cmd ::= SHOW LOCAL VARIABLES */
+#line 464 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
+#line 6055 "sql.c"
break;
case 257: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
+#line 465 "sql.y"
{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy242); }
+#line 6060 "sql.c"
break;
case 258: /* cmd ::= SHOW BNODES */
+#line 466 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
+#line 6065 "sql.c"
break;
case 259: /* cmd ::= SHOW SNODES */
+#line 467 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); }
+#line 6070 "sql.c"
break;
case 260: /* cmd ::= SHOW CLUSTER */
+#line 468 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); }
+#line 6075 "sql.c"
break;
case 261: /* cmd ::= SHOW TRANSACTIONS */
+#line 469 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
+#line 6080 "sql.c"
break;
case 262: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
+#line 470 "sql.y"
{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy242); }
+#line 6085 "sql.c"
break;
case 263: /* cmd ::= SHOW CONSUMERS */
+#line 471 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
+#line 6090 "sql.c"
break;
case 264: /* cmd ::= SHOW SUBSCRIPTIONS */
+#line 472 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
+#line 6095 "sql.c"
break;
case 265: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
+#line 473 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy242, yymsp[-1].minor.yy242, OP_TYPE_EQUAL); }
+#line 6100 "sql.c"
break;
case 266: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
+#line 474 "sql.y"
{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy242, yymsp[0].minor.yy242, yymsp[-3].minor.yy174); }
+#line 6105 "sql.c"
break;
case 267: /* cmd ::= SHOW VNODES NK_INTEGER */
+#line 475 "sql.y"
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
+#line 6110 "sql.c"
break;
case 268: /* cmd ::= SHOW VNODES NK_STRING */
+#line 476 "sql.y"
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); }
+#line 6115 "sql.c"
break;
case 269: /* cmd ::= SHOW db_name_cond_opt ALIVE */
+#line 478 "sql.y"
{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy242, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
+#line 6120 "sql.c"
break;
case 270: /* cmd ::= SHOW CLUSTER ALIVE */
+#line 479 "sql.y"
{ pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); }
+#line 6125 "sql.c"
break;
case 271: /* db_name_cond_opt ::= */
case 276: /* from_db_opt ::= */ yytestcase(yyruleno==276);
+#line 481 "sql.y"
{ yymsp[1].minor.yy242 = createDefaultDatabaseCondValue(pCxt); }
+#line 6131 "sql.c"
break;
case 272: /* db_name_cond_opt ::= db_name NK_DOT */
+#line 482 "sql.y"
{ yylhsminor.yy242 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy669); }
+#line 6136 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 274: /* like_pattern_opt ::= LIKE NK_STRING */
+#line 485 "sql.y"
{ yymsp[-1].minor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+#line 6142 "sql.c"
break;
case 275: /* table_name_cond ::= table_name */
+#line 487 "sql.y"
{ yylhsminor.yy242 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy669); }
+#line 6147 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 277: /* from_db_opt ::= FROM db_name */
+#line 490 "sql.y"
{ yymsp[-1].minor.yy242 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy669); }
+#line 6153 "sql.c"
break;
case 281: /* tag_item ::= TBNAME */
+#line 498 "sql.y"
{ yylhsminor.yy242 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
+#line 6158 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 284: /* tag_item ::= column_name column_alias */
+#line 501 "sql.y"
{ yylhsminor.yy242 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy669), &yymsp[0].minor.yy669); }
+#line 6164 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 285: /* tag_item ::= column_name AS column_alias */
+#line 502 "sql.y"
{ yylhsminor.yy242 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy669), &yymsp[0].minor.yy669); }
+#line 6170 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 286: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */
+#line 506 "sql.y"
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy777, yymsp[-3].minor.yy242, yymsp[-1].minor.yy242, NULL, yymsp[0].minor.yy242); }
+#line 6176 "sql.c"
break;
case 287: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */
+#line 508 "sql.y"
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy777, yymsp[-5].minor.yy242, yymsp[-3].minor.yy242, yymsp[-1].minor.yy174, NULL); }
+#line 6181 "sql.c"
break;
case 288: /* cmd ::= DROP INDEX exists_opt full_index_name */
+#line 509 "sql.y"
{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy777, yymsp[0].minor.yy242); }
+#line 6186 "sql.c"
break;
case 289: /* full_index_name ::= index_name */
+#line 511 "sql.y"
{ yylhsminor.yy242 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy669); }
+#line 6191 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 290: /* full_index_name ::= db_name NK_DOT index_name */
+#line 512 "sql.y"
{ yylhsminor.yy242 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy669); }
+#line 6197 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 291: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
+#line 515 "sql.y"
{ yymsp[-9].minor.yy242 = createIndexOption(pCxt, yymsp[-7].minor.yy174, releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), NULL, yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 6203 "sql.c"
break;
case 292: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */
+#line 518 "sql.y"
{ yymsp[-11].minor.yy242 = createIndexOption(pCxt, yymsp[-9].minor.yy174, releaseRawExprNode(pCxt, yymsp[-5].minor.yy242), releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 6208 "sql.c"
break;
case 295: /* func ::= sma_func_name NK_LP expression_list NK_RP */
+#line 525 "sql.y"
{ yylhsminor.yy242 = createFunctionNode(pCxt, &yymsp[-3].minor.yy669, yymsp[-1].minor.yy174); }
+#line 6213 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 296: /* sma_func_name ::= function_name */
case 509: /* alias_opt ::= table_alias */ yytestcase(yyruleno==509);
+#line 529 "sql.y"
{ yylhsminor.yy669 = yymsp[0].minor.yy669; }
+#line 6220 "sql.c"
yymsp[0].minor.yy669 = yylhsminor.yy669;
break;
case 301: /* sma_stream_opt ::= */
case 341: /* stream_options ::= */ yytestcase(yyruleno==341);
+#line 535 "sql.y"
{ yymsp[1].minor.yy242 = createStreamOptions(pCxt); }
+#line 6227 "sql.c"
break;
case 302: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
+#line 536 "sql.y"
{ ((SStreamOptions*)yymsp[-2].minor.yy242)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy242); yylhsminor.yy242 = yymsp[-2].minor.yy242; }
+#line 6232 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 303: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
+#line 537 "sql.y"
{ ((SStreamOptions*)yymsp[-2].minor.yy242)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy242); yylhsminor.yy242 = yymsp[-2].minor.yy242; }
+#line 6238 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 304: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
+#line 538 "sql.y"
{ ((SStreamOptions*)yymsp[-2].minor.yy242)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy242); yylhsminor.yy242 = yymsp[-2].minor.yy242; }
+#line 6244 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 305: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
+#line 541 "sql.y"
{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy777, &yymsp[-2].minor.yy669, yymsp[0].minor.yy242); }
+#line 6250 "sql.c"
break;
case 306: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
+#line 542 "sql.y"
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy777, &yymsp[-3].minor.yy669, &yymsp[0].minor.yy669, false); }
+#line 6255 "sql.c"
break;
case 307: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
+#line 544 "sql.y"
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy777, &yymsp[-5].minor.yy669, &yymsp[0].minor.yy669, true); }
+#line 6260 "sql.c"
break;
- case 308: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy777, &yymsp[-3].minor.yy669, yymsp[0].minor.yy242, false); }
+ case 308: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt */
+#line 546 "sql.y"
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy777, &yymsp[-4].minor.yy669, yymsp[-1].minor.yy242, false, yymsp[0].minor.yy242); }
+#line 6265 "sql.c"
break;
- case 309: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
-{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy777, &yymsp[-5].minor.yy669, yymsp[0].minor.yy242, true); }
+ case 309: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt */
+#line 548 "sql.y"
+{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-7].minor.yy777, &yymsp[-6].minor.yy669, yymsp[-1].minor.yy242, true, yymsp[0].minor.yy242); }
+#line 6270 "sql.c"
break;
case 310: /* cmd ::= DROP TOPIC exists_opt topic_name */
+#line 549 "sql.y"
{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy777, &yymsp[0].minor.yy669); }
+#line 6275 "sql.c"
break;
case 311: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
+#line 550 "sql.y"
{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy777, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy669); }
+#line 6280 "sql.c"
break;
case 312: /* cmd ::= DESC full_table_name */
case 313: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==313);
+#line 553 "sql.y"
{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy242); }
+#line 6286 "sql.c"
break;
case 314: /* cmd ::= RESET QUERY CACHE */
+#line 557 "sql.y"
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
+#line 6291 "sql.c"
break;
case 315: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
case 316: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==316);
+#line 560 "sql.y"
{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy777, yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 6297 "sql.c"
break;
case 319: /* explain_options ::= */
+#line 568 "sql.y"
{ yymsp[1].minor.yy242 = createDefaultExplainOptions(pCxt); }
+#line 6302 "sql.c"
break;
case 320: /* explain_options ::= explain_options VERBOSE NK_BOOL */
+#line 569 "sql.y"
{ yylhsminor.yy242 = setExplainVerbose(pCxt, yymsp[-2].minor.yy242, &yymsp[0].minor.yy0); }
+#line 6307 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 321: /* explain_options ::= explain_options RATIO NK_FLOAT */
+#line 570 "sql.y"
{ yylhsminor.yy242 = setExplainRatio(pCxt, yymsp[-2].minor.yy242, &yymsp[0].minor.yy0); }
+#line 6313 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 322: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
+#line 575 "sql.y"
{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy777, yymsp[-9].minor.yy777, &yymsp[-6].minor.yy669, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy794, yymsp[-1].minor.yy120, &yymsp[0].minor.yy669, yymsp[-10].minor.yy777); }
+#line 6319 "sql.c"
break;
case 323: /* cmd ::= DROP FUNCTION exists_opt function_name */
+#line 576 "sql.y"
{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy777, &yymsp[0].minor.yy669); }
+#line 6324 "sql.c"
break;
case 328: /* language_opt ::= */
+#line 590 "sql.y"
{ yymsp[1].minor.yy669 = nil_token; }
+#line 6329 "sql.c"
break;
case 329: /* language_opt ::= LANGUAGE NK_STRING */
+#line 591 "sql.y"
{ yymsp[-1].minor.yy669 = yymsp[0].minor.yy0; }
+#line 6334 "sql.c"
break;
case 332: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */
+#line 601 "sql.y"
{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy777, &yymsp[-8].minor.yy669, yymsp[-5].minor.yy242, yymsp[-7].minor.yy242, yymsp[-3].minor.yy174, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, yymsp[-4].minor.yy174); }
+#line 6339 "sql.c"
break;
case 333: /* cmd ::= DROP STREAM exists_opt stream_name */
+#line 602 "sql.y"
{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy777, &yymsp[0].minor.yy669); }
+#line 6344 "sql.c"
break;
case 334: /* cmd ::= PAUSE STREAM exists_opt stream_name */
+#line 603 "sql.y"
{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy777, &yymsp[0].minor.yy669); }
+#line 6349 "sql.c"
break;
case 335: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
+#line 604 "sql.y"
{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy777, yymsp[-1].minor.yy777, &yymsp[0].minor.yy669); }
+#line 6354 "sql.c"
break;
case 342: /* stream_options ::= stream_options TRIGGER AT_ONCE */
case 343: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==343);
+#line 618 "sql.y"
{ yylhsminor.yy242 = setStreamOptions(pCxt, yymsp[-2].minor.yy242, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6360 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 344: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
+#line 620 "sql.y"
{ yylhsminor.yy242 = setStreamOptions(pCxt, yymsp[-3].minor.yy242, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy242)); }
+#line 6366 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 345: /* stream_options ::= stream_options WATERMARK duration_literal */
+#line 621 "sql.y"
{ yylhsminor.yy242 = setStreamOptions(pCxt, yymsp[-2].minor.yy242, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy242)); }
+#line 6372 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 346: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
+#line 622 "sql.y"
{ yylhsminor.yy242 = setStreamOptions(pCxt, yymsp[-3].minor.yy242, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6378 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 347: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
+#line 623 "sql.y"
{ yylhsminor.yy242 = setStreamOptions(pCxt, yymsp[-2].minor.yy242, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6384 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 348: /* stream_options ::= stream_options DELETE_MARK duration_literal */
+#line 624 "sql.y"
{ yylhsminor.yy242 = setStreamOptions(pCxt, yymsp[-2].minor.yy242, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy242)); }
+#line 6390 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 349: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
+#line 625 "sql.y"
{ yylhsminor.yy242 = setStreamOptions(pCxt, yymsp[-3].minor.yy242, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); }
+#line 6396 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 351: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
case 543: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==543);
case 563: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==563);
+#line 628 "sql.y"
{ yymsp[-3].minor.yy242 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy242); }
+#line 6404 "sql.c"
break;
case 354: /* cmd ::= KILL CONNECTION NK_INTEGER */
+#line 636 "sql.y"
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
+#line 6409 "sql.c"
break;
case 355: /* cmd ::= KILL QUERY NK_STRING */
+#line 637 "sql.y"
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
+#line 6414 "sql.c"
break;
case 356: /* cmd ::= KILL TRANSACTION NK_INTEGER */
+#line 638 "sql.y"
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
+#line 6419 "sql.c"
break;
case 357: /* cmd ::= BALANCE VGROUP */
+#line 641 "sql.y"
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
+#line 6424 "sql.c"
break;
case 358: /* cmd ::= BALANCE VGROUP LEADER */
+#line 642 "sql.y"
{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt); }
+#line 6429 "sql.c"
break;
case 359: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
+#line 643 "sql.y"
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
+#line 6434 "sql.c"
break;
case 360: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
+#line 644 "sql.y"
{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy174); }
+#line 6439 "sql.c"
break;
case 361: /* cmd ::= SPLIT VGROUP NK_INTEGER */
+#line 645 "sql.y"
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
+#line 6444 "sql.c"
break;
case 362: /* dnode_list ::= DNODE NK_INTEGER */
+#line 649 "sql.y"
{ yymsp[-1].minor.yy174 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
+#line 6449 "sql.c"
break;
case 364: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
+#line 656 "sql.y"
{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 6454 "sql.c"
break;
case 367: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
+#line 665 "sql.y"
{ yymsp[-6].minor.yy242 = createInsertStmt(pCxt, yymsp[-4].minor.yy242, yymsp[-2].minor.yy174, yymsp[0].minor.yy242); }
+#line 6459 "sql.c"
break;
case 368: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */
+#line 666 "sql.y"
{ yymsp[-3].minor.yy242 = createInsertStmt(pCxt, yymsp[-1].minor.yy242, NULL, yymsp[0].minor.yy242); }
+#line 6464 "sql.c"
break;
case 369: /* literal ::= NK_INTEGER */
+#line 669 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
+#line 6469 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 370: /* literal ::= NK_FLOAT */
+#line 670 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
+#line 6475 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 371: /* literal ::= NK_STRING */
+#line 671 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
+#line 6481 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 372: /* literal ::= NK_BOOL */
+#line 672 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
+#line 6487 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 373: /* literal ::= TIMESTAMP NK_STRING */
+#line 673 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
+#line 6493 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 374: /* literal ::= duration_literal */
@@ -5606,61 +6514,87 @@ static YYACTIONTYPE yy_reduce(
case 566: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==566);
case 569: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==569);
case 571: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==571);
+#line 674 "sql.y"
{ yylhsminor.yy242 = yymsp[0].minor.yy242; }
+#line 6519 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 375: /* literal ::= NULL */
+#line 675 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
+#line 6525 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 376: /* literal ::= NK_QUESTION */
+#line 676 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 6531 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 377: /* duration_literal ::= NK_VARIABLE */
+#line 678 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
+#line 6537 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 378: /* signed ::= NK_INTEGER */
+#line 680 "sql.y"
{ yylhsminor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+#line 6543 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 379: /* signed ::= NK_PLUS NK_INTEGER */
+#line 681 "sql.y"
{ yymsp[-1].minor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
+#line 6549 "sql.c"
break;
case 380: /* signed ::= NK_MINUS NK_INTEGER */
+#line 682 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
}
+#line 6558 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 381: /* signed ::= NK_FLOAT */
+#line 687 "sql.y"
{ yylhsminor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+#line 6564 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 382: /* signed ::= NK_PLUS NK_FLOAT */
+#line 688 "sql.y"
{ yymsp[-1].minor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
+#line 6570 "sql.c"
break;
case 383: /* signed ::= NK_MINUS NK_FLOAT */
+#line 689 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
yylhsminor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
}
+#line 6579 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 385: /* signed_literal ::= NK_STRING */
+#line 696 "sql.y"
{ yylhsminor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
+#line 6585 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 386: /* signed_literal ::= NK_BOOL */
+#line 697 "sql.y"
{ yylhsminor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
+#line 6591 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 387: /* signed_literal ::= TIMESTAMP NK_STRING */
+#line 698 "sql.y"
{ yymsp[-1].minor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
+#line 6597 "sql.c"
break;
case 388: /* signed_literal ::= duration_literal */
case 390: /* signed_literal ::= literal_func */ yytestcase(yyruleno==390);
@@ -5670,106 +6604,138 @@ static YYACTIONTYPE yy_reduce(
case 570: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==570);
case 572: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==572);
case 585: /* search_condition ::= common_expression */ yytestcase(yyruleno==585);
+#line 699 "sql.y"
{ yylhsminor.yy242 = releaseRawExprNode(pCxt, yymsp[0].minor.yy242); }
+#line 6609 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 389: /* signed_literal ::= NULL */
+#line 700 "sql.y"
{ yylhsminor.yy242 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
+#line 6615 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 391: /* signed_literal ::= NK_QUESTION */
+#line 702 "sql.y"
{ yylhsminor.yy242 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
+#line 6621 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 411: /* expression ::= NK_LP expression NK_RP */
case 495: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==495);
case 584: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==584);
+#line 763 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy242)); }
+#line 6629 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 412: /* expression ::= NK_PLUS expr_or_subquery */
+#line 764 "sql.y"
{
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy242));
}
+#line 6638 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 413: /* expression ::= NK_MINUS expr_or_subquery */
+#line 768 "sql.y"
{
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy242), NULL));
}
+#line 6647 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 414: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
+#line 772 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6657 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 415: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
+#line 777 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6667 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 416: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
+#line 782 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6677 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 417: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
+#line 787 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6687 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 418: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
+#line 792 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6697 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 419: /* expression ::= column_reference NK_ARROW NK_STRING */
+#line 797 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
}
+#line 6706 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 420: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
+#line 801 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6716 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 421: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
+#line 806 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6726 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 424: /* column_reference ::= column_name */
+#line 817 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy669, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy669)); }
+#line 6732 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 425: /* column_reference ::= table_name NK_DOT column_name */
+#line 818 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy669, createColumnNode(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy669)); }
+#line 6738 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 426: /* pseudo_column ::= ROWTS */
@@ -5784,191 +6750,278 @@ static YYACTIONTYPE yy_reduce(
case 436: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==436);
case 437: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==437);
case 443: /* literal_func ::= NOW */ yytestcase(yyruleno==443);
+#line 820 "sql.y"
{ yylhsminor.yy242 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
+#line 6755 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 428: /* pseudo_column ::= table_name NK_DOT TBNAME */
+#line 822 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy669)))); }
+#line 6761 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 438: /* function_expression ::= function_name NK_LP expression_list NK_RP */
case 439: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==439);
+#line 833 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy669, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy669, yymsp[-1].minor.yy174)); }
+#line 6768 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 440: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
+#line 836 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), yymsp[-1].minor.yy794)); }
+#line 6774 "sql.c"
yymsp[-5].minor.yy242 = yylhsminor.yy242;
break;
case 442: /* literal_func ::= noarg_func NK_LP NK_RP */
+#line 839 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy669, NULL)); }
+#line 6780 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 457: /* star_func_para_list ::= NK_STAR */
+#line 863 "sql.y"
{ yylhsminor.yy174 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
+#line 6786 "sql.c"
yymsp[0].minor.yy174 = yylhsminor.yy174;
break;
case 462: /* star_func_para ::= table_name NK_DOT NK_STAR */
case 526: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==526);
+#line 872 "sql.y"
{ yylhsminor.yy242 = createColumnNode(pCxt, &yymsp[-2].minor.yy669, &yymsp[0].minor.yy0); }
+#line 6793 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 463: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
+#line 875 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy174, yymsp[-1].minor.yy242)); }
+#line 6799 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 464: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
+#line 877 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), yymsp[-2].minor.yy174, yymsp[-1].minor.yy242)); }
+#line 6805 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 467: /* when_then_expr ::= WHEN common_expression THEN common_expression */
+#line 884 "sql.y"
{ yymsp[-3].minor.yy242 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)); }
+#line 6811 "sql.c"
break;
case 469: /* case_when_else_opt ::= ELSE common_expression */
+#line 887 "sql.y"
{ yymsp[-1].minor.yy242 = releaseRawExprNode(pCxt, yymsp[0].minor.yy242); }
+#line 6816 "sql.c"
break;
case 470: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
case 475: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==475);
+#line 890 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy70, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6826 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 471: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
+#line 897 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy242), releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6836 "sql.c"
yymsp[-4].minor.yy242 = yylhsminor.yy242;
break;
case 472: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
+#line 903 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy242), releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6846 "sql.c"
yymsp[-5].minor.yy242 = yylhsminor.yy242;
break;
case 473: /* predicate ::= expr_or_subquery IS NULL */
+#line 908 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), NULL));
}
+#line 6855 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 474: /* predicate ::= expr_or_subquery IS NOT NULL */
+#line 912 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), NULL));
}
+#line 6864 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 476: /* compare_op ::= NK_LT */
+#line 924 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_LOWER_THAN; }
+#line 6870 "sql.c"
break;
case 477: /* compare_op ::= NK_GT */
+#line 925 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_GREATER_THAN; }
+#line 6875 "sql.c"
break;
case 478: /* compare_op ::= NK_LE */
+#line 926 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_LOWER_EQUAL; }
+#line 6880 "sql.c"
break;
case 479: /* compare_op ::= NK_GE */
+#line 927 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_GREATER_EQUAL; }
+#line 6885 "sql.c"
break;
case 480: /* compare_op ::= NK_NE */
+#line 928 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_NOT_EQUAL; }
+#line 6890 "sql.c"
break;
case 481: /* compare_op ::= NK_EQ */
+#line 929 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_EQUAL; }
+#line 6895 "sql.c"
break;
case 482: /* compare_op ::= LIKE */
+#line 930 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_LIKE; }
+#line 6900 "sql.c"
break;
case 483: /* compare_op ::= NOT LIKE */
+#line 931 "sql.y"
{ yymsp[-1].minor.yy70 = OP_TYPE_NOT_LIKE; }
+#line 6905 "sql.c"
break;
case 484: /* compare_op ::= MATCH */
+#line 932 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_MATCH; }
+#line 6910 "sql.c"
break;
case 485: /* compare_op ::= NMATCH */
+#line 933 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_NMATCH; }
+#line 6915 "sql.c"
break;
case 486: /* compare_op ::= CONTAINS */
+#line 934 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_JSON_CONTAINS; }
+#line 6920 "sql.c"
break;
case 487: /* in_op ::= IN */
+#line 938 "sql.y"
{ yymsp[0].minor.yy70 = OP_TYPE_IN; }
+#line 6925 "sql.c"
break;
case 488: /* in_op ::= NOT IN */
+#line 939 "sql.y"
{ yymsp[-1].minor.yy70 = OP_TYPE_NOT_IN; }
+#line 6930 "sql.c"
break;
case 489: /* in_predicate_value ::= NK_LP literal_list NK_RP */
+#line 941 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy174)); }
+#line 6935 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 491: /* boolean_value_expression ::= NOT boolean_primary */
+#line 945 "sql.y"
{
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy242), NULL));
}
+#line 6944 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 492: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
+#line 950 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6954 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 493: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
+#line 956 "sql.y"
{
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy242);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy242);
yylhsminor.yy242 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), releaseRawExprNode(pCxt, yymsp[0].minor.yy242)));
}
+#line 6964 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 501: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
+#line 974 "sql.y"
{ yylhsminor.yy242 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, NULL); }
+#line 6970 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 504: /* table_primary ::= table_name alias_opt */
+#line 980 "sql.y"
{ yylhsminor.yy242 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy669, &yymsp[0].minor.yy669); }
+#line 6976 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 505: /* table_primary ::= db_name NK_DOT table_name alias_opt */
+#line 981 "sql.y"
{ yylhsminor.yy242 = createRealTableNode(pCxt, &yymsp[-3].minor.yy669, &yymsp[-1].minor.yy669, &yymsp[0].minor.yy669); }
+#line 6982 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 506: /* table_primary ::= subquery alias_opt */
+#line 982 "sql.y"
{ yylhsminor.yy242 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy242), &yymsp[0].minor.yy669); }
+#line 6988 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 508: /* alias_opt ::= */
+#line 987 "sql.y"
{ yymsp[1].minor.yy669 = nil_token; }
+#line 6994 "sql.c"
break;
case 510: /* alias_opt ::= AS table_alias */
+#line 989 "sql.y"
{ yymsp[-1].minor.yy669 = yymsp[0].minor.yy669; }
+#line 6999 "sql.c"
break;
case 511: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case 512: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==512);
+#line 991 "sql.y"
{ yymsp[-2].minor.yy242 = yymsp[-1].minor.yy242; }
+#line 7005 "sql.c"
break;
case 513: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
+#line 996 "sql.y"
{ yylhsminor.yy242 = createJoinTableNode(pCxt, yymsp[-4].minor.yy482, yymsp[-5].minor.yy242, yymsp[-2].minor.yy242, yymsp[0].minor.yy242); }
+#line 7010 "sql.c"
yymsp[-5].minor.yy242 = yylhsminor.yy242;
break;
case 514: /* join_type ::= */
+#line 1000 "sql.y"
{ yymsp[1].minor.yy482 = JOIN_TYPE_INNER; }
+#line 7016 "sql.c"
break;
case 515: /* join_type ::= INNER */
+#line 1001 "sql.y"
{ yymsp[0].minor.yy482 = JOIN_TYPE_INNER; }
+#line 7021 "sql.c"
break;
case 516: /* 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 */
+#line 1007 "sql.y"
{
yymsp[-11].minor.yy242 = createSelectStmt(pCxt, yymsp[-10].minor.yy777, yymsp[-9].minor.yy174, yymsp[-8].minor.yy242);
yymsp[-11].minor.yy242 = addWhereClause(pCxt, yymsp[-11].minor.yy242, yymsp[-7].minor.yy242);
@@ -5980,135 +7033,208 @@ static YYACTIONTYPE yy_reduce(
yymsp[-11].minor.yy242 = addEveryClause(pCxt, yymsp[-11].minor.yy242, yymsp[-4].minor.yy242);
yymsp[-11].minor.yy242 = addFillClause(pCxt, yymsp[-11].minor.yy242, yymsp[-3].minor.yy242);
}
+#line 7036 "sql.c"
break;
case 519: /* set_quantifier_opt ::= ALL */
+#line 1023 "sql.y"
{ yymsp[0].minor.yy777 = false; }
+#line 7041 "sql.c"
break;
case 522: /* select_item ::= NK_STAR */
+#line 1030 "sql.y"
{ yylhsminor.yy242 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
+#line 7046 "sql.c"
yymsp[0].minor.yy242 = yylhsminor.yy242;
break;
case 524: /* select_item ::= common_expression column_alias */
case 534: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==534);
+#line 1032 "sql.y"
{ yylhsminor.yy242 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy242), &yymsp[0].minor.yy669); }
+#line 7053 "sql.c"
yymsp[-1].minor.yy242 = yylhsminor.yy242;
break;
case 525: /* select_item ::= common_expression AS column_alias */
case 535: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==535);
+#line 1033 "sql.y"
{ yylhsminor.yy242 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), &yymsp[0].minor.yy669); }
+#line 7060 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 530: /* partition_by_clause_opt ::= PARTITION BY partition_list */
case 555: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==555);
case 574: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==574);
+#line 1042 "sql.y"
{ yymsp[-2].minor.yy174 = yymsp[0].minor.yy174; }
+#line 7068 "sql.c"
break;
case 537: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
+#line 1055 "sql.y"
{ yymsp[-5].minor.yy242 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), releaseRawExprNode(pCxt, yymsp[-1].minor.yy242)); }
+#line 7073 "sql.c"
break;
case 538: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
+#line 1056 "sql.y"
{ yymsp[-3].minor.yy242 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy242)); }
+#line 7078 "sql.c"
break;
case 539: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
+#line 1058 "sql.y"
{ yymsp[-5].minor.yy242 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), NULL, yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 7083 "sql.c"
break;
case 540: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
+#line 1061 "sql.y"
{ yymsp[-7].minor.yy242 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy242), releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), yymsp[-1].minor.yy242, yymsp[0].minor.yy242); }
+#line 7088 "sql.c"
break;
case 541: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
+#line 1063 "sql.y"
{ yymsp[-6].minor.yy242 = createEventWindowNode(pCxt, yymsp[-3].minor.yy242, yymsp[0].minor.yy242); }
+#line 7093 "sql.c"
break;
case 545: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
+#line 1069 "sql.y"
{ yymsp[-3].minor.yy242 = createFillNode(pCxt, yymsp[-1].minor.yy204, NULL); }
+#line 7098 "sql.c"
break;
case 546: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */
+#line 1070 "sql.y"
{ yymsp[-5].minor.yy242 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy174)); }
+#line 7103 "sql.c"
break;
case 547: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */
+#line 1071 "sql.y"
{ yymsp[-5].minor.yy242 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy174)); }
+#line 7108 "sql.c"
break;
case 548: /* fill_mode ::= NONE */
+#line 1075 "sql.y"
{ yymsp[0].minor.yy204 = FILL_MODE_NONE; }
+#line 7113 "sql.c"
break;
case 549: /* fill_mode ::= PREV */
+#line 1076 "sql.y"
{ yymsp[0].minor.yy204 = FILL_MODE_PREV; }
+#line 7118 "sql.c"
break;
case 550: /* fill_mode ::= NULL */
+#line 1077 "sql.y"
{ yymsp[0].minor.yy204 = FILL_MODE_NULL; }
+#line 7123 "sql.c"
break;
case 551: /* fill_mode ::= NULL_F */
+#line 1078 "sql.y"
{ yymsp[0].minor.yy204 = FILL_MODE_NULL_F; }
+#line 7128 "sql.c"
break;
case 552: /* fill_mode ::= LINEAR */
+#line 1079 "sql.y"
{ yymsp[0].minor.yy204 = FILL_MODE_LINEAR; }
+#line 7133 "sql.c"
break;
case 553: /* fill_mode ::= NEXT */
+#line 1080 "sql.y"
{ yymsp[0].minor.yy204 = FILL_MODE_NEXT; }
+#line 7138 "sql.c"
break;
case 556: /* group_by_list ::= expr_or_subquery */
+#line 1089 "sql.y"
{ yylhsminor.yy174 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy242))); }
+#line 7143 "sql.c"
yymsp[0].minor.yy174 = yylhsminor.yy174;
break;
case 557: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
+#line 1090 "sql.y"
{ yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy242))); }
+#line 7149 "sql.c"
yymsp[-2].minor.yy174 = yylhsminor.yy174;
break;
case 561: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
+#line 1097 "sql.y"
{ yymsp[-5].minor.yy242 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy242), releaseRawExprNode(pCxt, yymsp[-1].minor.yy242)); }
+#line 7155 "sql.c"
break;
case 564: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
+#line 1104 "sql.y"
{
yylhsminor.yy242 = addOrderByClause(pCxt, yymsp[-3].minor.yy242, yymsp[-2].minor.yy174);
yylhsminor.yy242 = addSlimitClause(pCxt, yylhsminor.yy242, yymsp[-1].minor.yy242);
yylhsminor.yy242 = addLimitClause(pCxt, yylhsminor.yy242, yymsp[0].minor.yy242);
}
+#line 7164 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 567: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
+#line 1114 "sql.y"
{ yylhsminor.yy242 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy242, yymsp[0].minor.yy242); }
+#line 7170 "sql.c"
yymsp[-3].minor.yy242 = yylhsminor.yy242;
break;
case 568: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
+#line 1116 "sql.y"
{ yylhsminor.yy242 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy242, yymsp[0].minor.yy242); }
+#line 7176 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 576: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 580: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==580);
+#line 1130 "sql.y"
{ yymsp[-1].minor.yy242 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
+#line 7183 "sql.c"
break;
case 577: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 581: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==581);
+#line 1131 "sql.y"
{ yymsp[-3].minor.yy242 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
+#line 7189 "sql.c"
break;
case 578: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 582: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==582);
+#line 1132 "sql.y"
{ yymsp[-3].minor.yy242 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
+#line 7195 "sql.c"
break;
case 583: /* subquery ::= NK_LP query_expression NK_RP */
+#line 1140 "sql.y"
{ yylhsminor.yy242 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy242); }
+#line 7200 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 588: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
+#line 1154 "sql.y"
{ yylhsminor.yy242 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy242), yymsp[-1].minor.yy48, yymsp[0].minor.yy687); }
+#line 7206 "sql.c"
yymsp[-2].minor.yy242 = yylhsminor.yy242;
break;
case 589: /* ordering_specification_opt ::= */
+#line 1158 "sql.y"
{ yymsp[1].minor.yy48 = ORDER_ASC; }
+#line 7212 "sql.c"
break;
case 590: /* ordering_specification_opt ::= ASC */
+#line 1159 "sql.y"
{ yymsp[0].minor.yy48 = ORDER_ASC; }
+#line 7217 "sql.c"
break;
case 591: /* ordering_specification_opt ::= DESC */
+#line 1160 "sql.y"
{ yymsp[0].minor.yy48 = ORDER_DESC; }
+#line 7222 "sql.c"
break;
case 592: /* null_ordering_opt ::= */
+#line 1164 "sql.y"
{ yymsp[1].minor.yy687 = NULL_ORDER_DEFAULT; }
+#line 7227 "sql.c"
break;
case 593: /* null_ordering_opt ::= NULLS FIRST */
+#line 1165 "sql.y"
{ yymsp[-1].minor.yy687 = NULL_ORDER_FIRST; }
+#line 7232 "sql.c"
break;
case 594: /* null_ordering_opt ::= NULLS LAST */
+#line 1166 "sql.y"
{ yymsp[-1].minor.yy687 = NULL_ORDER_LAST; }
+#line 7237 "sql.c"
break;
default:
break;
@@ -6170,6 +7296,7 @@ static void yy_syntax_error(
ParseCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
+#line 29 "sql.y"
if (TSDB_CODE_SUCCESS == pCxt->errCode) {
if(TOKEN.z) {
@@ -6180,6 +7307,7 @@ static void yy_syntax_error(
} else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) {
pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
}
+#line 7310 "sql.c"
/************ End %syntax_error code ******************************************/
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
@@ -6265,12 +7393,56 @@ void Parse(
}
#endif
- do{
+ while(1){ /* Exit by "break" */
+ assert( yypParser->yytos>=yypParser->yystack );
assert( yyact==yypParser->yytos->stateno );
yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
if( yyact >= YY_MIN_REDUCE ){
- yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
- yyminor ParseCTX_PARAM);
+ unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
+ assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
+#ifndef NDEBUG
+ if( yyTraceFILE ){
+ int yysize = yyRuleInfoNRhs[yyruleno];
+ if( yysize ){
+ fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
+ yyTracePrompt,
+ yyruleno, yyRuleName[yyruleno],
+ yyrulenoyytos[yysize].stateno);
+ }else{
+ fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
+ yyTracePrompt, yyruleno, yyRuleName[yyruleno],
+ yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){
+ yypParser->yyhwm++;
+ assert( yypParser->yyhwm ==
+ (int)(yypParser->yytos - yypParser->yystack));
+ }
+#endif
+#if YYSTACKDEPTH>0
+ if( yypParser->yytos>=yypParser->yystackEnd ){
+ yyStackOverflow(yypParser);
+ break;
+ }
+#else
+ if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
+ if( yyGrowStack(yypParser) ){
+ yyStackOverflow(yypParser);
+ break;
+ }
+ }
+#endif
+ }
+ yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM);
}else if( yyact <= YY_MAX_SHIFTREDUCE ){
yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
@@ -6326,14 +7498,13 @@ void Parse(
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
yymajor = YYNOCODE;
}else{
- while( yypParser->yytos >= yypParser->yystack
- && (yyact = yy_find_reduce_action(
- yypParser->yytos->stateno,
- YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
- ){
+ while( yypParser->yytos > yypParser->yystack ){
+ yyact = yy_find_reduce_action(yypParser->yytos->stateno,
+ YYERRORSYMBOL);
+ if( yyact<=YY_MAX_SHIFTREDUCE ) break;
yy_pop_parser_stack(yypParser);
}
- if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
+ if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
@@ -6383,7 +7554,7 @@ void Parse(
break;
#endif
}
- }while( yypParser->yytos>yypParser->yystack );
+ }
#ifndef NDEBUG
if( yyTraceFILE ){
yyStackEntry *i;
diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp
index 6a08193a39..a4e8bdd87a 100644
--- a/source/libs/parser/test/parInitialCTest.cpp
+++ b/source/libs/parser/test/parInitialCTest.cpp
@@ -1145,6 +1145,15 @@ TEST_F(ParserInitialCTest, createTopic) {
setCreateTopicReq("tp1", 1, "create topic if not exists tp1 with meta as stable st1", nullptr, "test", "st1", 1);
run("CREATE TOPIC IF NOT EXISTS tp1 WITH META AS STABLE st1");
clearCreateTopicReq();
+
+ setCreateTopicReq("tp1", 1, "create topic if not exists tp1 as stable st1 where tag1 > 0", nullptr, "test", "st1");
+ run("CREATE TOPIC IF NOT EXISTS tp1 AS STABLE st1 WHERE tag1 > 0");
+ clearCreateTopicReq();
+
+ setCreateTopicReq("tp1", 1, "create topic if not exists tp1 with meta as stable st1 where tag1 > 0", nullptr, "test", "st1", 1);
+ run("CREATE TOPIC IF NOT EXISTS tp1 WITH META AS STABLE st1 WHERE tag1 > 0");
+ clearCreateTopicReq();
+
}
/*
diff --git a/source/libs/qcom/src/queryUtil.c b/source/libs/qcom/src/queryUtil.c
index b3627e1a96..fa2ddd9163 100644
--- a/source/libs/qcom/src/queryUtil.c
+++ b/source/libs/qcom/src/queryUtil.c
@@ -454,6 +454,18 @@ int32_t cloneTableMeta(STableMeta* pSrc, STableMeta** pDst) {
return TSDB_CODE_SUCCESS;
}
+void getColumnTypeFromMeta(STableMeta* pMeta, char* pName, ETableColumnType* pType) {
+ int32_t nums = pMeta->tableInfo.numOfTags + pMeta->tableInfo.numOfColumns;
+ for (int32_t i = 0; i < nums; ++i) {
+ if (0 == strcmp(pName, pMeta->schema[i].name)) {
+ *pType = (i < pMeta->tableInfo.numOfColumns) ? TCOL_TYPE_COLUMN : TCOL_TYPE_TAG;
+ return;
+ }
+ }
+
+ *pType = TCOL_TYPE_NONE;
+}
+
void freeVgInfo(SDBVgInfo* vgInfo) {
if (NULL == vgInfo) {
return;
diff --git a/source/libs/stream/src/stream.c b/source/libs/stream/src/stream.c
index acc69c5a2b..7457b2197e 100644
--- a/source/libs/stream/src/stream.c
+++ b/source/libs/stream/src/stream.c
@@ -296,11 +296,8 @@ int32_t tAppendDataToInputQueue(SStreamTask* pTask, SStreamQueueItem* pItem) {
if (type == STREAM_INPUT__DATA_SUBMIT) {
SStreamDataSubmit* px = (SStreamDataSubmit*)pItem;
- qDebug("s-task:%s submit enqueue msgLen:%d ver:%" PRId64 ", total in queue:%d, size:%.2fMiB", pTask->id.idStr,
- px->submit.msgLen, px->submit.ver, total, size);
-
if ((pTask->taskLevel == TASK_LEVEL__SOURCE) && tInputQueueIsFull(pTask)) {
- qError("s-task:%s input queue is full, capacity(size:%d num:%dMiB), current(blocks:%d, size:%.2fMiB) abort",
+ qError("s-task:%s input queue is full, capacity(size:%d num:%dMiB), current(blocks:%d, size:%.2fMiB) stop to push data",
pTask->id.idStr, STREAM_TASK_INPUT_QUEUEU_CAPACITY, STREAM_TASK_INPUT_QUEUEU_CAPACITY_IN_SIZE, total,
size);
streamDataSubmitDestroy(px);
@@ -314,9 +311,12 @@ int32_t tAppendDataToInputQueue(SStreamTask* pTask, SStreamQueueItem* pItem) {
taosFreeQitem(pItem);
return code;
}
+
+ qDebug("s-task:%s submit enqueue msgLen:%d ver:%" PRId64 ", total in queue:%d, size:%.2fMiB", pTask->id.idStr,
+ px->submit.msgLen, px->submit.ver, total, size + px->submit.msgLen/1048576.0);
} else if (type == STREAM_INPUT__DATA_BLOCK || type == STREAM_INPUT__DATA_RETRIEVE ||
type == STREAM_INPUT__REF_DATA_BLOCK) {
- if (/*(pTask->taskLevel == TASK_LEVEL__SOURCE) && */(tInputQueueIsFull(pTask))) {
+ if ((pTask->taskLevel == TASK_LEVEL__SOURCE) && (tInputQueueIsFull(pTask))) {
qError("s-task:%s input queue is full, capacity:%d size:%d MiB, current(blocks:%d, size:%.2fMiB) abort",
pTask->id.idStr, STREAM_TASK_INPUT_QUEUEU_CAPACITY, STREAM_TASK_INPUT_QUEUEU_CAPACITY_IN_SIZE, total,
size);
diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c
index c8a6597bad..b3995f020b 100644
--- a/source/libs/stream/src/streamBackendRocksdb.c
+++ b/source/libs/stream/src/streamBackendRocksdb.c
@@ -87,8 +87,6 @@ void* streamBackendInit(const char* path) {
pHandle->cfInst = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK);
rocksdb_env_t* env = rocksdb_create_default_env(); // rocksdb_envoptions_create();
- rocksdb_env_set_low_priority_background_threads(env, 4);
- rocksdb_env_set_high_priority_background_threads(env, 2);
rocksdb_cache_t* cache = rocksdb_cache_create_lru(64 << 20);
@@ -128,7 +126,9 @@ void* streamBackendInit(const char* path) {
*/
streamStateOpenBackendCf(pHandle, (char*)path, cfs, nCf);
}
- rocksdb_list_column_families_destroy(cfs, nCf);
+ if (cfs != NULL) {
+ rocksdb_list_column_families_destroy(cfs, nCf);
+ }
return (void*)pHandle;
_EXIT:
@@ -572,9 +572,14 @@ int32_t decodeValueFunc(void* value, int32_t vlen, int64_t* ttl, char** dest) {
*dest = NULL;
return -1;
}
- int64_t now = taosGetTimestampMs();
p = taosDecodeFixedI64(p, &key.unixTimestamp);
p = taosDecodeFixedI32(p, &key.len);
+ if (vlen != (sizeof(int64_t) + sizeof(int32_t) + key.len)) {
+ if (dest != NULL) *dest = NULL;
+ qError("vlen: %d, read len: %d", vlen, key.len);
+ return -1;
+ }
+
if (key.len == 0) {
key.data = NULL;
} else {
@@ -582,6 +587,7 @@ int32_t decodeValueFunc(void* value, int32_t vlen, int64_t* ttl, char** dest) {
}
if (ttl != NULL) {
+ int64_t now = taosGetTimestampMs();
*ttl = key.unixTimestamp == 0 ? 0 : key.unixTimestamp - now;
}
if (dest != NULL) {
@@ -719,7 +725,7 @@ int32_t streamStateOpenBackendCf(void* backend, char* name, char** cfs, int32_t
qDebug("succ to open rocksdb cf");
}
// close default cf
- rocksdb_column_family_handle_destroy(cfHandle[0]);
+ if (((rocksdb_column_family_handle_t**)cfHandle)[0] != 0) rocksdb_column_family_handle_destroy(cfHandle[0]);
rocksdb_options_destroy(cfOpts[0]);
handle->db = db;
@@ -1003,35 +1009,35 @@ rocksdb_iterator_t* streamStateIterCreate(SStreamState* pState, const char* cfNa
((rocksdb_column_family_handle_t**)pState->pTdbState->pHandle)[idx]);
}
-#define STREAM_STATE_PUT_ROCKSDB(pState, funcname, key, value, vLen) \
- do { \
- code = 0; \
- char buf[128] = {0}; \
- char* err = NULL; \
- int i = streamGetInit(pState, funcname); \
- if (i < 0) { \
- qWarn("streamState failed to get cf name: %s", funcname); \
- code = -1; \
- break; \
- } \
- char toString[128] = {0}; \
- if (qDebugFlag & DEBUG_TRACE) ginitDict[i].toStrFunc((void*)key, toString); \
- int32_t klen = ginitDict[i].enFunc((void*)key, buf); \
- rocksdb_column_family_handle_t* pHandle = \
- ((rocksdb_column_family_handle_t**)pState->pTdbState->pHandle)[ginitDict[i].idx]; \
- rocksdb_t* db = pState->pTdbState->rocksdb; \
- rocksdb_writeoptions_t* opts = pState->pTdbState->writeOpts; \
- char* ttlV = NULL; \
- int32_t ttlVLen = ginitDict[i].enValueFunc((char*)value, vLen, 0, &ttlV); \
- rocksdb_put_cf(db, opts, pHandle, (const char*)buf, klen, (const char*)ttlV, (size_t)ttlVLen, &err); \
- if (err != NULL) { \
- taosMemoryFree(err); \
- qDebug("streamState str: %s failed to write to %s, err: %s", toString, funcname, err); \
- code = -1; \
- } else { \
- qDebug("streamState str:%s succ to write to %s, valLen:%d", toString, funcname, vLen); \
- } \
- taosMemoryFree(ttlV); \
+#define STREAM_STATE_PUT_ROCKSDB(pState, funcname, key, value, vLen) \
+ do { \
+ code = 0; \
+ char buf[128] = {0}; \
+ char* err = NULL; \
+ int i = streamGetInit(pState, funcname); \
+ if (i < 0) { \
+ qWarn("streamState failed to get cf name: %s", funcname); \
+ code = -1; \
+ break; \
+ } \
+ char toString[128] = {0}; \
+ if (qDebugFlag & DEBUG_TRACE) ginitDict[i].toStrFunc((void*)key, toString); \
+ int32_t klen = ginitDict[i].enFunc((void*)key, buf); \
+ rocksdb_column_family_handle_t* pHandle = \
+ ((rocksdb_column_family_handle_t**)pState->pTdbState->pHandle)[ginitDict[i].idx]; \
+ rocksdb_t* db = pState->pTdbState->rocksdb; \
+ rocksdb_writeoptions_t* opts = pState->pTdbState->writeOpts; \
+ char* ttlV = NULL; \
+ int32_t ttlVLen = ginitDict[i].enValueFunc((char*)value, vLen, 0, &ttlV); \
+ rocksdb_put_cf(db, opts, pHandle, (const char*)buf, klen, (const char*)ttlV, (size_t)ttlVLen, &err); \
+ if (err != NULL) { \
+ taosMemoryFree(err); \
+ qError("streamState str: %s failed to write to %s, err: %s", toString, funcname, err); \
+ code = -1; \
+ } else { \
+ qTrace("streamState str:%s succ to write to %s, rowValLen:%d, ttlValLen:%d", toString, funcname, vLen, ttlVLen); \
+ } \
+ taosMemoryFree(ttlV); \
} while (0);
#define STREAM_STATE_GET_ROCKSDB(pState, funcname, key, pVal, vLen) \
@@ -1054,29 +1060,29 @@ rocksdb_iterator_t* streamStateIterCreate(SStreamState* pState, const char* cfNa
rocksdb_readoptions_t* opts = pState->pTdbState->readOpts; \
size_t len = 0; \
char* val = rocksdb_get_cf(db, opts, pHandle, (const char*)buf, klen, (size_t*)&len, &err); \
- if (val == NULL) { \
+ if (val == NULL || len == 0) { \
if (err == NULL) { \
- qDebug("streamState str: %s failed to read from %s_%s, err: not exist", toString, pState->pTdbState->idstr, \
+ qTrace("streamState str: %s failed to read from %s_%s, err: not exist", toString, pState->pTdbState->idstr, \
funcname); \
} else { \
- qDebug("streamState str: %s failed to read from %s_%s, err: %s", toString, pState->pTdbState->idstr, funcname, \
+ qError("streamState str: %s failed to read from %s_%s, err: %s", toString, pState->pTdbState->idstr, funcname, \
err); \
taosMemoryFreeClear(err); \
} \
code = -1; \
} else { \
char* p = NULL; \
- int32_t len = ginitDict[i].deValueFunc(val, len, NULL, (char**)pVal); \
- if (len < 0) { \
- qDebug("streamState str: %s failed to read from %s_%s, err: already ttl ", toString, pState->pTdbState->idstr, \
+ int32_t tlen = ginitDict[i].deValueFunc(val, len, NULL, (char**)pVal); \
+ if (tlen <= 0) { \
+ qError("streamState str: %s failed to read from %s_%s, err: already ttl ", toString, pState->pTdbState->idstr, \
funcname); \
code = -1; \
} else { \
- qDebug("streamState str: %s succ to read from %s_%s, valLen:%d", toString, pState->pTdbState->idstr, funcname, \
- len); \
+ qTrace("streamState str: %s succ to read from %s_%s, valLen:%d", toString, pState->pTdbState->idstr, funcname, \
+ tlen); \
} \
taosMemoryFree(val); \
- if (vLen != NULL) *vLen = len; \
+ if (vLen != NULL) *vLen = tlen; \
} \
if (code == 0) \
qDebug("streamState str: %s succ to read from %s_%s", toString, pState->pTdbState->idstr, funcname); \
@@ -1107,7 +1113,7 @@ rocksdb_iterator_t* streamStateIterCreate(SStreamState* pState, const char* cfNa
taosMemoryFree(err); \
code = -1; \
} else { \
- qDebug("streamState str: %s succ to del from %s_%s", toString, pState->pTdbState->idstr, funcname); \
+ qTrace("streamState str: %s succ to del from %s_%s", toString, pState->pTdbState->idstr, funcname); \
} \
} while (0);
@@ -1134,31 +1140,29 @@ int32_t streamStateDel_rocksdb(SStreamState* pState, const SWinKey* key) {
int32_t streamStateClear_rocksdb(SStreamState* pState) {
qDebug("streamStateClear_rocksdb");
- SStateKey sKey = {.key = {.ts = 0, .groupId = 0}, .opNum = pState->number};
- SStateKey eKey = {.key = {.ts = INT64_MAX, .groupId = UINT64_MAX}, .opNum = pState->number};
char sKeyStr[128] = {0};
char eKeyStr[128] = {0};
+ SStateKey sKey = {.key = {.ts = 0, .groupId = 0}, .opNum = pState->number};
+ SStateKey eKey = {.key = {.ts = INT64_MAX, .groupId = UINT64_MAX}, .opNum = pState->number};
int sLen = stateKeyEncode(&sKey, sKeyStr);
int eLen = stateKeyEncode(&eKey, eKeyStr);
- char toStringStart[128] = {0};
- char toStringEnd[128] = {0};
- if (qDebugFlag & DEBUG_TRACE) {
- stateKeyToString(&sKey, toStringStart);
- stateKeyToString(&eKey, toStringEnd);
- }
-
- char* err = NULL;
if (pState->pTdbState->pHandle[1] != NULL) {
+ char* err = NULL;
rocksdb_delete_range_cf(pState->pTdbState->rocksdb, pState->pTdbState->writeOpts, pState->pTdbState->pHandle[1],
sKeyStr, sLen, eKeyStr, eLen, &err);
- }
- // rocksdb_compact_range_cf(pState->pTdbState->rocksdb, pState->pTdbState->pHandle[0], sKeyStr, sLen, eKeyStr,
- // eLen);
- if (err != NULL) {
- qWarn("failed to delete range cf(state) start: %s, end:%s, reason:%s", toStringStart, toStringEnd, err);
- taosMemoryFree(err);
+ if (err != NULL) {
+ char toStringStart[128] = {0};
+ char toStringEnd[128] = {0};
+ stateKeyToString(&sKey, toStringStart);
+ stateKeyToString(&eKey, toStringEnd);
+
+ qWarn("failed to delete range cf(state) start: %s, end:%s, reason:%s", toStringStart, toStringEnd, err);
+ taosMemoryFree(err);
+ } else {
+ rocksdb_compact_range_cf(pState->pTdbState->rocksdb, pState->pTdbState->pHandle[1], sKeyStr, sLen, eKeyStr, eLen);
+ }
}
return 0;
@@ -1924,17 +1928,17 @@ int32_t streamStateGetParName_rocksdb(SStreamState* pState, int64_t groupId, voi
int32_t streamDefaultPut_rocksdb(SStreamState* pState, const void* key, void* pVal, int32_t pVLen) {
int code = 0;
- STREAM_STATE_PUT_ROCKSDB(pState, "default", &key, pVal, pVLen);
+ STREAM_STATE_PUT_ROCKSDB(pState, "default", key, pVal, pVLen);
return code;
}
int32_t streamDefaultGet_rocksdb(SStreamState* pState, const void* key, void** pVal, int32_t* pVLen) {
int code = 0;
- STREAM_STATE_GET_ROCKSDB(pState, "default", &key, pVal, pVLen);
+ STREAM_STATE_GET_ROCKSDB(pState, "default", key, pVal, pVLen);
return code;
}
int32_t streamDefaultDel_rocksdb(SStreamState* pState, const void* key) {
int code = 0;
- STREAM_STATE_DEL_ROCKSDB(pState, "default", &key);
+ STREAM_STATE_DEL_ROCKSDB(pState, "default", key);
return code;
}
diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c
index 1e939cb071..9cb0a56644 100644
--- a/source/libs/stream/src/streamDispatch.c
+++ b/source/libs/stream/src/streamDispatch.c
@@ -157,7 +157,7 @@ int32_t streamBroadcastToChildren(SStreamTask* pTask, const SSDataBlock* pBlock)
tEncodeStreamRetrieveReq(&encoder, &req);
tEncoderClear(&encoder);
- SRpcMsg rpcMsg = { .code = 0, .msgType = TDMT_STREAM_RETRIEVE, .pCont = buf, .contLen = sizeof(SMsgHead) + len };
+ SRpcMsg rpcMsg = {.code = 0, .msgType = TDMT_STREAM_RETRIEVE, .pCont = buf, .contLen = sizeof(SMsgHead) + len};
if (tmsgSendReq(&pEpInfo->epSet, &rpcMsg) < 0) {
ASSERT(0);
goto CLEAR;
@@ -283,7 +283,7 @@ int32_t streamDispatchOneRecoverFinishReq(SStreamTask* pTask, const SStreamRecov
msg.info.noResp = 1;
tmsgSendReq(pEpSet, &msg);
- qDebug("s-task:%s dispatch recover finish msg to taskId:%d node %d: recover finish msg", pTask->id.idStr,
+ qDebug("s-task:%s dispatch recover finish msg to downstream taskId:0x%x node %d: recover finish msg", pTask->id.idStr,
pReq->taskId, vgId);
return 0;
@@ -318,7 +318,7 @@ int32_t doSendDispatchMsg(SStreamTask* pTask, const SStreamDispatchReq* pReq, in
msg.pCont = buf;
msg.msgType = pTask->dispatchMsgType;
- qDebug("dispatch from s-task:%s to taskId:0x%x vgId:%d data msg", pTask->id.idStr, pReq->taskId, vgId);
+ qDebug("s-task:%s dispatch msg to taskId:0x%x vgId:%d data msg", pTask->id.idStr, pReq->taskId, vgId);
tmsgSendReq(pEpSet, &msg);
code = 0;
@@ -414,7 +414,7 @@ int32_t streamDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pDat
req.taskId = downstreamTaskId;
- qDebug("s-task:%s (child taskId:%d) fix-dispatch blocks:%d to down stream s-task:%d in vgId:%d", pTask->id.idStr,
+ qDebug("s-task:%s (child taskId:%d) fix-dispatch %d block(s) to down stream s-task:0x%x in vgId:%d", pTask->id.idStr,
pTask->selfChildId, numOfBlocks, downstreamTaskId, vgId);
code = doSendDispatchMsg(pTask, &req, vgId, pEpSet);
@@ -514,7 +514,7 @@ int32_t streamDispatchStreamBlock(SStreamTask* pTask) {
return 0;
}
- qDebug("s-task:%s start to dispatch msg, output status:%d", pTask->id.idStr, pTask->outputStatus);
+ qDebug("s-task:%s start to dispatch msg, set output status:%d", pTask->id.idStr, pTask->outputStatus);
SStreamDataBlock* pDispatchedBlock = streamQueueNextItem(pTask->outputQueue);
if (pDispatchedBlock == NULL) {
diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c
index 716b939e5f..46290c306f 100644
--- a/source/libs/stream/src/streamExec.c
+++ b/source/libs/stream/src/streamExec.c
@@ -17,10 +17,10 @@
// maximum allowed processed block batches. One block may include several submit blocks
#define MAX_STREAM_EXEC_BATCH_NUM 32
-#define MIN_STREAM_EXEC_BATCH_NUM 8
+#define MIN_STREAM_EXEC_BATCH_NUM 4
#define MAX_STREAM_RESULT_DUMP_THRESHOLD 100
-static int32_t updateCheckPointInfo (SStreamTask* pTask);
+static int32_t updateCheckPointInfo(SStreamTask* pTask);
bool streamTaskShouldStop(const SStreamStatus* pStatus) {
int32_t status = atomic_load_8((int8_t*)&pStatus->taskStatus);
@@ -44,14 +44,16 @@ static int32_t doDumpResult(SStreamTask* pTask, SStreamQueueItem* pItem, SArray*
if (numOfBlocks > 0) {
SStreamDataBlock* pStreamBlocks = createStreamBlockFromResults(pItem, pTask, size, pRes);
if (pStreamBlocks == NULL) {
+ qError("s-task:%s failed to create result stream data block, code:%s", pTask->id.idStr, tstrerror(terrno));
taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes);
return -1;
}
- qDebug("s-task:%s dump stream result data blocks, num:%d, size:%.2fMiB", pTask->id.idStr, numOfBlocks, size/1048576.0);
+ qDebug("s-task:%s dump stream result data blocks, num:%d, size:%.2fMiB", pTask->id.idStr, numOfBlocks,
+ size / 1048576.0);
code = streamTaskOutputResultBlock(pTask, pStreamBlocks);
- if (code == TSDB_CODE_UTIL_QUEUE_OUT_OF_MEMORY) { // back pressure and record position
+ if (code == TSDB_CODE_UTIL_QUEUE_OUT_OF_MEMORY) { // back pressure and record position
destroyStreamDataBlock(pStreamBlocks);
return -1;
}
@@ -65,7 +67,8 @@ static int32_t doDumpResult(SStreamTask* pTask, SStreamQueueItem* pItem, SArray*
return TSDB_CODE_SUCCESS;
}
-static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, int64_t* totalSize, int32_t* totalBlocks) {
+static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, int64_t* totalSize,
+ int32_t* totalBlocks) {
int32_t code = TSDB_CODE_SUCCESS;
void* pExecutor = pTask->exec.pExecutor;
@@ -82,7 +85,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, i
}
if (streamTaskShouldStop(&pTask->status)) {
- taosArrayDestroy(pRes); // memory leak
+ taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes);
return 0;
}
@@ -99,9 +102,8 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, i
if (output == NULL) {
if (pItem->type == STREAM_INPUT__DATA_RETRIEVE) {
- SSDataBlock block = {0};
-
- const SStreamDataBlock* pRetrieveBlock = (const SStreamDataBlock*) pItem;
+ SSDataBlock block = {0};
+ const SStreamDataBlock* pRetrieveBlock = (const SStreamDataBlock*)pItem;
ASSERT(taosArrayGetSize(pRetrieveBlock->blocks) == 1);
assignOneDataBlock(&block, taosArrayGet(pRetrieveBlock->blocks, 0));
@@ -132,7 +134,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, i
taosArrayPush(pRes, &block);
- qDebug("s-task:%s (child %d) executed and get block, total blocks:%d, size:%.2fMiB", pTask->id.idStr,
+ qDebug("s-task:%s (child %d) executed and get %d result blocks, size:%.2fMiB", pTask->id.idStr,
pTask->selfChildId, numOfBlocks, size / 1048576.0);
// current output should be dispatched to down stream nodes
@@ -153,7 +155,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, SStreamQueueItem* pItem, i
ASSERT(numOfBlocks == taosArrayGetSize(pRes));
code = doDumpResult(pTask, pItem, pRes, size, totalSize, totalBlocks);
} else {
- taosArrayDestroy(pRes);
+ taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes);
}
return code;
@@ -235,11 +237,11 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) {
taosFreeQitem(qRes);
return code;
}
-
- if (pTask->outputType == TASK_OUTPUT__FIXED_DISPATCH || pTask->outputType == TASK_OUTPUT__SHUFFLE_DISPATCH) {
- qDebug("s-task:%s scan exec dispatch blocks:%d", pTask->id.idStr, batchCnt);
- streamDispatchStreamBlock(pTask);
- }
+//
+// if (pTask->outputType == TASK_OUTPUT__FIXED_DISPATCH || pTask->outputType == TASK_OUTPUT__SHUFFLE_DISPATCH) {
+// qDebug("s-task:%s scan exec dispatch blocks:%d", pTask->id.idStr, batchCnt);
+// streamDispatchStreamBlock(pTask);
+// }
if (finished) {
break;
@@ -286,7 +288,7 @@ int32_t streamBatchExec(SStreamTask* pTask, int32_t batchLimit) {
}
#endif
-int32_t updateCheckPointInfo (SStreamTask* pTask) {
+int32_t updateCheckPointInfo(SStreamTask* pTask) {
int64_t ckId = 0;
int64_t dataVer = 0;
qGetCheckpointVersion(pTask->exec.pExecutor, &dataVer, &ckId);
@@ -294,7 +296,8 @@ int32_t updateCheckPointInfo (SStreamTask* pTask) {
SCheckpointInfo* pCkInfo = &pTask->chkInfo;
if (ckId > pCkInfo->id) { // save it since the checkpoint is updated
qDebug("s-task:%s exec end, start to update check point, ver from %" PRId64 " to %" PRId64
- ", checkPoint id:%" PRId64 " -> %" PRId64, pTask->id.idStr, pCkInfo->version, dataVer, pCkInfo->id, ckId);
+ ", checkPoint id:%" PRId64 " -> %" PRId64,
+ pTask->id.idStr, pCkInfo->version, dataVer, pCkInfo->id, ckId);
pTask->chkInfo = (SCheckpointInfo){.version = dataVer, .id = ckId, .currentVer = pCkInfo->currentVer};
@@ -314,8 +317,13 @@ int32_t updateCheckPointInfo (SStreamTask* pTask) {
return TSDB_CODE_SUCCESS;
}
+/**
+ * todo: the batch of blocks should be tuned dynamic, according to the total elapsed time of each batch of blocks, the
+ * appropriate batch of blocks should be handled in 5 to 10 sec.
+ */
int32_t streamExecForAll(SStreamTask* pTask) {
- int32_t code = 0;
+ const char* id = pTask->id.idStr;
+
while (1) {
int32_t batchSize = 1;
int16_t times = 0;
@@ -323,7 +331,7 @@ int32_t streamExecForAll(SStreamTask* pTask) {
SStreamQueueItem* pInput = NULL;
// merge multiple input data if possible in the input queue.
- qDebug("s-task:%s start to extract data block from inputQ", pTask->id.idStr);
+ qDebug("s-task:%s start to extract data block from inputQ", id);
while (1) {
if (streamTaskShouldPause(&pTask->status)) {
@@ -338,7 +346,7 @@ int32_t streamExecForAll(SStreamTask* pTask) {
if (qItem == NULL) {
if (pTask->taskLevel == TASK_LEVEL__SOURCE && batchSize < MIN_STREAM_EXEC_BATCH_NUM && times < 5) {
times++;
- taosMsleep(1);
+ taosMsleep(10);
qDebug("===stream===try again batchSize:%d", batchSize);
continue;
}
@@ -363,8 +371,10 @@ int32_t streamExecForAll(SStreamTask* pTask) {
batchSize++;
pInput = newRet;
streamQueueProcessSuccess(pTask->inputQueue);
+
if (batchSize > MAX_STREAM_EXEC_BATCH_NUM) {
- qDebug("maximum batch limit:%d reached, processing, %s", MAX_STREAM_EXEC_BATCH_NUM, pTask->id.idStr);
+ qDebug("s-task:%s batch size limit:%d reached, start to process blocks", id,
+ MAX_STREAM_EXEC_BATCH_NUM);
break;
}
}
@@ -375,7 +385,6 @@ int32_t streamExecForAll(SStreamTask* pTask) {
if (pInput) {
streamFreeQitem(pInput);
}
-
return 0;
}
@@ -385,7 +394,7 @@ int32_t streamExecForAll(SStreamTask* pTask) {
if (pTask->taskLevel == TASK_LEVEL__SINK) {
ASSERT(pInput->type == STREAM_INPUT__DATA_BLOCK);
- qDebug("s-task:%s sink task start to sink %d blocks", pTask->id.idStr, batchSize);
+ qDebug("s-task:%s sink task start to sink %d blocks", id, batchSize);
streamTaskOutputResultBlock(pTask, (SStreamDataBlock*)pInput);
continue;
}
@@ -394,16 +403,16 @@ int32_t streamExecForAll(SStreamTask* pTask) {
while (pTask->taskLevel == TASK_LEVEL__SOURCE) {
int8_t status = atomic_load_8(&pTask->status.taskStatus);
if (status != TASK_STATUS__NORMAL && status != TASK_STATUS__PAUSE) {
- qError("stream task wait for the end of fill history, s-task:%s, status:%d", pTask->id.idStr,
+ qError("stream task wait for the end of fill history, s-task:%s, status:%d", id,
atomic_load_8(&pTask->status.taskStatus));
- taosMsleep(2);
+ taosMsleep(100);
} else {
break;
}
}
int64_t st = taosGetTimestampMs();
- qDebug("s-task:%s start to execute, block batches:%d", pTask->id.idStr, batchSize);
+ qDebug("s-task:%s start to process batch of blocks, num:%d", id, batchSize);
{
// set input
@@ -417,21 +426,21 @@ int32_t streamExecForAll(SStreamTask* pTask) {
ASSERT(pTask->taskLevel == TASK_LEVEL__SOURCE);
const SStreamDataSubmit* pSubmit = (const SStreamDataSubmit*)pInput;
qSetMultiStreamInput(pExecutor, &pSubmit->submit, 1, STREAM_INPUT__DATA_SUBMIT);
- qDebug("s-task:%s set submit blocks as source block completed, %p %p len:%d ver:%" PRId64, pTask->id.idStr, pSubmit,
+ qDebug("s-task:%s set submit blocks as source block completed, %p %p len:%d ver:%" PRId64, id, pSubmit,
pSubmit->submit.msgStr, pSubmit->submit.msgLen, pSubmit->submit.ver);
} else if (pItem->type == STREAM_INPUT__DATA_BLOCK || pItem->type == STREAM_INPUT__DATA_RETRIEVE) {
const SStreamDataBlock* pBlock = (const SStreamDataBlock*)pInput;
SArray* pBlockList = pBlock->blocks;
int32_t numOfBlocks = taosArrayGetSize(pBlockList);
- qDebug("s-task:%s set sdata blocks as input num:%d, ver:%" PRId64, pTask->id.idStr, numOfBlocks, pBlock->sourceVer);
+ qDebug("s-task:%s set sdata blocks as input num:%d, ver:%" PRId64, id, numOfBlocks, pBlock->sourceVer);
qSetMultiStreamInput(pExecutor, pBlockList->pData, numOfBlocks, STREAM_INPUT__DATA_BLOCK);
} else if (pItem->type == STREAM_INPUT__MERGED_SUBMIT) {
const SStreamMergedSubmit* pMerged = (const SStreamMergedSubmit*)pInput;
SArray* pBlockList = pMerged->submits;
int32_t numOfBlocks = taosArrayGetSize(pBlockList);
- qDebug("s-task:%s %p set submit input (merged), batch num:%d", pTask->id.idStr, pTask, numOfBlocks);
+ qDebug("s-task:%s %p set (merged) submit blocks as a batch, numOfBlocks:%d", id, pTask, numOfBlocks);
qSetMultiStreamInput(pExecutor, pBlockList->pData, numOfBlocks, STREAM_INPUT__MERGED_SUBMIT);
} else if (pItem->type == STREAM_INPUT__REF_DATA_BLOCK) {
const SStreamRefDataBlock* pRefBlock = (const SStreamRefDataBlock*)pInput;
@@ -446,7 +455,8 @@ int32_t streamExecForAll(SStreamTask* pTask) {
streamTaskExecImpl(pTask, pInput, &resSize, &totalBlocks);
double el = (taosGetTimestampMs() - st) / 1000.0;
- qDebug("s-task:%s exec end, elapsed time:%.2fs, result size:%.2fMiB, numOfBlocks:%d", pTask->id.idStr, el, resSize / 1048576.0, totalBlocks);
+ qDebug("s-task:%s batch of input blocks exec end, elapsed time:%.2fs, result size:%.2fMiB, numOfBlocks:%d",
+ id, el, resSize / 1048576.0, totalBlocks);
streamFreeQitem(pInput);
}
diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c
index 98e63f7f51..8c26052fdb 100644
--- a/source/libs/stream/src/streamMeta.c
+++ b/source/libs/stream/src/streamMeta.c
@@ -205,24 +205,25 @@ int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask) {
// add to the ready tasks hash map, not the restored tasks hash map
int32_t streamMetaAddDeployedTask(SStreamMeta* pMeta, int64_t ver, SStreamTask* pTask) {
- if (pMeta->expandFunc(pMeta->ahandle, pTask, ver) < 0) {
- tFreeStreamTask(pTask);
- return -1;
- }
-
- if (streamMetaSaveTask(pMeta, pTask) < 0) {
- tFreeStreamTask(pTask);
- return -1;
- }
-
- if (streamMetaCommit(pMeta) < 0) {
- tFreeStreamTask(pTask);
- return -1;
- }
-
void* p = taosHashGet(pMeta->pTasks, &pTask->id.taskId, sizeof(pTask->id.taskId));
if (p == NULL) {
+ if (pMeta->expandFunc(pMeta->ahandle, pTask, ver) < 0) {
+ tFreeStreamTask(pTask);
+ return -1;
+ }
+
+ if (streamMetaSaveTask(pMeta, pTask) < 0) {
+ tFreeStreamTask(pTask);
+ return -1;
+ }
+
+ if (streamMetaCommit(pMeta) < 0) {
+ tFreeStreamTask(pTask);
+ return -1;
+ }
taosArrayPush(pMeta->pTaskList, &pTask->id.taskId);
+ } else {
+ return 0;
}
taosHashPut(pMeta->pTasks, &pTask->id.taskId, sizeof(pTask->id.taskId), &pTask, POINTER_BYTES);
@@ -359,22 +360,29 @@ int32_t streamLoadTasks(SStreamMeta* pMeta, int64_t ver) {
tDecodeStreamTask(&decoder, pTask);
tDecoderClear(&decoder);
- if (pMeta->expandFunc(pMeta->ahandle, pTask, pTask->chkInfo.version) < 0) {
+ // remove duplicate
+ void* p = taosHashGet(pMeta->pTasks, &pTask->id.taskId, sizeof(pTask->id.taskId));
+ if (p == NULL) {
+ if (pMeta->expandFunc(pMeta->ahandle, pTask, pTask->chkInfo.version) < 0) {
+ tdbFree(pKey);
+ tdbFree(pVal);
+ tdbTbcClose(pCur);
+ taosMemoryFree(pTask);
+ return -1;
+ }
+ taosArrayPush(pMeta->pTaskList, &pTask->id.taskId);
+ } else {
tdbFree(pKey);
tdbFree(pVal);
tdbTbcClose(pCur);
- return -1;
+ taosMemoryFree(pTask);
+ continue;
}
-
- void* p = taosHashGet(pMeta->pTasks, &pTask->id.taskId, sizeof(pTask->id.taskId));
- if (p == NULL) {
- taosArrayPush(pMeta->pTaskList, &pTask->id.taskId);
- }
-
if (taosHashPut(pMeta->pTasks, &pTask->id.taskId, sizeof(pTask->id.taskId), &pTask, sizeof(void*)) < 0) {
tdbFree(pKey);
tdbFree(pVal);
tdbTbcClose(pCur);
+ taosMemoryFree(pTask);
return -1;
}
diff --git a/source/libs/stream/src/streamUpdate.c b/source/libs/stream/src/streamUpdate.c
index fff666ec9f..85be120dbd 100644
--- a/source/libs/stream/src/streamUpdate.c
+++ b/source/libs/stream/src/streamUpdate.c
@@ -20,9 +20,9 @@
#include "ttime.h"
#define DEFAULT_FALSE_POSITIVE 0.01
-#define DEFAULT_BUCKET_SIZE 1310720
-#define DEFAULT_MAP_CAPACITY 1310720
-#define DEFAULT_MAP_SIZE (DEFAULT_MAP_CAPACITY * 10)
+#define DEFAULT_BUCKET_SIZE 131072
+#define DEFAULT_MAP_CAPACITY 131072
+#define DEFAULT_MAP_SIZE (DEFAULT_MAP_CAPACITY * 100)
#define ROWS_PER_MILLISECOND 1
#define MAX_NUM_SCALABLE_BF 100000
#define MIN_NUM_SCALABLE_BF 10
@@ -44,8 +44,8 @@ static void windowSBfAdd(SUpdateInfo *pInfo, uint64_t count) {
}
}
-static void clearItemHelper(void* p) {
- SScalableBf** pBf = p;
+static void clearItemHelper(void *p) {
+ SScalableBf **pBf = p;
tScalableBfDestroy(*pBf);
}
@@ -274,7 +274,7 @@ void updateInfoDestoryColseWinSBF(SUpdateInfo *pInfo) {
}
int32_t updateInfoSerialize(void *buf, int32_t bufLen, const SUpdateInfo *pInfo) {
- if(!pInfo) {
+ if (!pInfo) {
return 0;
}
diff --git a/source/libs/stream/src/tstreamFileState.c b/source/libs/stream/src/tstreamFileState.c
index f531f65565..bc84509728 100644
--- a/source/libs/stream/src/tstreamFileState.c
+++ b/source/libs/stream/src/tstreamFileState.c
@@ -16,12 +16,12 @@
#include "tstreamFileState.h"
#include "query.h"
+#include "storageapi.h"
#include "streamBackendRocksdb.h"
#include "taos.h"
#include "tcommon.h"
#include "thash.h"
#include "tsimplehash.h"
-#include "storageapi.h"
#define FLUSH_RATIO 0.5
#define FLUSH_NUM 4
@@ -137,7 +137,7 @@ void clearExpiredRowBuff(SStreamFileState* pFileState, TSKEY ts, bool all) {
SListNode* pNode = NULL;
while ((pNode = tdListNext(&iter)) != NULL) {
SRowBuffPos* pPos = *(SRowBuffPos**)(pNode->data);
- if (all || (pFileState->getTs(pPos->pKey) < ts)) {
+ if (all || (pFileState->getTs(pPos->pKey) < ts && !pPos->beUsed)) {
ASSERT(pPos->pRowBuff != NULL);
tdListAppend(pFileState->freeBuffs, &(pPos->pRowBuff));
pPos->pRowBuff = NULL;
@@ -416,10 +416,13 @@ int32_t deleteExpiredCheckPoint(SStreamFileState* pFileState, TSKEY mark) {
int32_t len = 0;
memcpy(buf, taskKey, strlen(taskKey));
code = streamDefaultGet_rocksdb(pFileState->pFileStore, buf, &val, &len);
- if (code != 0) {
+ if (code != 0 || len == 0 || val == NULL) {
return TSDB_CODE_FAILED;
}
- sscanf(val, "%" PRId64 "", &maxCheckPointId);
+ memcpy(val, buf, len);
+ buf[len] = 0;
+ maxCheckPointId = atol((char*)buf);
+ taosMemoryFree(val);
}
for (int64_t i = maxCheckPointId; i > 0; i--) {
char buf[128] = {0};
@@ -430,13 +433,16 @@ int32_t deleteExpiredCheckPoint(SStreamFileState* pFileState, TSKEY mark) {
if (code != 0) {
return TSDB_CODE_FAILED;
}
+ memcpy(val, buf, len);
+ buf[len] = 0;
+ taosMemoryFree(val);
+
TSKEY ts;
- sscanf(val, "%" PRId64 "", &ts);
+ ts = atol((char*)buf);
if (ts < mark) {
// statekey winkey.ts < mark
forceRemoveCheckpoint(pFileState, i);
break;
- } else {
}
}
return code;
diff --git a/source/libs/wal/src/walRead.c b/source/libs/wal/src/walRead.c
index 0eb3d6ef09..1223e3756c 100644
--- a/source/libs/wal/src/walRead.c
+++ b/source/libs/wal/src/walRead.c
@@ -333,7 +333,7 @@ static int32_t walFetchBodyNew(SWalReader *pReader) {
return -1;
}
- wDebug("vgId:%d, index:%" PRId64 " is fetched, cursor advance", pReader->pWal->cfg.vgId, ver);
+ wDebug("vgId:%d, index:%" PRId64 " is fetched, type:%d, cursor advance", pReader->pWal->cfg.vgId, ver, pReader->pHead->head.msgType);
pReader->curVersion = ver + 1;
return 0;
}
diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task
index 495eae3f2e..a81209b835 100644
--- a/tests/parallel_test/cases.task
+++ b/tests/parallel_test/cases.task
@@ -497,6 +497,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/db.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqError.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/schema.py
+,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilterWhere.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbFilter.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py
@@ -563,7 +564,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/user_privilege.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/fsync.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/multilevel.py
-#,,n,system-test,python3 ./test.py -f 0-others/compatibility.py
+,,n,system-test,python3 ./test.py -f 0-others/compatibility.py
,,n,system-test,python3 ./test.py -f 0-others/tag_index_basic.py
,,n,system-test,python3 ./test.py -f 0-others/udfpy_main.py
,,n,system-test,python3 ./test.py -N 3 -f 0-others/walRetention.py
diff --git a/tests/script/tsim/tmq/topic.sim b/tests/script/tsim/tmq/topic.sim
index 0bf0873e9f..78c4c561af 100644
--- a/tests/script/tsim/tmq/topic.sim
+++ b/tests/script/tsim/tmq/topic.sim
@@ -108,4 +108,15 @@ if $rows != 6 then
return -1
endi
+sql create topic topic_stable_1 as stable stb where t1 > 0
+sql create topic topic_stable_2 as stable stb where t1 > 0 and t1 < 0
+sql create topic topic_stable_3 as stable stb where 1 > 0
+sql create topic topic_stable_4 as stable stb where abs(t1) > 0
+sql_error create topic topic_stable_5 as stable stb where last(t1) > 0
+sql_error create topic topic_stable_5 as stable stb where sum(t1) > 0
+sql create topic topic_stable_6 as stable stb where tbname is not null
+sql create topic topic_stable_7 as stable stb where tbname > 'a'
+sql_error create topic topic_stable_8 as stable stb where tbname > 0 and xx < 0
+sql_error create topic topic_stable_9 as stable stb where tbname > 0 and c1 < 0
+
system sh/exec.sh -n dnode1 -s stop -x SIGINT
diff --git a/tests/system-test/1-insert/manyVgroups.json b/tests/system-test/1-insert/manyVgroups.json
index 3b0fa96b08..8c6f39cf96 100644
--- a/tests/system-test/1-insert/manyVgroups.json
+++ b/tests/system-test/1-insert/manyVgroups.json
@@ -11,7 +11,7 @@
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 0,
- "num_of_records_per_req": 100000,
+ "num_of_records_per_req": 10000,
"databases": [
{
"dbinfo": {
@@ -73,4 +73,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/tests/system-test/7-tmq/stbFilterWhere.py b/tests/system-test/7-tmq/stbFilterWhere.py
new file mode 100644
index 0000000000..8d8d046cef
--- /dev/null
+++ b/tests/system-test/7-tmq/stbFilterWhere.py
@@ -0,0 +1,227 @@
+
+import taos
+import sys
+import time
+import socket
+import os
+import threading
+
+from util.log import *
+from util.sql import *
+from util.cases import *
+from util.dnodes import *
+from util.common import *
+sys.path.append("./7-tmq")
+from tmqCommon import *
+
+class TDTestCase:
+ def init(self, conn, logSql, replicaVar=1):
+ self.replicaVar = int(replicaVar)
+ tdLog.debug(f"start to excute {__file__}")
+ tdSql.init(conn.cursor())
+ #tdSql.init(conn.cursor(), logSql) # output sql.txt file
+
+ def prepareTestEnv(self):
+ tdLog.printNoPrefix("======== prepare test env include database, stable, ctables, and insert data: ")
+ paraDict = {'dbName': 'dbt',
+ 'dropFlag': 1,
+ 'event': '',
+ 'vgroups': 4,
+ 'replica': 1,
+ 'stbName': 'stb',
+ 'colPrefix': 'c',
+ 'tagPrefix': 't',
+ 'colSchema': [{'type': 'INT', 'count':2}, {'type': 'binary', 'len':20, 'count':1}],
+ 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}],
+ 'ctbPrefix': 'ctb',
+ 'ctbStartIdx': 0,
+ 'ctbNum': 10,
+ 'rowsPerTbl': 10000,
+ 'batchNum': 100,
+ 'startTs': 1640966400000, # 2022-01-01 00:00:00.000
+ 'pollDelay': 2,
+ 'showMsg': 1,
+ 'showRow': 1}
+
+ tmqCom.initConsumerTable()
+ tmqCom.create_database(tsql=tdSql, dbName=paraDict["dbName"],dropFlag=paraDict["dropFlag"], vgroups=paraDict['vgroups'],replica=paraDict['replica'])
+ tdSql.execute("alter database %s wal_retention_period 3600"%(paraDict["dbName"]))
+ tdLog.info("create stb")
+ tmqCom.create_stable(tdSql, dbName=paraDict["dbName"],stbName=paraDict["stbName"])
+ tdLog.info("create ctb")
+ tmqCom.create_ctable(tdSql, dbName=paraDict["dbName"],stbName=paraDict["stbName"],ctbPrefix=paraDict['ctbPrefix'], ctbNum=paraDict['ctbNum'])
+ tdLog.info("insert data")
+ tmqCom.insert_data_interlaceByMultiTbl(tsql=tdSql,dbName=paraDict["dbName"],ctbPrefix=paraDict["ctbPrefix"],
+ ctbNum=paraDict["ctbNum"],rowsPerTbl=paraDict["rowsPerTbl"],batchNum=paraDict["batchNum"],
+ startTs=paraDict["startTs"],ctbStartIdx=paraDict['ctbStartIdx'])
+ return
+
+ def tmqCase_columnError(self, topicName, condition):
+ tdLog.printNoPrefix("======== test case error: ")
+ paraDict = {'dbName': 'dbt',
+ 'dropFlag': 1,
+ 'event': '',
+ 'vgroups': 4,
+ 'replica': 1,
+ 'stbName': 'stb',
+ 'colPrefix': 'c',
+ 'tagPrefix': 't',
+ 'colSchema': [{'type': 'INT', 'count':2}, {'type': 'binary', 'len':20, 'count':1}],
+ 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}],
+ 'ctbPrefix': 'ctb',
+ 'ctbStartIdx': 0,
+ 'ctbNum': 10,
+ 'rowsPerTbl': 10000,
+ 'batchNum': 100,
+ 'startTs': 1640966400000, # 2022-01-01 00:00:00.000
+ 'pollDelay': 2,
+ 'showMsg': 1,
+ 'showRow': 1}
+
+ tdLog.info("create topics from stb with column filter")
+ topicString = "create topic %s as stable %s.%s where %s" %(topicName, paraDict['dbName'], paraDict['stbName'], condition)
+ tdLog.info("create topic sql: %s"%topicString)
+ tdSql.error(topicString)
+
+ def tmqCase(self, topicName, condition):
+ tdLog.printNoPrefix("======== test case: ")
+ paraDict = {'dbName': 'dbt',
+ 'dropFlag': 1,
+ 'event': '',
+ 'vgroups': 4,
+ 'replica': 1,
+ 'stbName': 'stb',
+ 'colPrefix': 'c',
+ 'tagPrefix': 't',
+ 'colSchema': [{'type': 'INT', 'count':2}, {'type': 'binary', 'len':20, 'count':1}],
+ 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}],
+ 'ctbPrefix': 'ctb',
+ 'ctbStartIdx': 0,
+ 'ctbNum': 10,
+ 'rowsPerTbl': 10000,
+ 'batchNum': 100,
+ 'startTs': 1640966400000, # 2022-01-01 00:00:00.000
+ 'pollDelay': 2,
+ 'showMsg': 1,
+ 'showRow': 1}
+
+ expectRowsList = []
+ tmqCom.initConsumerTable()
+
+ tdLog.info("create topics from stb with tag filter")
+ topicString = "create topic %s as stable %s.%s where %s" %(topicName, paraDict['dbName'], paraDict['stbName'], condition)
+ tdLog.info("create topic sql: %s"%topicString)
+ tdSql.execute(topicString)
+
+ queryString = "select * from %s.%s where %s" %(paraDict['dbName'], paraDict['stbName'], condition)
+ tdSql.query(queryString)
+ expectRowsList.append(tdSql.getRows())
+
+ # init consume info, and start tmq_sim, then check consume result
+ tdLog.info("insert consume info to consume processor")
+ consumerId = 0
+ expectrowcnt = paraDict["rowsPerTbl"] * paraDict["ctbNum"]
+ topicList = topicName
+ ifcheckdata = 0
+ ifManualCommit = 1
+ keyList = 'group.id:cgrp1, enable.auto.commit:false, auto.commit.interval.ms:6000, auto.offset.reset:earliest'
+ tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
+
+ tdLog.info("start consume processor")
+ tmqCom.startTmqSimProcess(paraDict['pollDelay'],paraDict["dbName"],paraDict['showMsg'], paraDict['showRow'])
+
+ tdLog.info("wait the consume result")
+ expectRows = 1
+ resultList = tmqCom.selectConsumeResult(expectRows)
+
+ if expectRowsList[0] != resultList[0]:
+ tdLog.info("expect consume rows: %d, act consume rows: %d"%(expectRowsList[0], resultList[0]))
+ tdLog.exit("0 tmq consume rows error!")
+
+ tdLog.printNoPrefix("======== test case end ...... ")
+
+ def tmqCase_addNewTable_dropTag(self, topicName, condition):
+ tdLog.printNoPrefix("======== test case1: ")
+ paraDict = {'dbName': 'dbt',
+ 'dropFlag': 1,
+ 'event': '',
+ 'vgroups': 4,
+ 'replica': 1,
+ 'stbName': 'stb',
+ 'colPrefix': 'c',
+ 'tagPrefix': 't',
+ 'colSchema': [{'type': 'INT', 'count':2}, {'type': 'binary', 'len':20, 'count':1}],
+ 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}],
+ 'ctbPrefix': 'ctb',
+ 'ctbStartIdx': 0,
+ 'ctbNum': 10,
+ 'rowsPerTbl': 10000,
+ 'batchNum': 100,
+ 'startTs': 1640966400000, # 2022-01-01 00:00:00.000
+ 'pollDelay': 2,
+ 'showMsg': 1,
+ 'showRow': 1}
+
+ expectRowsList = []
+ tmqCom.initConsumerTable()
+
+ tdLog.info("create topics from stb with tag filter")
+ topicString = "create topic %s as stable %s.%s where %s" %(topicName, paraDict['dbName'], paraDict['stbName'], condition)
+ tdLog.info("create topic sql: %s"%topicString)
+ tdSql.execute(topicString)
+
+ queryString = "select * from %s.%s where %s" %(paraDict['dbName'], paraDict['stbName'], condition)
+ tdSql.query(queryString)
+ expectRowsList.append(tdSql.getRows() + 1)
+
+ # init consume info, and start tmq_sim, then check consume result
+ tdLog.info("insert consume info to consume processor")
+ consumerId = 0
+ expectrowcnt = paraDict["rowsPerTbl"] * paraDict["ctbNum"]
+ topicList = topicName
+ ifcheckdata = 0
+ ifManualCommit = 1
+ keyList = 'group.id:cgrp1, enable.auto.commit:false, auto.commit.interval.ms:6000, auto.offset.reset:earliest'
+ tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
+
+ tdLog.info("start consume processor")
+ tmqCom.startTmqSimProcess(paraDict['pollDelay'],paraDict["dbName"],paraDict['showMsg'], paraDict['showRow'])
+
+ #add new table with one data
+ tdLog.info("start insert data")
+ insertString = "insert into %s.tmp using %s.%s tags(1, 1, 1, 't4', 't5') values(now, 1, 1, 1, 'c4', 'c5', now)" %(paraDict['dbName'], paraDict['dbName'], paraDict['stbName'])
+ tdSql.execute(insertString)
+
+ #test drop tag
+ tdSql.error("alter stable %s.%s drop tag t1" %(paraDict['dbName'], paraDict['stbName']))
+ tdSql.execute("alter stable %s.%s drop tag t2" %(paraDict['dbName'], paraDict['stbName']))
+ tdSql.execute("alter stable %s.%s drop column c2" %(paraDict['dbName'], paraDict['stbName']))
+
+ tdLog.info("wait the consume result")
+ expectRows = 1
+ resultList = tmqCom.selectConsumeResult(expectRows)
+
+ if expectRowsList[0] != resultList[0]:
+ tdLog.info("expect consume rows: %d, act consume rows: %d"%(expectRowsList[0], resultList[0]))
+ tdLog.exit("0 tmq consume rows error!")
+
+ tdLog.printNoPrefix("======== test case1 end ...... ")
+
+ def run(self):
+ tdSql.prepare()
+ self.prepareTestEnv()
+ self.tmqCase_columnError("t1", "c1 = 4 and t1 = 3")
+ self.tmqCase("t2", "2 > 1")
+ self.tmqCase("t3", "t4 = 'beijing'")
+ self.tmqCase("t4", "t4 > t3")
+ self.tmqCase("t5", "t3 = t4")
+ self.tmqCase_addNewTable_dropTag("t6", "t1 = 1")
+
+ def stop(self):
+ tdSql.close()
+ tdLog.success(f"{__file__} successfully executed")
+
+event = threading.Event()
+
+tdCases.addLinux(__file__, TDTestCase())
+tdCases.addWindows(__file__, TDTestCase())