From 78e8d848555710c37ac430c0a31e3056961cc352 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 19 Jul 2022 16:47:24 +0800 Subject: [PATCH] fix(query): change cast function input limit from 1000->4096 bytes TD-17497 --- source/libs/function/src/builtins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index fcde97ed5f..e8358319d4 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -1646,9 +1646,9 @@ static int32_t translateCast(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (IS_VAR_DATA_TYPE(para2Type)) { para2Bytes -= VARSTR_HEADER_SIZE; } - if (para2Bytes <= 0 || para2Bytes > 1000) { // cast dst var type length limits to 1000 + if (para2Bytes <= 0 || para2Bytes > 4096) { // cast dst var type length limits to 4096 bytes return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, - "CAST function converted length should be in range [0, 1000]"); + "CAST function converted length should be in range [0, 4096] bytes"); } // add database precision as param -- GitLab