fix: add col type
This commit is contained in:
parent
69c4580177
commit
7e5dd50235
|
@ -297,12 +297,15 @@ static int32_t cacheSearchCompareFunc_JSON(void* cache, SIndexTerm* term, SIdxTR
|
|||
cond = MATCH;
|
||||
}
|
||||
} else {
|
||||
if (0 != strncmp(c->colVal, pCt->colVal, skip)) {
|
||||
if (0 != strncmp(c->colVal, pCt->colVal, skip - 1)) {
|
||||
break;
|
||||
} else if (0 != strncmp(c->colVal, pCt->colVal, skip)) {
|
||||
continue;
|
||||
} else {
|
||||
char* p = taosMemoryCalloc(1, strlen(c->colVal) + 1);
|
||||
memcpy(p, c->colVal, strlen(c->colVal));
|
||||
cond = cmpFn(p + skip, term->colVal, dType);
|
||||
}
|
||||
char* p = taosMemoryCalloc(1, strlen(c->colVal) + 1);
|
||||
memcpy(p, c->colVal, strlen(c->colVal));
|
||||
cond = cmpFn(p + skip, term->colVal, dType);
|
||||
}
|
||||
if (cond == MATCH) {
|
||||
if (c->operaType == ADD_VALUE) {
|
||||
|
|
|
@ -492,9 +492,11 @@ static int32_t tfSearchCompareFunc_JSON(void* reader, SIndexTerm* tem, SIdxTRslt
|
|||
cond = MATCH;
|
||||
}
|
||||
} else {
|
||||
if (0 != strncmp(ch, p, skip)) {
|
||||
if (0 != strncmp(ch, p, skip - 1)) {
|
||||
swsResultDestroy(rt);
|
||||
break;
|
||||
} else if (0 != strncmp(ch, p, skip)) {
|
||||
continue;
|
||||
}
|
||||
cond = cmpFn(ch + skip, tem->colVal, INDEX_TYPE_GET_TYPE(tem->colType));
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ TEST_F(JsonEnv, testWriteMillonData) {
|
|||
SArray* result = taosArrayInit(1, sizeof(uint64_t));
|
||||
indexMultiTermQueryAdd(mq, q, QUERY_GREATER_THAN);
|
||||
tIndexJsonSearch(index, mq, result);
|
||||
assert(0 == taosArrayGetSize(result));
|
||||
EXPECT_EQ(0, taosArrayGetSize(result));
|
||||
indexMultiTermQueryDestroy(mq);
|
||||
}
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue