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)){
|
if(IS_VAR_DATA_TYPE(param->type)){
|
||||||
nTagData = strlen(param->val);
|
nTagData = strlen(param->val);
|
||||||
}else{
|
}else{
|
||||||
nTagData = tDataTypes[param->type].bytes
|
nTagData = tDataTypes[param->type].bytes;
|
||||||
}
|
}
|
||||||
ret = metaCreateTagIdxKey(pCursor->suid, pCursor->cid, param->val, nTagData, pCursor->type,
|
ret = metaCreateTagIdxKey(pCursor->suid, pCursor->cid, param->val, nTagData, pCursor->type,
|
||||||
param->reverse ? INT64_MAX : INT64_MIN, &pKey, &nKey);
|
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];
|
pTagColumn = &stbEntry.stbEntry.schemaTag.pSchema[0];
|
||||||
|
|
||||||
|
STagVal tagVal = {.cid = pTagColumn->colId};
|
||||||
if(pTagColumn->type != TSDB_DATA_TYPE_JSON){
|
if(pTagColumn->type != TSDB_DATA_TYPE_JSON){
|
||||||
STagVal tagVal = {.cid = pTagColumn->colId};
|
|
||||||
tTagGet((const STag *)pCtbEntry->ctbEntry.pTags, &tagVal);
|
tTagGet((const STag *)pCtbEntry->ctbEntry.pTags, &tagVal);
|
||||||
pTagData = tagVal.pData;
|
if(IS_VAR_DATA_TYPE(pTagColumn->type)){
|
||||||
nTagData = (int32_t)tagVal.nData;
|
pTagData = tagVal.pData;
|
||||||
|
nTagData = (int32_t)tagVal.nData;
|
||||||
|
}else{
|
||||||
|
pTagData = &(tagVal.i64);
|
||||||
|
nTagData = tDataTypes[pTagColumn->type].bytes;
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
//pTagData = pCtbEntry->ctbEntry.pTags;
|
//pTagData = pCtbEntry->ctbEntry.pTags;
|
||||||
//nTagData = ((const STag *)pCtbEntry->ctbEntry.pTags)->len;
|
//nTagData = ((const STag *)pCtbEntry->ctbEntry.pTags)->len;
|
||||||
|
|
|
@ -1594,7 +1594,8 @@ static SSDataBlock* doTagScan(SOperatorInfo* pOperator) {
|
||||||
}
|
}
|
||||||
colDataAppend(pDst, count, data, (data == NULL));
|
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);
|
taosMemoryFree(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue