You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-537, cleanup compiler warnings. Checkpointing a bunch of fixes.
Work in progress...
This commit is contained in:
committed by
Roman Nozdrin
parent
f4f053dd8c
commit
cbbf267e88
@@ -46,22 +46,6 @@ struct to_lower
|
||||
}
|
||||
};
|
||||
|
||||
//Trim any leading/trailing ws
|
||||
const string lrtrim(const string& in)
|
||||
{
|
||||
string::size_type p1;
|
||||
p1 = in.find_first_not_of(" \t\n");
|
||||
|
||||
if (p1 == string::npos) p1 = 0;
|
||||
|
||||
string::size_type p2;
|
||||
p2 = in.find_last_not_of(" \t\n");
|
||||
|
||||
if (p2 == string::npos) p2 = in.size() - 1;
|
||||
|
||||
return string(in, p1, (p2 - p1 + 1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace execplan
|
||||
|
@@ -336,7 +336,8 @@ bool isNotInSubquery(JobStepVector& jsv)
|
||||
return notIn;
|
||||
}
|
||||
|
||||
|
||||
// This fcn is currently unused. Will keep it in the code for now.
|
||||
#if 0
|
||||
void alterCsepInExistsFilter(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo)
|
||||
{
|
||||
// This is for window function in IN/EXISTS sub-query.
|
||||
@@ -364,7 +365,7 @@ void alterCsepInExistsFilter(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo)
|
||||
if (wcs.size() > 1)
|
||||
retCols.insert(retCols.end(), wcs.begin() + 1, wcs.end());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void doCorrelatedExists(const ExistsFilter* ef, JobInfo& jobInfo)
|
||||
{
|
||||
|
@@ -93,38 +93,6 @@ namespace
|
||||
{
|
||||
using namespace joblist;
|
||||
|
||||
//Find the next step downstream from *in. Assumes only the first such step is needed.
|
||||
const JobStepVector::iterator getNextStep(JobStepVector::iterator& in, JobStepVector& list)
|
||||
{
|
||||
JobStepVector::iterator end = list.end();
|
||||
|
||||
for (unsigned i = 0; i < in->get()->outputAssociation().outSize(); ++i)
|
||||
{
|
||||
JobStepVector::iterator iter = list.begin();
|
||||
AnyDataListSPtr outAdl = in->get()->outputAssociation().outAt(i);
|
||||
|
||||
while (iter != end)
|
||||
{
|
||||
if (iter != in)
|
||||
{
|
||||
AnyDataListSPtr inAdl;
|
||||
|
||||
for (unsigned j = 0; j < iter->get()->inputAssociation().outSize(); j++)
|
||||
{
|
||||
inAdl = iter->get()->inputAssociation().outAt(j);
|
||||
|
||||
if (inAdl.get() == outAdl.get())
|
||||
return iter;
|
||||
}
|
||||
}
|
||||
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
return end;
|
||||
}
|
||||
|
||||
|
||||
bool checkCombinable(JobStep* jobStepPtr)
|
||||
{
|
||||
@@ -1446,54 +1414,6 @@ void changePcolStepToPcolScan(JobStepVector::iterator& it, JobStepVector::iterat
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t shouldSort(const JobStep* inJobStep, int colWidth)
|
||||
{
|
||||
//only pColStep and pColScan have colType
|
||||
const pColStep* inStep = dynamic_cast<const pColStep*>(inJobStep);
|
||||
|
||||
if (inStep && colWidth > inStep->colType().colWidth)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
const pColScanStep* inScan = dynamic_cast<const pColScanStep*>(inJobStep);
|
||||
|
||||
if (inScan && colWidth > inScan->colType().colWidth)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void convertPColStepInProjectToPassThru(JobStepVector& psv, JobInfo& jobInfo)
|
||||
{
|
||||
for (JobStepVector::iterator iter = psv.begin(); iter != psv.end(); ++iter)
|
||||
{
|
||||
pColStep* colStep = dynamic_cast<pColStep*>(iter->get());
|
||||
|
||||
if (colStep != NULL)
|
||||
{
|
||||
JobStepAssociation ia = iter->get()->inputAssociation();
|
||||
DataList_t* fifoDlp = ia.outAt(0).get()->dataList();
|
||||
|
||||
if (fifoDlp)
|
||||
{
|
||||
if (iter->get()->oid() >= 3000 && iter->get()->oid() == fifoDlp->OID())
|
||||
{
|
||||
PassThruStep* pts = 0;
|
||||
pts = new PassThruStep(*colStep);
|
||||
pts->alias(colStep->alias());
|
||||
pts->view(colStep->view());
|
||||
pts->name(colStep->name());
|
||||
pts->tupleId(iter->get()->tupleId());
|
||||
iter->reset(pts);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// optimize filter order
|
||||
// perform none string filters first because string filter joins the tokens.
|
||||
void optimizeFilterOrder(JobStepVector& qsv)
|
||||
@@ -1818,7 +1738,7 @@ void makeVtableModeSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo,
|
||||
jobInfo.limitCount = (uint64_t) - 1;
|
||||
}
|
||||
|
||||
// support order by and limit in sub-query/union or
|
||||
// support order by and limit in sub-query/union or
|
||||
// GROUP BY handler processed outer query order
|
||||
else if (csep->orderByCols().size() > 0)
|
||||
{
|
||||
|
@@ -81,21 +81,6 @@ using namespace joblist;
|
||||
namespace
|
||||
{
|
||||
|
||||
string keyName(uint64_t i, uint32_t key, const joblist::JobInfo& jobInfo)
|
||||
{
|
||||
string name = jobInfo.projectionCols[i]->alias();
|
||||
|
||||
if (name.empty())
|
||||
{
|
||||
name = jobInfo.keyInfo->tupleKeyToName[key];
|
||||
|
||||
if (jobInfo.keyInfo->tupleKeyVec[key].fId < 100)
|
||||
name = "Expression/Function";
|
||||
}
|
||||
|
||||
return name = "'" + name + "'";
|
||||
}
|
||||
|
||||
|
||||
uint64_t getColumnIndex(const SRCP& c, const map<uint64_t, uint64_t>& m, JobInfo& jobInfo)
|
||||
{
|
||||
|
Reference in New Issue
Block a user