fix: check table is super table when rewrite star for bi tool

This commit is contained in:
shenglian zhou 2023-09-22 22:02:30 +08:00
parent fb62588dd3
commit df19645a90
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ typedef struct STranslateContext {
} STranslateContext; } STranslateContext;
int32_t biRewriteSelectStar(STranslateContext* pCxt, SSelectStmt* pSelect); int32_t biRewriteSelectStar(STranslateContext* pCxt, SSelectStmt* pSelect);
int32_t findTable(STranslateContext* pCxt, const char* pTableAlias, STableNode** pOutput);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -1398,7 +1398,7 @@ static EDealRes haveVectorFunction(SNode* pNode, void* pContext) {
return DEAL_RES_CONTINUE; return DEAL_RES_CONTINUE;
} }
static int32_t findTable(STranslateContext* pCxt, const char* pTableAlias, STableNode** pOutput) { int32_t findTable(STranslateContext* pCxt, const char* pTableAlias, STableNode** pOutput) {
SArray* pTables = taosArrayGetP(pCxt->pNsLevel, pCxt->currLevel); SArray* pTables = taosArrayGetP(pCxt->pNsLevel, pCxt->currLevel);
size_t nums = taosArrayGetSize(pTables); size_t nums = taosArrayGetSize(pTables);
for (size_t i = 0; i < nums; ++i) { for (size_t i = 0; i < nums; ++i) {