diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index e89bc5df0e52940e19bfe69c3d17b46bd79edb02..26422fa61812953db2906ebd0e945df68a8bf287 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -97,6 +97,8 @@ qTaskInfo_t qCreateStreamExecTaskInfo(void* msg, void* streamReadHandle) { pMsg->contentLen = pMsg->contentLen; #endif + qDebugL("stream task string %s", (const char*)msg); + struct SSubplan* plan = NULL; int32_t code = qStringToSubplan(msg, &plan); if (code != TSDB_CODE_SUCCESS) { diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index a250df338ae56b3a6f48c3a7fd8f4e4510a22d4d..15e03b9891574ac10322f33f5e9277ace2740181 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -2100,6 +2100,7 @@ static const char* jkSelectStmtHaving = "Having"; static const char* jkSelectStmtOrderBy = "OrderBy"; static const char* jkSelectStmtLimit = "Limit"; static const char* jkSelectStmtSlimit = "Slimit"; +static const char* jkSelectStmtStmtName = "StmtName"; static int32_t selectStmtTojson(const void* pObj, SJson* pJson) { const SSelectStmt* pNode = (const SSelectStmt*)pObj; @@ -2135,6 +2136,9 @@ static int32_t selectStmtTojson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddObject(pJson, jkSelectStmtSlimit, nodeToJson, pNode->pSlimit); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkSelectStmtStmtName, pNode->stmtName); + } return code; } @@ -2173,6 +2177,9 @@ static int32_t jsonToSelectStmt(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = jsonToNodeObject(pJson, jkSelectStmtSlimit, &pNode->pSlimit); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkSelectStmtStmtName, pNode->stmtName); + } return code; }