From a2d75a327cb68a4f59c76c6d2b9a2150880b6eee Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Tue, 18 Apr 2023 08:28:12 +0800 Subject: [PATCH] enhance: udf output column reserve capacity --- source/libs/function/src/udfd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libs/function/src/udfd.c b/source/libs/function/src/udfd.c index 61c6f92e2f..5034af2f82 100644 --- a/source/libs/function/src/udfd.c +++ b/source/libs/function/src/udfd.c @@ -688,6 +688,8 @@ void udfdProcessCallRequest(SUvUdfWork *uvUdf, SUdfRequest *request) { output.colMeta.type = udf->outputType; output.colMeta.precision = 0; output.colMeta.scale = 0; + udfColEnsureCapacity(&output, call->block.info.rows); + SUdfDataBlock input = {0}; convertDataBlockToUdfDataBlock(&call->block, &input); code = udf->scriptPlugin->udfScalarProcFunc(&input, &output, udf->scriptUdfCtx); -- GitLab