diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 781b1be76f7e83d4c3e312ca6f83c344c80a4c08..bb2b8f3c520880c3cbe97d975f44ff05ab40bd40 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -7052,6 +7052,10 @@ static int32_t checkUpdateTagPrjFunctions(SQueryInfo* pQueryInfo, char* msg) { continue; } + if(functionId == TSDB_FUNC_DERIVATIVE){ // to avoid ts function id was modufied below + tagTsColExists = false; + } + if (functionId < 0) { SUdfInfo* pUdfInfo = taosArrayGet(pQueryInfo->pUdfInfo, -1 * functionId - 1); if (pUdfInfo->funcType == TSDB_UDF_TYPE_AGGREGATE) {