diff --git a/src/query/src/qPlan.c b/src/query/src/qPlan.c index abfa20714b333754478e5c48b9265f839b05a4b1..913887a65b7be55c585f6abf578631c721a26c5b 100644 --- a/src/query/src/qPlan.c +++ b/src/query/src/qPlan.c @@ -697,6 +697,11 @@ SArray* createGlobalMergePlan(SQueryAttr* pQueryAttr) { taosArrayPush(plan, &op); } + if (pQueryAttr->pExpr2 != NULL) { + op = OP_Project; + taosArrayPush(plan, &op); + } + } else { if (pQueryAttr->pExpr2 != NULL) { op = OP_Project; taosArrayPush(plan, &op);