From bf0a93e8d0414d01da85ad2073c423e3d2c8a3f5 Mon Sep 17 00:00:00 2001 From: slzhou Date: Tue, 25 Oct 2022 15:24:13 +0800 Subject: [PATCH] fix: compute udf funcs with all const arguments on server side --- source/libs/scalar/src/scalar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/scalar/src/scalar.c b/source/libs/scalar/src/scalar.c index 7c59c70f30..70d1bb2685 100644 --- a/source/libs/scalar/src/scalar.c +++ b/source/libs/scalar/src/scalar.c @@ -1085,7 +1085,8 @@ EDealRes sclRewriteNonConstOperator(SNode **pNode, SScalarCtx *ctx) { EDealRes sclRewriteFunction(SNode **pNode, SScalarCtx *ctx) { SFunctionNode *node = (SFunctionNode *)*pNode; SNode *tnode = NULL; - if (!fmIsScalarFunc(node->funcId) && (!ctx->dual)) { + if ((!fmIsScalarFunc(node->funcId) && (!ctx->dual)) || + fmIsUserDefinedFunc(node->funcId)) { return DEAL_RES_CONTINUE; } -- GitLab