Merge remote-tracking branch 'origin/feat/TS-4243-3.0' into feat/TS-4243-3.0

This commit is contained in:
Haojun Liao 2024-03-25 09:59:23 +08:00
commit f2a9fef804
2 changed files with 5 additions and 4 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,

View File

@ -89,7 +89,7 @@ if $data10 != @ -> Merge (columns=3 width=24 input_order=unknown output_order=
return -1
endi
sql explain select count(*), last_row(f1), min(f1) from sta interval(1s);
if $data10 != @ -> Merge (columns=4 width=66 input_order=asc output_order=asc mode=sort)@ then
if $data10 != @ -> Merge (columns=4 width=82 input_order=asc output_order=asc mode=sort)@ then
return -1
endi
sql explain select distinct count(*), last_row(f1), min(f1) from tba1;