feat: information_schema.user_table_distributed execution plan
This commit is contained in:
parent
54cf464d5d
commit
4e680bf1ac
|
@ -1450,7 +1450,8 @@ static int32_t addMnodeToVgroupList(const SEpSet* pEpSet, SArray** pVgroupList)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t setSysTableVgroupList(STranslateContext* pCxt, SName* pName, SRealTableNode* pRealTable) {
|
static int32_t setSysTableVgroupList(STranslateContext* pCxt, SName* pName, SRealTableNode* pRealTable) {
|
||||||
if (0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USER_TABLES)) {
|
if (0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USER_TABLES) &&
|
||||||
|
0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USER_TABLE_DISTRIBUTED)) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1531,7 +1532,8 @@ static bool joinTableIsSingleTable(SJoinTableNode* pJoinTable) {
|
||||||
static bool isSingleTable(SRealTableNode* pRealTable) {
|
static bool isSingleTable(SRealTableNode* pRealTable) {
|
||||||
int8_t tableType = pRealTable->pMeta->tableType;
|
int8_t tableType = pRealTable->pMeta->tableType;
|
||||||
if (TSDB_SYSTEM_TABLE == tableType) {
|
if (TSDB_SYSTEM_TABLE == tableType) {
|
||||||
return 0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USER_TABLES);
|
return 0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USER_TABLES) &&
|
||||||
|
0 != strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USER_TABLE_DISTRIBUTED);
|
||||||
}
|
}
|
||||||
return (TSDB_CHILD_TABLE == tableType || TSDB_NORMAL_TABLE == tableType);
|
return (TSDB_CHILD_TABLE == tableType || TSDB_NORMAL_TABLE == tableType);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ typedef struct SPhysiPlanContext {
|
||||||
int32_t errCode;
|
int32_t errCode;
|
||||||
int16_t nextDataBlockId;
|
int16_t nextDataBlockId;
|
||||||
SArray* pLocationHelper;
|
SArray* pLocationHelper;
|
||||||
SArray* pExecNodeList; // SArray<SQueryNodeLoad>
|
SArray* pExecNodeList; // SArray<SQueryNodeLoad>
|
||||||
} SPhysiPlanContext;
|
} SPhysiPlanContext;
|
||||||
|
|
||||||
static int32_t getSlotKey(SNode* pNode, const char* pStmtName, char* pKey) {
|
static int32_t getSlotKey(SNode* pNode, const char* pStmtName, char* pKey) {
|
||||||
|
@ -529,7 +529,8 @@ static int32_t createSystemTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan*
|
||||||
|
|
||||||
pScan->showRewrite = pScanLogicNode->showRewrite;
|
pScan->showRewrite = pScanLogicNode->showRewrite;
|
||||||
pScan->accountId = pCxt->pPlanCxt->acctId;
|
pScan->accountId = pCxt->pPlanCxt->acctId;
|
||||||
if (0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_USER_TABLES)) {
|
if (0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_USER_TABLES) ||
|
||||||
|
0 == strcmp(pScanLogicNode->tableName.tname, TSDB_INS_TABLE_USER_TABLE_DISTRIBUTED)) {
|
||||||
vgroupInfoToNodeAddr(pScanLogicNode->pVgroupList->vgroups, &pSubplan->execNode);
|
vgroupInfoToNodeAddr(pScanLogicNode->pVgroupList->vgroups, &pSubplan->execNode);
|
||||||
SQueryNodeLoad node = {.addr = pSubplan->execNode, .load = 0};
|
SQueryNodeLoad node = {.addr = pSubplan->execNode, .load = 0};
|
||||||
taosArrayPush(pCxt->pExecNodeList, &node);
|
taosArrayPush(pCxt->pExecNodeList, &node);
|
||||||
|
|
Loading…
Reference in New Issue