fix: compile issues
This commit is contained in:
parent
55d118d17c
commit
1d24b3da77
|
@ -3275,7 +3275,7 @@ int32_t diffFunction(SqlFunctionCtx* pCtx) {
|
|||
|
||||
// handle selectivity
|
||||
if (pCtx->subsidiaries.num > 0) {
|
||||
appendSelectivityValue(pCtx, i, pos);
|
||||
appendSelectivityCols(pCtx, row.block, row.rowIndex, pos);
|
||||
}
|
||||
|
||||
numOfElems += 1;
|
||||
|
|
|
@ -5715,7 +5715,7 @@ static int32_t createPkColByTable(STranslateContext* pCxt, SRealTableNode* pTabl
|
|||
pCol->colId = pTable->pMeta->schema[1].colId;
|
||||
strcpy(pCol->colName, pTable->pMeta->schema[1].name);
|
||||
bool found = false;
|
||||
int32_t code = findAndSetColumn(pCxt, &pCol, (STableNode*)pTable, &found);
|
||||
int32_t code = findAndSetColumn(pCxt, &pCol, (STableNode*)pTable, &found, true);
|
||||
if (TSDB_CODE_SUCCESS != code || !found) {
|
||||
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTERNAL_ERROR);
|
||||
}
|
||||
|
|
|
@ -327,17 +327,6 @@ static int32_t addSystableFirstCol(SRealTableNode* pTable, SNodeList** pCols) {
|
|||
return nodesListMakeStrictAppend(pCols, createFirstCol(pTable, pTable->pMeta->schema));
|
||||
}
|
||||
|
||||
static int32_t addDefaultScanCol(SRealTableNode* pTable, SNodeList** pCols) {
|
||||
if (TSDB_SYSTEM_TABLE == pTable->pMeta->tableType) {
|
||||
return addSystableFirstCol(pTable, pCols);
|
||||
}
|
||||
int32_t code = addPrimaryKeyCol(pTable, pCols);
|
||||
if (code == TSDB_CODE_SUCCESS && hasPkInTable(pTable->pMeta)) {
|
||||
code = addPkCol(pTable, pCols);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
static int32_t addPkCol(SRealTableNode* pTable, SNodeList** pCols) {
|
||||
bool found = false;
|
||||
SNode* pCol = NULL;
|
||||
|
@ -355,6 +344,17 @@ static int32_t addPkCol(SRealTableNode* pTable, SNodeList** pCols) {
|
|||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
static int32_t addDefaultScanCol(SRealTableNode* pTable, SNodeList** pCols) {
|
||||
if (TSDB_SYSTEM_TABLE == pTable->pMeta->tableType) {
|
||||
return addSystableFirstCol(pTable, pCols);
|
||||
}
|
||||
int32_t code = addPrimaryKeyCol(pTable, pCols);
|
||||
if (code == TSDB_CODE_SUCCESS && hasPkInTable(pTable->pMeta)) {
|
||||
code = addPkCol(pTable, pCols);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
static int32_t makeScanLogicNode(SLogicPlanContext* pCxt, SRealTableNode* pRealTable, bool hasRepeatScanFuncs,
|
||||
SLogicNode** pLogicNode) {
|
||||
SScanLogicNode* pScan = (SScanLogicNode*)nodesMakeNode(QUERY_NODE_LOGIC_PLAN_SCAN);
|
||||
|
@ -1798,7 +1798,7 @@ static int32_t createDeleteScanLogicNode(SLogicPlanContext* pCxt, SDeleteStmt* p
|
|||
|
||||
STableMeta* pMeta = ((SRealTableNode*)pDelete->pFromTable)->pMeta;
|
||||
if (TSDB_CODE_SUCCESS == code && hasPkInTable(pMeta)) {
|
||||
code = addPkCol(pMeta->uid, pMeta->schema + 1, &pScan->pScanCols, pMeta);
|
||||
code = addPkCol((SRealTableNode*)pDelete->pFromTable, &pScan->pScanCols);
|
||||
}
|
||||
|
||||
if (TSDB_CODE_SUCCESS == code && NULL != pDelete->pTagCond) {
|
||||
|
|
Loading…
Reference in New Issue