1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Remove boost shared array [develop 23.02] (#2812)

* remove boost/shared_array include

* replace boost::shared_array<T> to std::shared_ptr<T[]>
This commit is contained in:
Leonid Fedorov
2023-04-17 20:56:09 +03:00
committed by GitHub
parent f1697c261e
commit 030144127e
65 changed files with 222 additions and 232 deletions

View File

@ -119,7 +119,7 @@ const TxnID SessionManager::getTxnID(const SID session)
return ret;
}
boost::shared_array<SIDTIDEntry> SessionManager::SIDTIDMap(int& len)
std::shared_ptr<SIDTIDEntry[]> SessionManager::SIDTIDMap(int& len)
{
// is this cast valid?
return dbrm.SIDTIDMap(len);
@ -150,7 +150,7 @@ bool SessionManager::checkActiveTransaction(const SID sessionId, bool& bIsDbrmUp
bIsDbrmUp = true;
int arrayLenth = 0;
bool ret = false;
boost::shared_array<SIDTIDEntry> sIDTIDMap;
std::shared_ptr<SIDTIDEntry[]> sIDTIDMap;
sIDTIDMap = SIDTIDMap(arrayLenth);
@ -178,7 +178,7 @@ bool SessionManager::isTransactionActive(const SID sessionId, bool& bIsDbrmUp)
bIsDbrmUp = true;
int arrayLenth = 0;
bool ret = false;
boost::shared_array<SIDTIDEntry> sIDTIDMap;
std::shared_ptr<SIDTIDEntry[]> sIDTIDMap;
sIDTIDMap = SIDTIDMap(arrayLenth);

View File

@ -28,7 +28,6 @@
#include "calpontsystemcatalog.h"
#include "brm.h"
#include "boost/shared_array.hpp"
namespace execplan
{
@ -174,7 +173,7 @@ class SessionManager
* @return A pointer to the array. Note: The caller is responsible for
* deallocating it. Use delete[].
*/
boost::shared_array<BRM::SIDTIDEntry> SIDTIDMap(int& len);
std::shared_ptr<BRM::SIDTIDEntry[]> SIDTIDMap(int& len);
/** @brief Returns a unique uint32_t. It eventually wraps around, but who cares.
*

View File

@ -873,7 +873,7 @@ void BatchPrimitiveProcessorJL::getRowGroupData(ByteStream& in, vector<RGData>*
if (!pmSendsFinalResult() || pmSendsMatchesAnyway)
{
boost::shared_array<vector<uint32_t> > joinResults;
std::shared_ptr<vector<uint32_t>[]> joinResults;
uint32_t i, j;
if (pmSendsMatchesAnyway)
@ -920,7 +920,6 @@ void BatchPrimitiveProcessorJL::getRowGroupData(ByteStream& in, vector<RGData>*
idbassert(in.length() == 0);
}
// boost::shared_array<uint8_t>
RGData BatchPrimitiveProcessorJL::getErrorRowGroupData(uint16_t error) const
{
RGData ret;

View File

@ -184,8 +184,7 @@ class BatchPrimitiveProcessorJL
return status;
}
void runErrorBPP(messageqcpp::ByteStream&);
// uint32_t getErrorTableBand(uint16_t error, messageqcpp::ByteStream *out);
// boost::shared_array<uint8_t> getErrorRowGroupData(uint16_t error) const;
rowgroup::RGData getErrorRowGroupData(uint16_t error) const;
// @bug 1098

View File

@ -27,7 +27,7 @@
using namespace std;
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/uuid/uuid_io.hpp>
using namespace boost;
@ -401,7 +401,6 @@ void CrossEngineStep::execute()
int num_fields = mysql->getFieldCount();
char** rowIn; // input
// shared_array<uint8_t> rgDataDelivered; // output
RGData rgDataDelivered;
fRowGroupAdded.initRow(&fRowDelivered);
// use getDataSize() i/o getMaxDataSize() to make sure there are 8192 rows.
@ -431,7 +430,7 @@ void CrossEngineStep::execute()
else if (doFE1 && !doFE3) // FE in WHERE clause only
{
shared_array<uint8_t> rgDataFe1; // functions in where clause
std::shared_ptr<uint8_t[]> rgDataFe1; // functions in where clause
Row rowFe1; // row for fe evaluation
fRowGroupFe1.initRow(&rowFe1, true);
rgDataFe1.reset(new uint8_t[rowFe1.getSize()]);
@ -482,7 +481,7 @@ void CrossEngineStep::execute()
else if (!doFE1 && doFE3) // FE in SELECT clause only
{
shared_array<uint8_t> rgDataFe3; // functions in select clause
std::shared_ptr<uint8_t[]> rgDataFe3; // functions in select clause
Row rowFe3; // row for fe evaluation
fRowGroupOut.initRow(&rowFe3, true);
rgDataFe3.reset(new uint8_t[rowFe3.getSize()]);
@ -503,13 +502,13 @@ void CrossEngineStep::execute()
else // FE in SELECT clause, FE join and WHERE clause
{
shared_array<uint8_t> rgDataFe1; // functions in where clause
std::shared_ptr<uint8_t[]> rgDataFe1; // functions in where clause
Row rowFe1; // row for fe1 evaluation
fRowGroupFe1.initRow(&rowFe1, true);
rgDataFe1.reset(new uint8_t[rowFe1.getSize()]);
rowFe1.setData(rowgroup::Row::Pointer(rgDataFe1.get()));
shared_array<uint8_t> rgDataFe3; // functions in select clause
std::shared_ptr<uint8_t[]> rgDataFe3; // functions in select clause
Row rowFe3; // row for fe3 evaluation
fRowGroupOut.initRow(&rowFe3, true);
rgDataFe3.reset(new uint8_t[rowFe3.getSize()]);
@ -701,7 +700,6 @@ const RowGroup& CrossEngineStep::getDeliveredRowGroup() const
uint32_t CrossEngineStep::nextBand(messageqcpp::ByteStream& bs)
{
// shared_array<uint8_t> rgDataOut;
RGData rgDataOut;
bool more = false;
uint32_t rowCount = 0;

View File

@ -178,7 +178,7 @@ class CrossEngineStep : public BatchPrimitive, public TupleDeliveryStep
virtual std::string makeQuery();
virtual void setField(int, const char*, unsigned long, MYSQL_FIELD*, rowgroup::Row&);
inline void addRow(rowgroup::RGData&);
// inline void addRow(boost::shared_array<uint8_t>&);
template <typename T>
T convertValueNum(const char*, const execplan::CalpontSystemCatalog::ColType&);
virtual void formatMiniStats();
@ -238,8 +238,8 @@ class CrossEngineStep : public BatchPrimitive, public TupleDeliveryStep
std::map<uint32_t, uint32_t> fColumnMap; // projected key position (k->p)
uint64_t fColumnCount;
boost::scoped_array<int> fFe1Column;
boost::shared_array<int> fFeMapping1;
boost::shared_array<int> fFeMapping3;
std::shared_ptr<int[]> fFeMapping1;
std::shared_ptr<int[]> fFeMapping3;
rowgroup::RowGroup fRowGroupFe1;
rowgroup::RowGroup fRowGroupFe3;

View File

@ -359,9 +359,9 @@ void DiskJoinStep::joinFcn()
Row l_largeRow;
Row l_joinFERow, l_outputRow, baseRow;
vector<vector<Row::Pointer> > joinMatches;
boost::shared_array<Row> smallRowTemplates(new Row[1]);
std::shared_ptr<Row[]> smallRowTemplates(new Row[1]);
vector<std::shared_ptr<TupleJoiner>> joiners;
boost::shared_array<boost::shared_array<int> > colMappings, fergMappings;
std::shared_ptr<std::shared_ptr<int[]>[]> colMappings, fergMappings;
boost::scoped_array<boost::scoped_array<uint8_t> > smallNullMem;
boost::scoped_array<uint8_t> joinFEMem;
Row smallNullRow;
@ -386,13 +386,13 @@ void DiskJoinStep::joinFcn()
smallRG.initRow(&smallRowTemplates[0]);
joiners.resize(1);
colMappings.reset(new boost::shared_array<int>[2]);
colMappings.reset(new std::shared_ptr<int[]>[2]);
colMappings[0] = SOMapping;
colMappings[1] = LOMapping;
if (fe)
{
fergMappings.reset(new boost::shared_array<int>[2]);
fergMappings.reset(new std::shared_ptr<int[]>[2]);
fergMappings[0] = SjoinFEMapping;
fergMappings[1] = LjoinFEMapping;
}

View File

@ -50,7 +50,7 @@ class DiskJoinStep : public JobStep
boost::shared_ptr<RowGroupDL> largeDL, outputDL;
RowGroupDL* smallDL;
boost::shared_array<int> LOMapping, SOMapping, SjoinFEMapping, LjoinFEMapping;
std::shared_ptr<int[]> LOMapping, SOMapping, SjoinFEMapping, LjoinFEMapping;
TupleHashJoinStep* thjs;
boost::shared_ptr<funcexp::FuncExpWrapper> fe;
bool typeless;

View File

@ -26,7 +26,7 @@
#include <utility>
#include <string>
#include <stdexcept>
#include <boost/shared_array.hpp>
#include <stdint.h>
#include <rowgroup.h>

View File

@ -24,7 +24,7 @@
using namespace std;
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
using namespace boost;
#include "messagequeue.h"

View File

@ -24,8 +24,6 @@
#include <string>
using namespace std;
#include <boost/shared_array.hpp>
using namespace boost;
#include "errorids.h"
#include "exceptclasses.h"
@ -273,10 +271,10 @@ void GroupConcatInfo::mapColumns(const RowGroup& projRG)
}
}
shared_array<int> GroupConcatInfo::makeMapping(const RowGroup& in, const RowGroup& out)
std::shared_ptr<int[]> GroupConcatInfo::makeMapping(const RowGroup& in, const RowGroup& out)
{
// For some reason using the rowgroup mapping fcns don't work completely right in this class
shared_array<int> mapping(new int[out.getColumnCount()]);
std::shared_ptr<int[]> mapping(new int[out.getColumnCount()]);
for (uint64_t i = 0; i < out.getColumnCount(); i++)
{
@ -350,7 +348,7 @@ uint8_t* GroupConcatAgUM::getResult()
return fConcator->getResult(fGroupConcat->fSeparator);
}
void GroupConcatAgUM::applyMapping(const boost::shared_array<int>& mapping, const Row& row)
void GroupConcatAgUM::applyMapping(const std::shared_ptr<int[]>& mapping, const Row& row)
{
// For some reason the rowgroup mapping fcns don't work right in this class.
for (uint64_t i = 0; i < fRow.getColumnCount(); i++)

View File

@ -25,7 +25,7 @@
#include <set>
#include <vector>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_array.hpp>
#include "returnedcolumn.h" // SRCP
#include "rowgroup.h" // RowGroup
@ -63,7 +63,7 @@ class GroupConcatInfo
protected:
uint32_t getColumnKey(const execplan::SRCP& srcp, JobInfo& jobInfo);
boost::shared_array<int> makeMapping(const rowgroup::RowGroup&, const rowgroup::RowGroup&);
std::shared_ptr<int[]> makeMapping(const rowgroup::RowGroup&, const rowgroup::RowGroup&);
std::set<uint32_t> fColumns;
std::vector<rowgroup::SP_GroupConcat> fGroupConcat;
@ -88,7 +88,7 @@ class GroupConcatAgUM : public rowgroup::GroupConcatAg
EXPORT uint8_t* getResult();
protected:
void applyMapping(const boost::shared_array<int>&, const rowgroup::Row&);
void applyMapping(const std::shared_ptr<int[]>&, const rowgroup::Row&);
boost::scoped_ptr<GroupConcator> fConcator;
boost::scoped_array<uint8_t> fData;

View File

@ -29,7 +29,7 @@
#include <stdexcept>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/uuid/uuid.hpp>
#include "calpontsystemcatalog.h"

View File

@ -21,8 +21,6 @@
#include <string>
using namespace std;
#include <boost/shared_array.hpp>
using namespace boost;
#include "errorids.h"
#include "exceptclasses.h"
@ -266,10 +264,10 @@ void JsonArrayInfo::mapColumns(const RowGroup& projRG)
}
}
shared_array<int> JsonArrayInfo::makeMapping(const RowGroup& in, const RowGroup& out)
std::shared_ptr<int[]> JsonArrayInfo::makeMapping(const RowGroup& in, const RowGroup& out)
{
// For some reason using the rowgroup mapping fcns don't work completely right in this class
shared_array<int> mapping(new int[out.getColumnCount()]);
std::shared_ptr<int[]> mapping(new int[out.getColumnCount()]);
for (uint64_t i = 0; i < out.getColumnCount(); i++)
{
@ -342,7 +340,7 @@ uint8_t* JsonArrayAggregatAgUM::getResult()
return fConcator->getResult(fGroupConcat->fSeparator);
}
void JsonArrayAggregatAgUM::applyMapping(const boost::shared_array<int>& mapping, const Row& row)
void JsonArrayAggregatAgUM::applyMapping(const std::shared_ptr<int[]>& mapping, const Row& row)
{
// For some reason the rowgroup mapping fcns don't work right in this class.
for (uint64_t i = 0; i < fRow.getColumnCount(); i++)

View File

@ -23,7 +23,7 @@
#include <set>
#include <vector>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_array.hpp>
#include "groupconcat.h"
@ -45,7 +45,7 @@ class JsonArrayInfo : public GroupConcatInfo
protected:
uint32_t getColumnKey(const execplan::SRCP& srcp, JobInfo& jobInfo);
boost::shared_array<int> makeMapping(const rowgroup::RowGroup&, const rowgroup::RowGroup&);
std::shared_ptr<int[]> makeMapping(const rowgroup::RowGroup&, const rowgroup::RowGroup&);
};
class JsonArrayAggregatAgUM : public GroupConcatAgUM
@ -63,7 +63,7 @@ class JsonArrayAggregatAgUM : public GroupConcatAgUM
EXPORT uint8_t* getResult();
protected:
void applyMapping(const boost::shared_array<int>&, const rowgroup::Row&);
void applyMapping(const std::shared_ptr<int[]>&, const rowgroup::Row&);
};
// JSON_ARRAYAGG base

View File

@ -23,9 +23,6 @@
#include <string>
using namespace std;
#include <boost/shared_array.hpp>
using namespace boost;
#include "errorids.h"
#include "exceptclasses.h"
using namespace logging;

View File

@ -36,7 +36,7 @@
#include <tr1/memory>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/thread.hpp>
#include <boost/thread/condition.hpp>
@ -1324,7 +1324,7 @@ class TupleBPS : public BatchPrimitive, public TupleDeliveryStep
/* Functions & Expressions vars */
boost::shared_ptr<funcexp::FuncExpWrapper> fe1, fe2;
rowgroup::RowGroup fe1Input, fe2Output;
boost::shared_array<int> fe2Mapping;
std::shared_ptr<int[]> fe2Mapping;
bool bRunFEonPM;
/* for UM F & E 2 processing */
@ -1396,12 +1396,12 @@ class TupleBPS : public BatchPrimitive, public TupleDeliveryStep
boost::scoped_array<rowgroup::Row> smallNulls;
boost::scoped_array<uint8_t> joinedBaseRowData;
boost::scoped_array<uint8_t> joinFERowData;
boost::shared_array<int> largeMapping;
vector<boost::shared_array<int>> smallMappings;
vector<boost::shared_array<int>> fergMappings;
std::shared_ptr<int[]> largeMapping;
vector<std::shared_ptr<int[]>> smallMappings;
vector<std::shared_ptr<int[]>> fergMappings;
rowgroup::RGData joinedData;
boost::scoped_array<uint8_t> largeNullMemory;
boost::scoped_array<boost::shared_array<uint8_t>> smallNullMemory;
boost::scoped_array<std::shared_ptr<uint8_t[]>> smallNullMemory;
uint32_t matchCount;
rowgroup::Row postJoinRow;

View File

@ -24,7 +24,7 @@
using namespace std;
#include <boost/scoped_array.hpp>
#include <boost/shared_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>

View File

@ -23,7 +23,7 @@
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/thread.hpp>
#include "jobstep.h"
@ -244,7 +244,7 @@ class SubAdapterStep : public JobStep, public TupleDeliveryStep
uint64_t fRowsInput;
uint64_t fRowsReturned;
bool fEndOfResult;
boost::shared_array<int> fIndexMap;
std::shared_ptr<int[]> fIndexMap;
std::vector<std::pair<uint32_t, uint32_t> > fDupColumns;
RowGroupDL* fInputDL;

View File

@ -27,7 +27,7 @@
#include <stdexcept>
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
namespace joblist

View File

@ -195,7 +195,7 @@ TupleBPS::JoinLocalData::JoinLocalData(TupleBPS* pTupleBPS, RowGroup& primRowGro
smallNulls.reset(new Row[smallSideCount]);
smallMappings.resize(smallSideCount);
fergMappings.resize(smallSideCount + 1);
smallNullMemory.reset(new shared_array<uint8_t>[smallSideCount]);
smallNullMemory.reset(new std::shared_ptr<uint8_t[]>[smallSideCount]);
local_primRG.initRow(&largeSideRow);
local_outputRG.initRow(&joinedBaseRow, true);
joinedBaseRowData.reset(new uint8_t[joinedBaseRow.getSize()]);
@ -2719,7 +2719,7 @@ void TupleBPS::receiveMultiPrimitiveMessages()
{
struct timeval tvbuf;
gettimeofday(&tvbuf, 0);
FIFO<boost::shared_array<uint8_t>>* pFifo = 0;
FIFO<std::shared_ptr<uint8_t[]>>* pFifo = 0;
uint64_t totalBlockedReadCount = 0;
uint64_t totalBlockedWriteCount = 0;
@ -2728,7 +2728,7 @@ void TupleBPS::receiveMultiPrimitiveMessages()
for (size_t iDataList = 0; iDataList < inDlCnt; iDataList++)
{
pFifo = dynamic_cast<FIFO<boost::shared_array<uint8_t>>*>(
pFifo = dynamic_cast<FIFO<std::shared_ptr<uint8_t[]>>*>(
fInputJobStepAssociation.outAt(iDataList)->rowGroupDL());
if (pFifo)
@ -2742,7 +2742,7 @@ void TupleBPS::receiveMultiPrimitiveMessages()
for (size_t iDataList = 0; iDataList < outDlCnt; iDataList++)
{
pFifo = dynamic_cast<FIFO<boost::shared_array<uint8_t>>*>(dlp);
pFifo = dynamic_cast<FIFO<std::shared_ptr<uint8_t[]>>*>(dlp);
if (pFifo)
{

View File

@ -30,7 +30,7 @@
using namespace std;
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/scoped_array.hpp>
#include <boost/uuid/uuid_io.hpp>
#include "boost/tuple/tuple.hpp"
@ -5298,7 +5298,7 @@ void TupleAggregateStep::threadedAggregateRowGroups(uint32_t threadID)
RGData rgData;
scoped_array<RowBucketVec> rowBucketVecs(new RowBucketVec[fNumOfBuckets]);
scoped_array<Row> distRow;
scoped_array<shared_array<uint8_t>> distRowData;
scoped_array<std::shared_ptr<uint8_t[]>> distRowData;
uint32_t bucketID;
scoped_array<bool> bucketDone(new bool[fNumOfBuckets]);
vector<uint32_t> hashLens;
@ -5365,7 +5365,7 @@ void TupleAggregateStep::threadedAggregateRowGroups(uint32_t threadID)
rowBucketVecs[i].resize(multiDist->subAggregators().size());
distRow.reset(new Row[multiDist->subAggregators().size()]);
distRowData.reset(new shared_array<uint8_t>[multiDist->subAggregators().size()]);
distRowData.reset(new std::shared_ptr<uint8_t[]>[multiDist->subAggregators().size()]);
for (uint32_t j = 0; j < multiDist->subAggregators().size(); j++)
{

View File

@ -26,7 +26,7 @@
using namespace std;
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/uuid/uuid_io.hpp>
using namespace boost;

View File

@ -25,7 +25,7 @@
using namespace std;
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/uuid/uuid_io.hpp>
using namespace boost;

View File

@ -515,7 +515,7 @@ void TupleHashJoinStep::djsRelayFcn()
RowGroup djsInputRG = largeRG + outputRG;
RowGroup l_largeRG = (tbpsJoiners.empty() ? largeRG : largeRG + outputRG);
boost::shared_array<int> relayMapping = makeMapping(l_largeRG, djsInputRG);
std::shared_ptr<int[]> relayMapping = makeMapping(l_largeRG, djsInputRG);
bool more;
RGData inData, outData;
Row l_largeRow, djsInputRow;
@ -1350,7 +1350,7 @@ void TupleHashJoinStep::startJoinThreads()
for (i = 0; i < smallSideCount; i++)
smallRGs[i] = joiners[i]->getSmallRG();
columnMappings.reset(new shared_array<int>[smallSideCount + 1]);
columnMappings.reset(new std::shared_ptr<int[]>[smallSideCount + 1]);
for (i = 0; i < smallSideCount; i++)
columnMappings[i] = makeMapping(smallRGs[i], outputRG);
@ -1359,7 +1359,7 @@ void TupleHashJoinStep::startJoinThreads()
if (!feIndexes.empty())
{
fergMappings.reset(new shared_array<int>[smallSideCount + 1]);
fergMappings.reset(new std::shared_ptr<int[]>[smallSideCount + 1]);
for (i = 0; i < smallSideCount; i++)
fergMappings[i] = makeMapping(smallRGs[i], joinFilterRG);
@ -1406,11 +1406,11 @@ void TupleHashJoinStep::finishSmallOuterJoin()
vector<Row::Pointer> unmatched;
uint32_t smallSideCount = smallDLs.size();
uint32_t i, j, k;
shared_array<uint8_t> largeNullMemory;
std::shared_ptr<uint8_t[]> largeNullMemory;
RGData joinedData;
Row joinedBaseRow, fe2InRow, fe2OutRow;
shared_array<Row> smallRowTemplates;
shared_array<Row> smallNullRows;
std::shared_ptr<Row[]> smallRowTemplates;
std::shared_ptr<Row[]> smallNullRows;
Row largeNullRow;
RowGroup l_outputRG = outputRG;
RowGroup l_fe2Output = fe2Output;
@ -1511,11 +1511,11 @@ void TupleHashJoinStep::joinRunnerFcn(uint32_t threadID)
uint32_t i;
/* thread-local scratch space for join processing */
shared_array<uint8_t> joinFERowData;
std::shared_ptr<uint8_t[]> joinFERowData;
Row largeRow, joinFERow, joinedRow, baseRow;
shared_array<uint8_t> baseRowData;
std::shared_ptr<uint8_t[]> baseRowData;
vector<vector<Row::Pointer> > joinMatches;
shared_array<Row> smallRowTemplates;
std::shared_ptr<Row[]> smallRowTemplates;
/* F & E vars */
FuncExpWrapper local_fe;
@ -1706,11 +1706,11 @@ void TupleHashJoinStep::grabSomeWork(vector<RGData>* work)
void TupleHashJoinStep::joinOneRG(
uint32_t threadID, vector<RGData>& out, RowGroup& inputRG, RowGroup& joinOutput, Row& largeSideRow,
Row& joinFERow, Row& joinedRow, Row& baseRow, vector<vector<Row::Pointer> >& joinMatches,
shared_array<Row>& smallRowTemplates, RowGroupDL* outputDL,
std::shared_ptr<Row[]>& smallRowTemplates, RowGroupDL* outputDL,
// disk-join support vars. This param list is insane; refactor attempt would be nice at some point.
vector<std::shared_ptr<joiner::TupleJoiner> >* tjoiners,
boost::shared_array<boost::shared_array<int> >* rgMappings,
boost::shared_array<boost::shared_array<int> >* feMappings,
std::shared_ptr<std::shared_ptr<int[]>[] >* rgMappings,
std::shared_ptr<std::shared_ptr<int[]>[] >* feMappings,
boost::scoped_array<boost::scoped_array<uint8_t> >* smallNullMem)
{
/* Disk-join support.
@ -1841,9 +1841,9 @@ void TupleHashJoinStep::joinOneRG(
}
void TupleHashJoinStep::generateJoinResultSet(const vector<vector<Row::Pointer> >& joinerOutput, Row& baseRow,
const shared_array<shared_array<int> >& mappings,
const std::shared_ptr<std::shared_ptr<int[]>[] >& mappings,
const uint32_t depth, RowGroup& l_outputRG, RGData& rgData,
vector<RGData>& outputData, const shared_array<Row>& smallRows,
vector<RGData>& outputData, const std::shared_ptr<Row[]>& smallRows,
Row& joinedRow, RowGroupDL* dlp)
{
uint32_t i;

View File

@ -536,10 +536,10 @@ class TupleHashJoinStep : public JobStep, public TupleDeliveryStep
void startJoinThreads();
void generateJoinResultSet(const std::vector<std::vector<rowgroup::Row::Pointer> >& joinerOutput,
rowgroup::Row& baseRow,
const boost::shared_array<boost::shared_array<int> >& mappings,
const std::shared_ptr<std::shared_ptr<int[]>[] >& mappings,
const uint32_t depth, rowgroup::RowGroup& outputRG, rowgroup::RGData& rgData,
std::vector<rowgroup::RGData>& outputData,
const boost::shared_array<rowgroup::Row>& smallRows, rowgroup::Row& joinedRow,
const std::shared_ptr<rowgroup::Row[]>& smallRows, rowgroup::Row& joinedRow,
RowGroupDL* outputDL);
void grabSomeWork(std::vector<rowgroup::RGData>* work);
void sendResult(const std::vector<rowgroup::RGData>& res);
@ -550,19 +550,19 @@ class TupleHashJoinStep : public JobStep, public TupleDeliveryStep
rowgroup::RowGroup& joinOutput, rowgroup::Row& largeSideRow, rowgroup::Row& joinFERow,
rowgroup::Row& joinedRow, rowgroup::Row& baseRow,
std::vector<std::vector<rowgroup::Row::Pointer> >& joinMatches,
boost::shared_array<rowgroup::Row>& smallRowTemplates, RowGroupDL* outputDL,
std::shared_ptr<rowgroup::Row[]>& smallRowTemplates, RowGroupDL* outputDL,
std::vector<std::shared_ptr<joiner::TupleJoiner> >* joiners = NULL,
boost::shared_array<boost::shared_array<int> >* rgMappings = NULL,
boost::shared_array<boost::shared_array<int> >* feMappings = NULL,
boost::scoped_array<boost::scoped_array<uint8_t> >* smallNullMem = NULL);
std::shared_ptr<std::shared_ptr<int[]>[] >* rgMappings = NULL,
std::shared_ptr<std::shared_ptr<int[]>[] >* feMappings = NULL,
boost::scoped_array<boost::scoped_array<uint8_t>>* smallNullMem = NULL);
void finishSmallOuterJoin();
void makeDupList(const rowgroup::RowGroup& rg);
void processDupList(uint32_t threadID, rowgroup::RowGroup& ingrp, std::vector<rowgroup::RGData>* rowData);
std::vector<uint64_t> joinRunners; // thread handles from thread pool
boost::mutex inputDLLock, outputDLLock;
boost::shared_array<boost::shared_array<int> > columnMappings, fergMappings;
boost::shared_array<int> fe2Mapping;
std::shared_ptr<std::shared_ptr<int[]>[]> columnMappings, fergMappings;
std::shared_ptr<int[]> fe2Mapping;
uint32_t joinThreadCount;
boost::scoped_array<boost::scoped_array<uint8_t> > smallNullMemory;
uint64_t outputIt;

View File

@ -24,7 +24,7 @@
using namespace std;
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/uuid/uuid_io.hpp>
using namespace boost;

View File

@ -26,7 +26,7 @@ using namespace std;
#include <boost/algorithm/string.hpp> // to_upper_copy
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <boost/thread.hpp>
#include <boost/uuid/uuid_io.hpp>
using namespace boost;
@ -1033,7 +1033,7 @@ void WindowFunctionStep::doFunction()
void WindowFunctionStep::doPostProcessForSelect()
{
FuncExp* fe = funcexp::FuncExp::instance();
boost::shared_array<int> mapping = makeMapping(fRowGroupIn, fRowGroupOut);
std::shared_ptr<int[]> mapping = makeMapping(fRowGroupIn, fRowGroupOut);
Row rowIn, rowOut;
fRowGroupIn.initRow(&rowIn);
fRowGroupOut.initRow(&rowOut);
@ -1089,7 +1089,7 @@ void WindowFunctionStep::doPostProcessForSelect()
void WindowFunctionStep::doPostProcessForDml()
{
FuncExp* fe = funcexp::FuncExp::instance();
boost::shared_array<int> mapping = makeMapping(fRowGroupIn, fRowGroupOut);
std::shared_ptr<int[]> mapping = makeMapping(fRowGroupIn, fRowGroupOut);
Row rowIn, rowOut;
fRowGroupIn.initRow(&rowIn);
fRowGroupOut.initRow(&rowOut);