diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index d810cf2428..853b2865bb 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1777,6 +1777,19 @@ int32_t createExprFromOneNode(SExprInfo* pExp, SNode* pNode, int16_t slotId) { pExp->base.resSchema = createResSchema(pType->type, pType->bytes, slotId, pType->scale, pType->precision, pCaseNode->node.aliasName); pExp->pExpr->_optrRoot.pRootNode = pNode; + } else if (type == QUERY_NODE_LOGIC_CONDITION) { + pExp->pExpr->nodeType = QUERY_NODE_OPERATOR; + SLogicConditionNode* pCond = (SLogicConditionNode*)pNode; + pExp->base.pParam = taosMemoryCalloc(1, sizeof(SFunctParam)); + if (!pExp->base.pParam) { + code = terrno; + } + if (TSDB_CODE_SUCCESS == code) { + pExp->base.numOfParams = 1; + SDataType* pType = &pCond->node.resType; + pExp->base.resSchema = createResSchema(pType->type, pType->bytes, slotId, pType->scale, pType->precision, pCond->node.aliasName); + pExp->pExpr->_optrRoot.pRootNode = pNode; + } } else { ASSERT(0); } diff --git a/tests/system-test/2-query/project_group.py b/tests/system-test/2-query/project_group.py index 44943e5088..19fe8b1cf0 100644 --- a/tests/system-test/2-query/project_group.py +++ b/tests/system-test/2-query/project_group.py @@ -57,6 +57,8 @@ class TDTestCase: tdSql.query("select * from (select ts, col1 from sta partition by tbname) limit 2"); tdSql.checkRows(2) + tdSql.query('select col1 > 0 and col2 > 0 from stb') + tdSql.checkRows(12) def stop(self): tdSql.close() tdLog.success("%s successfully executed" % __file__)