From a60c30dbbac68d05ef9d9fae2301f379b8e72f69 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sun, 28 Jul 2024 23:19:03 +0800 Subject: [PATCH] fix(query): fix error. --- include/common/ttime.h | 2 +- include/util/tsimplehash.h | 5 +---- source/libs/executor/src/tsort.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/common/ttime.h b/include/common/ttime.h index cec5b15761..d430f7bd2a 100644 --- a/include/common/ttime.h +++ b/include/common/ttime.h @@ -64,7 +64,7 @@ static FORCE_INLINE int64_t taosGetTimestampToday(int32_t precision) { : 1000000000; time_t t = taosTime(NULL); struct tm tm; - taosLocalTime(&t, &tm, NULL); + (void) taosLocalTime(&t, &tm, NULL); tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; diff --git a/include/util/tsimplehash.h b/include/util/tsimplehash.h index 987a9fe2a8..4a8a9ced58 100644 --- a/include/util/tsimplehash.h +++ b/include/util/tsimplehash.h @@ -17,15 +17,12 @@ #define TDENGINE_TSIMPLEHASH_H #include "tarray.h" +#include "thash.h" #ifdef __cplusplus extern "C" { #endif -typedef uint32_t (*_hash_fn_t)(const char *, uint32_t); -typedef int32_t (*_equal_fn_t)(const void *, const void *, size_t len); -typedef void (*_hash_free_fn_t)(void *); - /** * @brief single thread hash * diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c index 1e345e9700..fa7d59e137 100644 --- a/source/libs/executor/src/tsort.c +++ b/source/libs/executor/src/tsort.c @@ -677,7 +677,7 @@ static int32_t adjustMergeTreeForNextTuple(SSortSource* pSource, SMultiwayMergeT } int32_t* pPgId = taosArrayGet(pSource->pageIdList, pSource->pageIndex); - if (pPgId) { + if (pPgId == NULL) { return terrno; }