提交 09c77f73 编写于 作者: wmmhello's avatar wmmhello

TD-6129<feature> add tag-> where logic

上级 a04c4a26
......@@ -5427,14 +5427,14 @@ void* getJsonTagValue(STable* pTable, char* key){
JsonMapValue* p = taosArraySearch(*data, &jmvalue, tsdbCompareJsonMapValue, TD_EQ);
if (p == NULL) return NULL;
int16_t colId = p->colId + 1;
return tdGetKVRowValOfCol(pTable, colId);
return tdGetKVRowValOfCol(pTable->tagVal, colId);
}else if(TABLE_TYPE(pTable) == TSDB_SUPER_TABLE){
SArray** data = (SArray**)taosHashGet(pTable->jsonKeyMap, key, outLen);
if(data == NULL) return NULL;
if(taosArrayGetSize(*data) == 0) return NULL;
JsonMapValue* p = taosArrayGet(*data, 0);
int16_t colId = p->colId + 1;
return tdGetKVRowValOfCol((STable*)(p->table), colId);
return tdGetKVRowValOfCol(((STable*)(p->table))->tagVal, colId);
}
return NULL;
}
......
......@@ -473,7 +473,7 @@ static FORCE_INLINE int comparTagId(const void *key1, const void *key2) {
}
static FORCE_INLINE void *tdGetKVRowValOfCol(SKVRow row, int16_t colId) {
void *ret = taosbsearch(&colId, kvRowColIdx(row), kvRowNCols(row), sizeof(SColIdx), comparTagId, TD_EQ);
void *ret = taosbsearch(&colId, kvRowColIdx(row), p (row), sizeof(SColIdx), comparTagId, TD_EQ);
if (ret == NULL) return NULL;
return kvRowColVal(row, (SColIdx *)ret);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册