From ddab67520726ebcd32dbdb0b4236be0296dbff5b Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 28 May 2022 19:41:27 +0800 Subject: [PATCH] set default idx --- source/libs/index/src/indexFilter.c | 4 ++++ source/libs/index/test/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/libs/index/src/indexFilter.c b/source/libs/index/src/indexFilter.c index ab96b2929c..b882caa168 100644 --- a/source/libs/index/src/indexFilter.c +++ b/source/libs/index/src/indexFilter.c @@ -260,6 +260,7 @@ static int32_t sifExecFunction(SFunctionNode *node, SIFCtx *ctx, SIFParam *outpu return TSDB_CODE_QRY_INVALID_INPUT; } static int32_t sifDoIndex(SIFParam *left, SIFParam *right, int8_t operType, SIFParam *output) { +#ifdef USE_INVERTED_INDEX SIndexMetaArg *arg = &output->arg; SIndexTerm * tm = indexTermCreate(arg->suid, DEFAULT, left->colValType, left->colName, strlen(left->colName), right->condValue, strlen(right->condValue)); @@ -276,6 +277,9 @@ static int32_t sifDoIndex(SIFParam *left, SIFParam *right, int8_t operType, SIFP indexDebug("index filter data size: %d", (int)taosArrayGetSize(output->result)); indexMultiTermQueryDestroy(mtm); return ret; +#else + return 0; +#endif } static int32_t sifLessThanFunc(SIFParam *left, SIFParam *right, SIFParam *output) { diff --git a/source/libs/index/test/CMakeLists.txt b/source/libs/index/test/CMakeLists.txt index 0b97fefa3e..040460ae5c 100644 --- a/source/libs/index/test/CMakeLists.txt +++ b/source/libs/index/test/CMakeLists.txt @@ -94,7 +94,7 @@ target_link_libraries (idxJsonUT add_test( NAME idxtest - COMMAND indexTest + COMMAND idxTest ) add_test( NAME idxJsonUT