1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -22,62 +22,67 @@ using namespace std;
using namespace joblist;
using namespace utils;
namespace joiner {
namespace joiner
{
Joiner::Joiner(bool ia) : _includeAll(ia), _inPM(false), _pool(new SimplePool)
{
SimpleAllocator<pair<uint64_t const, uint64_t> > alloc(_pool);
h.reset(new hash_t(10, hash_t::hasher(), hash_t::key_equal(), alloc));
SimpleAllocator<pair<uint64_t const, uint64_t> > alloc(_pool);
h.reset(new hash_t(10, hash_t::hasher(), hash_t::key_equal(), alloc));
// cout << "Joiner()\n";
}
Joiner::Joiner()
{ }
Joiner::Joiner(const Joiner &j)
Joiner::Joiner(const Joiner& j)
{ }
Joiner & Joiner::operator=(const Joiner &j)
Joiner& Joiner::operator=(const Joiner& j)
{
return *this;
return *this;
}
Joiner::~Joiner()
Joiner::~Joiner()
{
// cout << "~Joiner()\n";
// get rid of the hash table first
h.reset();
// get rid of the hash table first
h.reset();
// delete _pool;
// _pool = NULL;
}
boost::shared_ptr<vector<ElementType> > Joiner::getSortedMatches()
{
boost::shared_ptr<vector<ElementType> > ret;
iterator it;
boost::shared_ptr<vector<ElementType> > ret;
iterator it;
ret.reset(new vector<ElementType>());
for (it = begin(); it != end(); ++it)
if (it->second & MSB)
ret->push_back(ElementType(it->second & ~MSB, it->first));
sort<vector<ElementType>::iterator>(ret->begin(), ret->end());
return ret;
ret.reset(new vector<ElementType>());
for (it = begin(); it != end(); ++it)
if (it->second & MSB)
ret->push_back(ElementType(it->second & ~MSB, it->first));
sort<vector<ElementType>::iterator>(ret->begin(), ret->end());
return ret;
}
boost::shared_ptr<std::vector<joblist::ElementType> > Joiner::getSmallSide()
{
boost::shared_ptr<vector<ElementType> > ret;
iterator it;
boost::shared_ptr<vector<ElementType> > ret;
iterator it;
ret.reset(new vector<ElementType>());
for (it = begin(); it != end(); ++it)
ret->push_back(ElementType(it->second & ~MSB, it->first));
return ret;
ret.reset(new vector<ElementType>());
for (it = begin(); it != end(); ++it)
ret->push_back(ElementType(it->second & ~MSB, it->first));
return ret;
}
void Joiner::doneInserting()
{
//sort here if the data structure is a vector
//sort here if the data structure is a vector
}
}