fix: add pk col after ts col to make operator of show table distributed super_table work

This commit is contained in:
slzhou 2024-03-25 09:38:50 +08:00
parent 447b8ddd32
commit f9a6243859
1 changed files with 4 additions and 3 deletions

View File

@ -341,10 +341,11 @@ static int32_t addDefaultScanCol(const STableMeta* pMeta, SNodeList** pCols) {
if (TSDB_SYSTEM_TABLE == pMeta->tableType) {
return addSystableFirstCol(pMeta->uid, pMeta->schema, pCols, pMeta);
}
if (hasPkInTable(pMeta)) {
addPkCol(pMeta->uid, pMeta->schema + 1, pCols, pMeta);
int32_t code = addPrimaryKeyCol(pMeta->uid, pMeta->schema, pCols, pMeta);
if (code == TSDB_CODE_SUCCESS && hasPkInTable(pMeta)) {
code = addPkCol(pMeta->uid, pMeta->schema + 1, pCols, pMeta);
}
return addPrimaryKeyCol(pMeta->uid, pMeta->schema, pCols, pMeta);
return code;
}
static int32_t makeScanLogicNode(SLogicPlanContext* pCxt, SRealTableNode* pRealTable, bool hasRepeatScanFuncs,