fix: parser

This commit is contained in:
Liu Jicong 2022-05-31 16:49:52 +08:00
parent c3296fe890
commit 0fdb225d7e
1 changed files with 2 additions and 3 deletions

View File

@ -3317,9 +3317,8 @@ static int32_t buildCreateTopicReq(STranslateContext* pCxt, SCreateTopicStmt* pS
tNameGetFullDbName(&name, pReq->subDbName);
} else {
pReq->subType = TOPIC_SUB_TYPE__COLUMN;
tNameSetDbName(&name, pCxt->pParseCxt->acctId,
((SRealTableNode*)(((SSelectStmt*)pStmt->pQuery)->pFromTable))->table.dbName,
strlen(pStmt->subDbName));
char* dbName = ((SRealTableNode*)(((SSelectStmt*)pStmt->pQuery)->pFromTable))->table.dbName;
tNameSetDbName(&name, pCxt->pParseCxt->acctId, dbName, strlen(dbName));
tNameGetFullDbName(&name, pReq->subDbName);
pCxt->pParseCxt->topicQuery = true;
code = translateQuery(pCxt, pStmt->pQuery);