From aaaf87c368d93bb382448fd15d025b68cca5595d Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Fri, 21 Jan 2022 10:27:54 +0800 Subject: [PATCH] [TD-11222]: Histogram function --- src/client/src/tscSQLParser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index cad314af40..f687dab655 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -3416,14 +3416,14 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col cJSON *count = cJSON_GetObjectItem(binDesc, "count"); cJSON *infinity = cJSON_GetObjectItem(binDesc, "infinity"); - if (isinf(start->valuedouble) || isinf(width->valuedouble)) { - return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg23); - } - if (!cJSON_IsNumber(start) || !cJSON_IsNumber(count) || !cJSON_IsBool(infinity)) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg22); } + if (isinf(start->valuedouble) || isinf(width->valuedouble)) { + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg23); + } + counter = count->valueint; if (infinity->valueint == false) { startIndex = 0; -- GitLab