fix:fix error in new tag format
This commit is contained in:
parent
172834bc59
commit
f99e66df32
|
@ -626,7 +626,7 @@ int32_t metaFilteTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
|
|||
if(IS_VAR_DATA_TYPE(param->type)){
|
||||
nTagData = strlen(param->val);
|
||||
}else{
|
||||
nTagData = tDataTypes[param->type].bytes
|
||||
nTagData = tDataTypes[param->type].bytes;
|
||||
}
|
||||
ret = metaCreateTagIdxKey(pCursor->suid, pCursor->cid, param->val, nTagData, pCursor->type,
|
||||
param->reverse ? INT64_MAX : INT64_MIN, &pKey, &nKey);
|
||||
|
|
|
@ -787,11 +787,16 @@ static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) {
|
|||
|
||||
pTagColumn = &stbEntry.stbEntry.schemaTag.pSchema[0];
|
||||
|
||||
if(pTagColumn->type != TSDB_DATA_TYPE_JSON){
|
||||
STagVal tagVal = {.cid = pTagColumn->colId};
|
||||
if(pTagColumn->type != TSDB_DATA_TYPE_JSON){
|
||||
tTagGet((const STag *)pCtbEntry->ctbEntry.pTags, &tagVal);
|
||||
if(IS_VAR_DATA_TYPE(pTagColumn->type)){
|
||||
pTagData = tagVal.pData;
|
||||
nTagData = (int32_t)tagVal.nData;
|
||||
}else{
|
||||
pTagData = &(tagVal.i64);
|
||||
nTagData = tDataTypes[pTagColumn->type].bytes;
|
||||
}
|
||||
}else{
|
||||
//pTagData = pCtbEntry->ctbEntry.pTags;
|
||||
//nTagData = ((const STag *)pCtbEntry->ctbEntry.pTags)->len;
|
||||
|
|
|
@ -1594,7 +1594,8 @@ static SSDataBlock* doTagScan(SOperatorInfo* pOperator) {
|
|||
}
|
||||
colDataAppend(pDst, count, data, (data == NULL));
|
||||
|
||||
if(pDst->info.type != TSDB_DATA_TYPE_JSON && IS_VAR_DATA_TYPE(((const STagVal *)p)->type) && data){
|
||||
if(pDst->info.type != TSDB_DATA_TYPE_JSON && p != NULL
|
||||
&& IS_VAR_DATA_TYPE(((const STagVal *)p)->type) && data != NULL){
|
||||
taosMemoryFree(data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue