refactor(tmq)
This commit is contained in:
parent
004a84ac81
commit
b050d1c33a
|
@ -778,7 +778,8 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) {
|
||||||
|
|
||||||
for (int32_t i = 0; i < taosArrayGetSize(pCreateReq->ctb.tagName); i++) {
|
for (int32_t i = 0; i < taosArrayGetSize(pCreateReq->ctb.tagName); i++) {
|
||||||
char* tName = taosArrayGet(pCreateReq->ctb.tagName, i);
|
char* tName = taosArrayGet(pCreateReq->ctb.tagName, i);
|
||||||
for(int32_t j = pTableMeta->tableInfo.numOfColumns; j < pTableMeta->tableInfo.numOfColumns + pTableMeta->tableInfo.numOfTags; j++){
|
for (int32_t j = pTableMeta->tableInfo.numOfColumns;
|
||||||
|
j < pTableMeta->tableInfo.numOfColumns + pTableMeta->tableInfo.numOfTags; j++) {
|
||||||
SSchema* tag = &pTableMeta->schema[j];
|
SSchema* tag = &pTableMeta->schema[j];
|
||||||
if (strcmp(tag->name, tName) == 0 && tag->type != TSDB_DATA_TYPE_JSON) {
|
if (strcmp(tag->name, tName) == 0 && tag->type != TSDB_DATA_TYPE_JSON) {
|
||||||
tTagSetCid((STag*)pCreateReq->ctb.pTag, i, tag->colId);
|
tTagSetCid((STag*)pCreateReq->ctb.pTag, i, tag->colId);
|
||||||
|
@ -1322,7 +1323,7 @@ end:
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t tmqWriteRaw(TAOS* taos, void* data, int32_t dataLen) {
|
static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) {
|
||||||
int32_t code = TSDB_CODE_SUCCESS;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
SHashObj* pVgHash = NULL;
|
SHashObj* pVgHash = NULL;
|
||||||
SQuery* pQuery = NULL;
|
SQuery* pQuery = NULL;
|
||||||
|
@ -1668,7 +1669,7 @@ int32_t tmq_write_raw(TAOS* taos, tmq_raw_data raw) {
|
||||||
} else if (raw.raw_type == TDMT_VND_DELETE) {
|
} else if (raw.raw_type == TDMT_VND_DELETE) {
|
||||||
return taosDeleteData(taos, raw.raw, raw.raw_len);
|
return taosDeleteData(taos, raw.raw, raw.raw_len);
|
||||||
} else if (raw.raw_type == RES_TYPE__TMQ) {
|
} else if (raw.raw_type == RES_TYPE__TMQ) {
|
||||||
return tmqWriteRaw(taos, raw.raw, raw.raw_len);
|
return tmqWriteRawDataImpl(taos, raw.raw, raw.raw_len);
|
||||||
}
|
}
|
||||||
return TSDB_CODE_INVALID_PARA;
|
return TSDB_CODE_INVALID_PARA;
|
||||||
}
|
}
|
Loading…
Reference in New Issue