From c0003de3168d1ab540901e7b4629d8f5f926065c Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 29 Jul 2022 18:26:31 +0800 Subject: [PATCH] fix sim error --- source/libs/index/src/indexFilter.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/libs/index/src/indexFilter.c b/source/libs/index/src/indexFilter.c index e1c8ac0204..1f257bb05f 100644 --- a/source/libs/index/src/indexFilter.c +++ b/source/libs/index/src/indexFilter.c @@ -385,6 +385,15 @@ static int32_t sifDoIndex(SIFParam *left, SIFParam *right, int8_t operType, SIFP .reverse = reverse, .filterFunc = filterFunc}; + char buf[128] = {0}; + if (IS_VAR_DATA_TYPE(left->colValType)) { + if (!IS_VAR_DATA_TYPE(right->colValType)) { + NUM_TO_STRING(right->colValType, right->condValue, sizeof(buf), buf + VARSTR_HEADER_SIZE); + varDataSetLen(buf, strlen(buf + VARSTR_HEADER_SIZE)); + + param.val = buf; + } + } ret = metaFilterTableIds(arg->metaEx, ¶m, output->result); } return ret;