fix: create stream udf issue
This commit is contained in:
parent
132d97bbca
commit
6ffa3945ea
|
@ -405,6 +405,13 @@ static int32_t collectMetaKeyFromDescribe(SCollectMetaKeyCxt* pCxt, SDescribeStm
|
||||||
static int32_t collectMetaKeyFromCreateStream(SCollectMetaKeyCxt* pCxt, SCreateStreamStmt* pStmt) {
|
static int32_t collectMetaKeyFromCreateStream(SCollectMetaKeyCxt* pCxt, SCreateStreamStmt* pStmt) {
|
||||||
int32_t code =
|
int32_t code =
|
||||||
reserveTableMetaInCache(pCxt->pParseCxt->acctId, pStmt->targetDbName, pStmt->targetTabName, pCxt->pMetaCache);
|
reserveTableMetaInCache(pCxt->pParseCxt->acctId, pStmt->targetDbName, pStmt->targetTabName, pCxt->pMetaCache);
|
||||||
|
if (TSDB_CODE_SUCCESS == code && NULL != pStmt->pSubtable && NULL != pStmt->pQuery) {
|
||||||
|
SSelectStmt* pSelect = (SSelectStmt*)pStmt->pQuery;
|
||||||
|
pSelect->pSubtable = nodesCloneNode(pStmt->pSubtable);
|
||||||
|
if (NULL == pSelect->pSubtable) {
|
||||||
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (TSDB_CODE_SUCCESS == code) {
|
if (TSDB_CODE_SUCCESS == code) {
|
||||||
code = collectMetaKeyFromQuery(pCxt, pStmt->pQuery);
|
code = collectMetaKeyFromQuery(pCxt, pStmt->pQuery);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9327,10 +9327,7 @@ static int32_t addSubtableNameToCreateStreamQuery(STranslateContext* pCxt, SCrea
|
||||||
if (NULL == pStmt->pSubtable) {
|
if (NULL == pStmt->pSubtable) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
pSelect->pSubtable = nodesCloneNode(pStmt->pSubtable);
|
|
||||||
if (NULL == pSelect->pSubtable) {
|
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
|
||||||
}
|
|
||||||
SRewriteSubtableCxt cxt = {.pCxt = pCxt, .pPartitionList = pSelect->pPartitionByList};
|
SRewriteSubtableCxt cxt = {.pCxt = pCxt, .pPartitionList = pSelect->pPartitionByList};
|
||||||
nodesRewriteExpr(&pSelect->pSubtable, rewriteSubtable, &cxt);
|
nodesRewriteExpr(&pSelect->pSubtable, rewriteSubtable, &cxt);
|
||||||
return pCxt->errCode;
|
return pCxt->errCode;
|
||||||
|
|
Loading…
Reference in New Issue