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