From 64790e4de963c1a9dffac6db721c1e41a52a08b2 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 14 Apr 2022 16:19:29 +0800 Subject: [PATCH] enh(query): increase the validity check of function parameters --- source/libs/function/src/builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 5dbd442c95..c212a7c719 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -227,7 +227,7 @@ static int32_t translateLength(SFunctionNode* pFunc, char* pErrBuf, int32_t len) return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - pFunc->node.resType = (SDataType) { .bytes = tDataTypes[TSDB_DATA_TYPE_INT].bytes, .type = TSDB_DATA_TYPE_INT }; + pFunc->node.resType = (SDataType) { .bytes = tDataTypes[TSDB_DATA_TYPE_SMALLINT].bytes, .type = TSDB_DATA_TYPE_SMALLINT }; return TSDB_CODE_SUCCESS; } -- GitLab