From 5cc70d58eea5411fba3fdd1de31ee742dac26219 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Thu, 28 Apr 2022 09:22:13 +0800 Subject: [PATCH] fix 2 ts column error when sample and interval --- src/client/src/tscUtil.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 47efc29031..c23ba15d44 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; } } -- GitLab