enh(tmq): adaptive schema
This commit is contained in:
parent
8ceae5854d
commit
d762ec6371
|
@ -234,6 +234,10 @@ static FORCE_INLINE SReqResultInfo* tmqGetNextResInfo(TAOS_RES* res, bool conver
|
|||
if (msg->rsp.withSchema) {
|
||||
SSchemaWrapper* pSW = (SSchemaWrapper*)taosArrayGetP(msg->rsp.blockSchema, msg->resIter);
|
||||
setResSchemaInfo(&msg->resInfo, pSW->pSchema, pSW->nCols);
|
||||
taosMemoryFreeClear(msg->resInfo.row);
|
||||
taosMemoryFreeClear(msg->resInfo.pCol);
|
||||
taosMemoryFreeClear(msg->resInfo.length);
|
||||
taosMemoryFreeClear(msg->resInfo.convertBuf);
|
||||
}
|
||||
setQueryResultFromRsp(&msg->resInfo, pRetrieve, convertUcs4);
|
||||
return &msg->resInfo;
|
||||
|
|
|
@ -79,7 +79,7 @@ SSdbRaw *mndTopicActionEncode(SMqTopicObj *pTopic) {
|
|||
}
|
||||
int32_t schemaLen = 0;
|
||||
if (pTopic->schema.nCols) {
|
||||
taosEncodeSSchemaWrapper(NULL, &pTopic->schema);
|
||||
schemaLen = taosEncodeSSchemaWrapper(NULL, &pTopic->schema);
|
||||
}
|
||||
int32_t size =
|
||||
sizeof(SMqTopicObj) + physicalPlanLen + pTopic->sqlLen + pTopic->astLen + schemaLen + MND_TOPIC_RESERVE_SIZE;
|
||||
|
|
Loading…
Reference in New Issue