From 7bbf7c5930bc4de0c46d42060977a8b526be9f51 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 8 Jun 2021 16:08:48 +0800 Subject: [PATCH] [td-255] fix bugs found by regression test. --- src/query/src/qAggMain.c | 2 +- src/query/src/qExecutor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index 96eaeb48cf..472f3f8fe1 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -5287,7 +5287,7 @@ SAggFunctionInfo aAggs[] = {{ }, { // 17 - "ts_dummy", + "ts", TSDB_FUNC_TS_DUMMY, TSDB_FUNC_TS_DUMMY, TSDB_BASE_FUNC_SO | TSDB_FUNCSTATE_NEED_TS, diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 5a0eecb549..8cc25f1fe6 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4573,7 +4573,7 @@ SOperatorInfo* createDataBlocksOptScanInfo(void* pTsdbQueryHandle, SQueryRuntime } SArray* getOrderCheckColumns(SQueryAttr* pQuery) { - int32_t numOfCols = pQuery->pGroupbyExpr->numOfGroupCols; + int32_t numOfCols = pQuery->pGroupbyExpr == NULL? 0: pQuery->pGroupbyExpr->numOfGroupCols; SArray* pOrderColumns = NULL; if (numOfCols > 0) { @@ -4612,7 +4612,7 @@ SArray* getOrderCheckColumns(SQueryAttr* pQuery) { } SArray* getResultGroupCheckColumns(SQueryAttr* pQuery) { - int32_t numOfCols = pQuery->pGroupbyExpr->numOfGroupCols; + int32_t numOfCols = pQuery->pGroupbyExpr == NULL? 0 : pQuery->pGroupbyExpr->numOfGroupCols; SArray* pOrderColumns = NULL; if (numOfCols > 0) { -- GitLab