提交 f72c1ce8 编写于 作者: X Xiaoyu Wang

enh: format code

上级 cc231653
...@@ -2371,6 +2371,7 @@ static const char* jkSelectStmtOrderBy = "OrderBy"; ...@@ -2371,6 +2371,7 @@ static const char* jkSelectStmtOrderBy = "OrderBy";
static const char* jkSelectStmtLimit = "Limit"; static const char* jkSelectStmtLimit = "Limit";
static const char* jkSelectStmtSlimit = "Slimit"; static const char* jkSelectStmtSlimit = "Slimit";
static const char* jkSelectStmtStmtName = "StmtName"; static const char* jkSelectStmtStmtName = "StmtName";
static const char* jkSelectStmtHasAggFuncs = "HasAggFuncs";
static int32_t selectStmtTojson(const void* pObj, SJson* pJson) { static int32_t selectStmtTojson(const void* pObj, SJson* pJson) {
const SSelectStmt* pNode = (const SSelectStmt*)pObj; const SSelectStmt* pNode = (const SSelectStmt*)pObj;
...@@ -2409,6 +2410,9 @@ static int32_t selectStmtTojson(const void* pObj, SJson* pJson) { ...@@ -2409,6 +2410,9 @@ static int32_t selectStmtTojson(const void* pObj, SJson* pJson) {
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = tjsonAddStringToObject(pJson, jkSelectStmtStmtName, pNode->stmtName); code = tjsonAddStringToObject(pJson, jkSelectStmtStmtName, pNode->stmtName);
} }
if (TSDB_CODE_SUCCESS == code) {
code = tjsonAddBoolToObject(pJson, jkSelectStmtHasAggFuncs, pNode->hasAggFuncs);
}
return code; return code;
} }
...@@ -2450,6 +2454,9 @@ static int32_t jsonToSelectStmt(const SJson* pJson, void* pObj) { ...@@ -2450,6 +2454,9 @@ static int32_t jsonToSelectStmt(const SJson* pJson, void* pObj) {
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = tjsonGetStringValue(pJson, jkSelectStmtStmtName, pNode->stmtName); code = tjsonGetStringValue(pJson, jkSelectStmtStmtName, pNode->stmtName);
} }
if (TSDB_CODE_SUCCESS == code) {
code = tjsonGetBoolValue(pJson, jkSelectStmtHasAggFuncs, &pNode->hasAggFuncs);
}
return code; return code;
} }
......
...@@ -488,6 +488,8 @@ static int32_t createWindowLogicNodeFinalize(SLogicPlanContext* pCxt, SSelectStm ...@@ -488,6 +488,8 @@ static int32_t createWindowLogicNodeFinalize(SLogicPlanContext* pCxt, SSelectStm
code = createColumnByRewriteExps(pCxt, pWindow->pFuncs, &pWindow->node.pTargets); code = createColumnByRewriteExps(pCxt, pWindow->pFuncs, &pWindow->node.pTargets);
} }
pSelect->hasAggFuncs = false;
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
*pLogicNode = (SLogicNode*)pWindow; *pLogicNode = (SLogicNode*)pWindow;
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册