enh:[TD-32166]refactor code in sml

This commit is contained in:
wangmm0220 2024-10-24 19:52:39 +08:00
parent 35d3d968ff
commit 6960a34cfb
1 changed files with 2 additions and 2 deletions

View File

@ -698,8 +698,8 @@ static int32_t smlGenerateSchemaAction(SSchema *colField, SHashObj *colHash, SSm
uint16_t *index = colHash ? (uint16_t *)taosHashGet(colHash, kv->key, kv->keyLen) : NULL;
if (index) {
if (colField[*index].type != kv->type) {
snprintf(info->msgBuf.buf, info->msgBuf.len, "SML:0x%" PRIx64 " %s point type and db type mismatch. db type: %d, point type: %d, key: %s",
info->id, __FUNCTION__, colField[*index].type, kv->type, kv->key);
snprintf(info->msgBuf.buf, info->msgBuf.len, "SML:0x%" PRIx64 " %s point type and db type mismatch. db type: %s, point type: %s, key: %s",
info->id, __FUNCTION__, tDataTypes[colField[*index].type].name, tDataTypes[kv->type].name, kv->key);
uError("%s", info->msgBuf.buf);
return TSDB_CODE_SML_INVALID_DATA;
}