diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 47efc29031b972818fbc540150613b61c0b199c5..c23ba15d44928bb4023c5615edb792f81b1de3d5 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2701,8 +2701,11 @@ int32_t tscExprTopBottomIndex(SQueryInfo* pQueryInfo){ SExprInfo* pExpr = tscExprGet(pQueryInfo, i); if (pExpr == NULL) continue; - if (pExpr->base.functionId == TSDB_FUNC_TOP || pExpr->base.functionId == TSDB_FUNC_BOTTOM - || pExpr->base.functionId == TSDB_FUNC_UNIQUE || pExpr->base.functionId == TSDB_FUNC_TAIL) { + if (pExpr->base.functionId == TSDB_FUNC_TOP + || pExpr->base.functionId == TSDB_FUNC_BOTTOM + || pExpr->base.functionId == TSDB_FUNC_SAMPLE + || pExpr->base.functionId == TSDB_FUNC_UNIQUE + || pExpr->base.functionId == TSDB_FUNC_TAIL) { return i; } }