remove scalar function check to allow agg function execute

This commit is contained in:
Ganlin Zhao 2022-07-13 18:14:27 +08:00
parent dd8f235e97
commit 099f2d2c98
1 changed files with 6 additions and 5 deletions

View File

@ -700,9 +700,9 @@ EDealRes sclRewriteNonConstOperator(SNode** pNode, SScalarCtx *ctx) {
EDealRes sclRewriteFunction(SNode** pNode, SScalarCtx *ctx) { EDealRes sclRewriteFunction(SNode** pNode, SScalarCtx *ctx) {
SFunctionNode *node = (SFunctionNode *)*pNode; SFunctionNode *node = (SFunctionNode *)*pNode;
SNode* tnode = NULL; SNode* tnode = NULL;
if (!fmIsScalarFunc(node->funcId)) { //if (!fmIsScalarFunc(node->funcId)) {
return DEAL_RES_CONTINUE; // return DEAL_RES_CONTINUE;
} //}
FOREACH(tnode, node->pParameterList) { FOREACH(tnode, node->pParameterList) {
if (!SCL_IS_CONST_NODE(tnode)) { if (!SCL_IS_CONST_NODE(tnode)) {
@ -728,8 +728,9 @@ EDealRes sclRewriteFunction(SNode** pNode, SScalarCtx *ctx) {
res->translate = true; res->translate = true;
if (colDataIsNull_s(output.columnData, 0)) { if (colDataIsNull_s(output.columnData, 0)) {
res->node.resType.type = TSDB_DATA_TYPE_NULL; res->isNull = true;
res->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_NULL].bytes; //res->node.resType.type = TSDB_DATA_TYPE_NULL;
//res->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_NULL].bytes;
} else { } else {
res->node.resType.type = output.columnData->info.type; res->node.resType.type = output.columnData->info.type;
res->node.resType.bytes = output.columnData->info.bytes; res->node.resType.bytes = output.columnData->info.bytes;