From 75ed474f0968b90d0ca2d8178f822b7b970cad03 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Fri, 8 Jul 2022 19:55:06 +0800 Subject: [PATCH] ci(stream): add session test --- source/libs/executor/inc/executil.h | 2 ++ source/libs/executor/src/executil.c | 2 +- source/libs/executor/src/timewindowoperator.c | 1 + tests/script/jenkins/basic.txt | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/inc/executil.h b/source/libs/executor/inc/executil.h index 2c8fbe9206..f9aba30a46 100644 --- a/source/libs/executor/inc/executil.h +++ b/source/libs/executor/inc/executil.h @@ -126,4 +126,6 @@ void cleanupQueryTableDataCond(SQueryTableDataCond* pCond); int32_t convertFillType(int32_t mode); +int32_t resultrowComparAsc(const void* p1, const void* p2); + #endif // TDENGINE_QUERYUTIL_H diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index e3579f9dcb..adbfa2c4ba 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -77,7 +77,7 @@ void cleanupGroupResInfo(SGroupResInfo* pGroupResInfo) { pGroupResInfo->index = 0; } -static int32_t resultrowComparAsc(const void* p1, const void* p2) { +int32_t resultrowComparAsc(const void* p1, const void* p2) { SResKeyPos* pp1 = *(SResKeyPos**)p1; SResKeyPos* pp2 = *(SResKeyPos**)p2; diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 64c27fdb28..ed8ea56329 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -3441,6 +3441,7 @@ static int32_t copyUpdateResult(SHashObj* pStUpdated, SArray* pUpdated) { *(int64_t*)pos->key = ((SWinRes*)pData)->ts; taosArrayPush(pUpdated, &pos); } + taosArraySort(pUpdated, resultrowComparAsc); return TSDB_CODE_SUCCESS; } diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 906c2b8792..94414edbf2 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -98,7 +98,7 @@ ./test.sh -f tsim/stream/distributeInterval0.sim # ./test.sh -f tsim/stream/distributeIntervalRetrive0.sim # ./test.sh -f tsim/stream/distributesession0.sim -# ./test.sh -f tsim/stream/session0.sim +./test.sh -f tsim/stream/session0.sim ./test.sh -f tsim/stream/session1.sim # ./test.sh -f tsim/stream/state0.sim ./test.sh -f tsim/stream/triggerInterval0.sim -- GitLab