diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 62c61dd39718a2bef7c1ed001c211f9fbd1be850..adcd47029c3e5f6c030ad6b5646c083b05e3001c 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -1615,16 +1615,6 @@ static STableLoadInfo *getTableLoadInfo(SCacheRowsReader *pReader, uint64_t uid) return pInfo; } -static int32_t uidComparFunc(const void *p1, const void *p2) { - uint64_t pu1 = *(uint64_t *)p1; - uint64_t pu2 = *(uint64_t *)p2; - if (pu1 == pu2) { - return 0; - } else { - return (pu1 < pu2) ? -1 : 1; - } -} - static uint64_t *getUidList(SCacheRowsReader *pReader) { if (!pReader->uidList) { int32_t numOfTables = pReader->numOfTables; diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c index 635a74d8dd77f4a0e90bee9a5953c1538e8e292c..d560f0d5af7a00b775cd22a3f73380dd39918c59 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.c @@ -22,7 +22,7 @@ #include "tsdbUtil2.h" #include "tsimplehash.h" -static int32_t uidComparFunc(const void* p1, const void* p2) { +int32_t uidComparFunc(const void* p1, const void* p2) { uint64_t pu1 = *(uint64_t*)p1; uint64_t pu2 = *(uint64_t*)p2; if (pu1 == pu2) { diff --git a/source/dnode/vnode/src/tsdb/tsdbReadUtil.h b/source/dnode/vnode/src/tsdb/tsdbReadUtil.h index 5c4737440d78afe8750cb2d2d7398bafc68b5c5e..3bb7b8f3a573984ca81713bcd1fc48e2cad25d60 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReadUtil.h +++ b/source/dnode/vnode/src/tsdb/tsdbReadUtil.h @@ -215,6 +215,8 @@ typedef struct SBrinRecordIter { SBrinRecord record; } SBrinRecordIter; +int32_t uidComparFunc(const void* p1, const void* p2); + STableBlockScanInfo* getTableBlockScanInfo(SSHashObj* pTableMap, uint64_t uid, const char* id); SSHashObj* createDataBlockScanInfo(STsdbReader* pTsdbReader, SBlockInfoBuf* pBuf, const STableKeyInfo* idList,