Skip to content

Commit a347a8f

Browse files
committed
Merge branch 'develop-1.1' into develop
2 parents f6060a2 + 0139ae1 commit a347a8f

File tree

10 files changed

+74
-72
lines changed

10 files changed

+74
-72
lines changed

dbcon/joblist/tupleaggregatestep.cpp

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ namespace
7676

7777
struct cmpTuple
7878
{
79-
bool operator()(tuple<uint32_t, int, mcsv1sdk::mcsv1_UDAF*> a,
80-
tuple<uint32_t, int, mcsv1sdk::mcsv1_UDAF*> b)
79+
bool operator()(boost::tuple<uint32_t, int, mcsv1sdk::mcsv1_UDAF*> a,
80+
boost::tuple<uint32_t, int, mcsv1sdk::mcsv1_UDAF*> b)
8181
{
82-
if (get<0>(a) < get<0>(b))
82+
if (boost::get<0>(a) < boost::get<0>(b))
8383
return true;
8484

85-
if (get<0>(a) == get<0>(b))
85+
if (boost::get<0>(a) == boost::get<0>(b))
8686
{
87-
if (get<1>(a) < get<1>(b))
87+
if (boost::get<1>(a) < boost::get<1>(b))
8888
return true;
8989

90-
if (get<1>(a) == get<1>(b))
91-
return get<2>(a) < get<2>(b);
90+
if (boost::get<1>(a) == boost::get<1>(b))
91+
return boost::get<2>(a) < boost::get<2>(b);
9292
}
9393

9494
return false;
@@ -101,7 +101,7 @@ typedef vector<RowBucket> RowBucketVec;
101101
// The AGG_MAP type is used to maintain a list of aggregate functions in order to
102102
// detect duplicates. Since all UDAF have the same op type (ROWAGG_UDAF), we add in
103103
// the function pointer in order to ensure uniqueness.
104-
typedef map<tuple<uint32_t, int, mcsv1sdk::mcsv1_UDAF*>, uint64_t, cmpTuple> AGG_MAP;
104+
typedef map<boost::tuple<uint32_t, int, mcsv1sdk::mcsv1_UDAF*>, uint64_t, cmpTuple> AGG_MAP;
105105

106106
inline RowAggFunctionType functionIdMap(int planFuncId)
107107
{
@@ -1477,7 +1477,7 @@ void TupleAggregateStep::prep1PhaseAggregate(
14771477
}
14781478

14791479
// find if this func is a duplicate
1480-
AGG_MAP::iterator iter = aggFuncMap.find(make_tuple(key, aggOp, pUDAFFunc));
1480+
AGG_MAP::iterator iter = aggFuncMap.find(boost::make_tuple(key, aggOp, pUDAFFunc));
14811481

14821482
if (iter != aggFuncMap.end())
14831483
{
@@ -1494,7 +1494,7 @@ void TupleAggregateStep::prep1PhaseAggregate(
14941494
}
14951495
else
14961496
{
1497-
aggFuncMap.insert(make_pair(make_tuple(key, aggOp, pUDAFFunc), funct->fOutputColumnIndex));
1497+
aggFuncMap.insert(make_pair(boost::make_tuple(key, aggOp, pUDAFFunc), funct->fOutputColumnIndex));
14981498
}
14991499
}
15001500

@@ -1704,7 +1704,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
17041704
typeAgg.push_back(typeProj[colProj]);
17051705
widthAgg.push_back(widthProj[colProj]);
17061706

1707-
aggFuncMap.insert(make_pair(make_tuple(keysAgg[colAgg], 0, pUDAFFunc), colAgg));
1707+
aggFuncMap.insert(make_pair(boost::make_tuple(keysAgg[colAgg], 0, pUDAFFunc), colAgg));
17081708
colAgg++;
17091709
}
17101710

@@ -1745,7 +1745,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
17451745
typeAgg.push_back(typeProj[colProj]);
17461746
widthAgg.push_back(widthProj[colProj]);
17471747

1748-
aggFuncMap.insert(make_pair(make_tuple(keysAgg[colAgg], 0, pUDAFFunc), colAgg));
1748+
aggFuncMap.insert(make_pair(boost::make_tuple(keysAgg[colAgg], 0, pUDAFFunc), colAgg));
17491749
colAgg++;
17501750
}
17511751

@@ -1775,7 +1775,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
17751775
SP_ROWAGG_FUNC_t funct(new RowAggFunctionCol(
17761776
aggOp, stats, colAgg, colAgg, -1));
17771777
functionVec1.push_back(funct);
1778-
aggFuncMap.insert(make_pair(make_tuple(aggKey, aggOp, pUDAFFunc), colAgg));
1778+
aggFuncMap.insert(make_pair(boost::make_tuple(aggKey, aggOp, pUDAFFunc), colAgg));
17791779
colAgg++;
17801780

17811781
continue;
@@ -1831,11 +1831,11 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
18311831
}
18321832

18331833
// skip if this is a duplicate
1834-
if (aggFuncMap.find(make_tuple(aggKey, aggOp, pUDAFFunc)) != aggFuncMap.end())
1834+
if (aggFuncMap.find(boost::make_tuple(aggKey, aggOp, pUDAFFunc)) != aggFuncMap.end())
18351835
continue;
18361836

18371837
functionVec1.push_back(funct);
1838-
aggFuncMap.insert(make_pair(make_tuple(aggKey, aggOp, pUDAFFunc), colAgg));
1838+
aggFuncMap.insert(make_pair(boost::make_tuple(aggKey, aggOp, pUDAFFunc), colAgg));
18391839

18401840
switch (aggOp)
18411841
{
@@ -2081,7 +2081,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
20812081
{
20822082
SP_ROWAGG_GRPBY_t groupby(new RowAggGroupByCol(i, -1));
20832083
groupByNoDist.push_back(groupby);
2084-
aggFuncMap.insert(make_pair(make_tuple(keysAgg[i], 0, pUDAFFunc), i));
2084+
aggFuncMap.insert(make_pair(boost::make_tuple(keysAgg[i], 0, pUDAFFunc), i));
20852085
}
20862086

20872087
// locate the return column position in aggregated rowgroup
@@ -2096,7 +2096,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
20962096
if (find(jobInfo.distinctColVec.begin(), jobInfo.distinctColVec.end(), retKey) !=
20972097
jobInfo.distinctColVec.end() )
20982098
{
2099-
AGG_MAP::iterator it = aggFuncMap.find(make_tuple(retKey, 0, pUDAFFunc));
2099+
AGG_MAP::iterator it = aggFuncMap.find(boost::make_tuple(retKey, 0, pUDAFFunc));
21002100

21012101
if (it != aggFuncMap.end())
21022102
{
@@ -2208,7 +2208,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
22082208
case ROWAGG_BIT_XOR:
22092209
default:
22102210
{
2211-
AGG_MAP::iterator it = aggFuncMap.find(make_tuple(retKey, aggOp, pUDAFFunc));
2211+
AGG_MAP::iterator it = aggFuncMap.find(boost::make_tuple(retKey, aggOp, pUDAFFunc));
22122212

22132213
if (it != aggFuncMap.end())
22142214
{
@@ -2239,7 +2239,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
22392239
// check if a SUM or COUNT covered by AVG
22402240
if (aggOp == ROWAGG_SUM || aggOp == ROWAGG_COUNT_COL_NAME)
22412241
{
2242-
it = aggFuncMap.find(make_tuple(returnedColVec[i].first, ROWAGG_AVG, pUDAFFunc));
2242+
it = aggFuncMap.find(boost::make_tuple(returnedColVec[i].first, ROWAGG_AVG, pUDAFFunc));
22432243

22442244
if (it != aggFuncMap.end())
22452245
{
@@ -2417,7 +2417,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
24172417
functionVec2.push_back(funct);
24182418

24192419
// find if this func is a duplicate
2420-
AGG_MAP::iterator iter = aggDupFuncMap.find(make_tuple(retKey, aggOp, pUDAFFunc));
2420+
AGG_MAP::iterator iter = aggDupFuncMap.find(boost::make_tuple(retKey, aggOp, pUDAFFunc));
24212421

24222422
if (iter != aggDupFuncMap.end())
24232423
{
@@ -2434,7 +2434,7 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(
24342434
}
24352435
else
24362436
{
2437-
aggDupFuncMap.insert(make_pair(make_tuple(retKey, aggOp, pUDAFFunc),
2437+
aggDupFuncMap.insert(make_pair(boost::make_tuple(retKey, aggOp, pUDAFFunc),
24382438
funct->fOutputColumnIndex));
24392439
}
24402440

@@ -2910,7 +2910,7 @@ void TupleAggregateStep::prep2PhasesAggregate(
29102910
typeAggPm.push_back(typeProj[colProj]);
29112911
widthAggPm.push_back(width[colProj]);
29122912

2913-
aggFuncMap.insert(make_pair(make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
2913+
aggFuncMap.insert(make_pair(boost::make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
29142914
colAggPm++;
29152915
}
29162916

@@ -2951,7 +2951,7 @@ void TupleAggregateStep::prep2PhasesAggregate(
29512951
typeAggPm.push_back(typeProj[colProj]);
29522952
widthAggPm.push_back(width[colProj]);
29532953

2954-
aggFuncMap.insert(make_pair(make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
2954+
aggFuncMap.insert(make_pair(boost::make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
29552955
colAggPm++;
29562956
}
29572957

@@ -3011,11 +3011,11 @@ void TupleAggregateStep::prep2PhasesAggregate(
30113011
}
30123012

30133013
// skip if this is a duplicate
3014-
if (aggFuncMap.find(make_tuple(aggKey, aggOp, pUDAFFunc)) != aggFuncMap.end())
3014+
if (aggFuncMap.find(boost::make_tuple(aggKey, aggOp, pUDAFFunc)) != aggFuncMap.end())
30153015
continue;
30163016

30173017
functionVecPm.push_back(funct);
3018-
aggFuncMap.insert(make_pair(make_tuple(aggKey, aggOp, pUDAFFunc), colAggPm));
3018+
aggFuncMap.insert(make_pair(boost::make_tuple(aggKey, aggOp, pUDAFFunc), colAggPm));
30193019

30203020
switch (aggOp)
30213021
{
@@ -3269,7 +3269,7 @@ void TupleAggregateStep::prep2PhasesAggregate(
32693269
pUDAFFunc = udafc->getContext().getFunction();
32703270
}
32713271

3272-
AGG_MAP::iterator it = aggFuncMap.find(make_tuple(retKey, aggOp, pUDAFFunc));
3272+
AGG_MAP::iterator it = aggFuncMap.find(boost::make_tuple(retKey, aggOp, pUDAFFunc));
32733273

32743274
if (it != aggFuncMap.end())
32753275
{
@@ -3290,7 +3290,7 @@ void TupleAggregateStep::prep2PhasesAggregate(
32903290
// check if a SUM or COUNT covered by AVG
32913291
if (aggOp == ROWAGG_SUM || aggOp == ROWAGG_COUNT_COL_NAME)
32923292
{
3293-
it = aggFuncMap.find(make_tuple(returnedColVec[i].first, ROWAGG_AVG, pUDAFFunc));
3293+
it = aggFuncMap.find(boost::make_tuple(returnedColVec[i].first, ROWAGG_AVG, pUDAFFunc));
32943294

32953295
if (it != aggFuncMap.end())
32963296
{
@@ -3435,7 +3435,7 @@ void TupleAggregateStep::prep2PhasesAggregate(
34353435
functionVecUm.push_back(funct);
34363436

34373437
// find if this func is a duplicate
3438-
AGG_MAP::iterator iter = aggDupFuncMap.find(make_tuple(retKey, aggOp, pUDAFFunc));
3438+
AGG_MAP::iterator iter = aggDupFuncMap.find(boost::make_tuple(retKey, aggOp, pUDAFFunc));
34393439

34403440
if (iter != aggDupFuncMap.end())
34413441
{
@@ -3452,7 +3452,7 @@ void TupleAggregateStep::prep2PhasesAggregate(
34523452
}
34533453
else
34543454
{
3455-
aggDupFuncMap.insert(make_pair(make_tuple(retKey, aggOp, pUDAFFunc),
3455+
aggDupFuncMap.insert(make_pair(boost::make_tuple(retKey, aggOp, pUDAFFunc),
34563456
funct->fOutputColumnIndex));
34573457
}
34583458

@@ -3707,7 +3707,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
37073707
typeAggPm.push_back(typeProj[colProj]);
37083708
widthAggPm.push_back(width[colProj]);
37093709

3710-
aggFuncMap.insert(make_pair(make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
3710+
aggFuncMap.insert(make_pair(boost::make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
37113711
colAggPm++;
37123712
}
37133713

@@ -3748,7 +3748,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
37483748
typeAggPm.push_back(typeProj[colProj]);
37493749
widthAggPm.push_back(width[colProj]);
37503750

3751-
aggFuncMap.insert(make_pair(make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
3751+
aggFuncMap.insert(make_pair(boost::make_tuple(keysAggPm[colAggPm], 0, pUDAFFunc), colAggPm));
37523752
colAggPm++;
37533753
}
37543754

@@ -3815,11 +3815,11 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
38153815
}
38163816

38173817
// skip if this is a duplicate
3818-
if (aggFuncMap.find(make_tuple(aggKey, aggOp, pUDAFFunc)) != aggFuncMap.end())
3818+
if (aggFuncMap.find(boost::make_tuple(aggKey, aggOp, pUDAFFunc)) != aggFuncMap.end())
38193819
continue;
38203820

38213821
functionVecPm.push_back(funct);
3822-
aggFuncMap.insert(make_pair(make_tuple(aggKey, aggOp, pUDAFFunc), colAggPm));
3822+
aggFuncMap.insert(make_pair(boost::make_tuple(aggKey, aggOp, pUDAFFunc), colAggPm));
38233823

38243824
switch (aggOp)
38253825
{
@@ -4110,7 +4110,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
41104110
if (find(jobInfo.distinctColVec.begin(), jobInfo.distinctColVec.end(), retKey) !=
41114111
jobInfo.distinctColVec.end() )
41124112
{
4113-
AGG_MAP::iterator it = aggFuncMap.find(make_tuple(retKey, 0, pUDAFFunc));
4113+
AGG_MAP::iterator it = aggFuncMap.find(boost::make_tuple(retKey, 0, pUDAFFunc));
41144114

41154115
if (it != aggFuncMap.end())
41164116
{
@@ -4228,7 +4228,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
42284228
case ROWAGG_CONSTANT:
42294229
default:
42304230
{
4231-
AGG_MAP::iterator it = aggFuncMap.find(make_tuple(retKey, aggOp, pUDAFFunc));
4231+
AGG_MAP::iterator it = aggFuncMap.find(boost::make_tuple(retKey, aggOp, pUDAFFunc));
42324232

42334233
if (it != aggFuncMap.end())
42344234
{
@@ -4249,7 +4249,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
42494249
// check if a SUM or COUNT covered by AVG
42504250
if (aggOp == ROWAGG_SUM || aggOp == ROWAGG_COUNT_COL_NAME)
42514251
{
4252-
it = aggFuncMap.find(make_tuple(returnedColVec[i].first, ROWAGG_AVG, pUDAFFunc));
4252+
it = aggFuncMap.find(boost::make_tuple(returnedColVec[i].first, ROWAGG_AVG, pUDAFFunc));
42534253

42544254
if (it != aggFuncMap.end())
42554255
{
@@ -4384,7 +4384,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
43844384
functionVecUm.push_back(funct);
43854385

43864386
// find if this func is a duplicate
4387-
AGG_MAP::iterator iter = aggDupFuncMap.find(make_tuple(retKey, aggOp, pUDAFFunc));
4387+
AGG_MAP::iterator iter = aggDupFuncMap.find(boost::make_tuple(retKey, aggOp, pUDAFFunc));
43884388

43894389
if (iter != aggDupFuncMap.end())
43904390
{
@@ -4401,7 +4401,7 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(
44014401
}
44024402
else
44034403
{
4404-
aggDupFuncMap.insert(make_pair(make_tuple(retKey, aggOp, pUDAFFunc),
4404+
aggDupFuncMap.insert(make_pair(boost::make_tuple(retKey, aggOp, pUDAFFunc),
44054405
funct->fOutputColumnIndex));
44064406
}
44074407

extra/format.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#!/bin/bash
12
astyle --style=allman --indent=spaces=4 --indent-switches --break-blocks --pad-comma --pad-oper --pad-header --lineend=linux --align-pointer=type --recursive "*.cpp" "*.h"

oam/etc/Columnstore.xml.singleserver

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@
458458
<JavaHome>unassigned</JavaHome>
459459
<JavaPath>unassigned</JavaPath>
460460
<MySQLPort>3306</MySQLPort>
461+
<DistributedInstall>y</DistributedInstall>
461462
</Installation>
462463
<ExtentMap>
463464
<!--

oamapps/postConfigure/installer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,9 @@ int main(int argc, char* argv[])
911911

912912
cout << "Enter 'mcsmysql' to access the MariaDB ColumnStore SQL console" << endl;
913913
cout << "Enter 'mcsadmin' to access the MariaDB ColumnStore Admin console" << endl << endl;
914+
915+
cout << "NOTE: The MariaDB ColumnStore Alias Commands are in /etc/profile.d/columnstoreAlias" << endl << endl;
916+
914917
exit (1);
915918
}
916919

oamapps/postConfigure/postConfigure.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3990,6 +3990,8 @@ int main(int argc, char* argv[])
39903990
cout << "Enter 'mcsmysql' to access the MariaDB ColumnStore SQL console" << endl;
39913991
cout << "Enter 'mcsadmin' to access the MariaDB ColumnStore Admin console" << endl << endl;
39923992

3993+
cout << "NOTE: The MariaDB ColumnStore Alias Commands are in /etc/profile.d/columnstoreAlias" << endl << endl;
3994+
39933995
exit(1);
39943996
}
39953997

procmgr/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ static void startMgrProcessThread()
602602
}
603603
catch (...)
604604
{
605-
log.writeLog(__LINE__, "addModule - ERROR: get DistributedInstall", LOG_TYPE_ERROR);
605+
log.writeLog(__LINE__, "ERROR: get DistributedInstall", LOG_TYPE_ERROR);
606606
}
607607

608608
//Send out a start service just to make sure Columnstore is runing on remote nodes

procmon/processmonitor.cpp

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5157,7 +5157,7 @@ int ProcessMonitor::changeMyCnf(std::string type)
51575157
{
51585158
*/ //get slave id based on ExeMgrx setup
51595159
string slaveID = "0";
5160-
string slaveModuleName = config.moduleName();
5160+
string localModuleName = config.moduleName();
51615161

51625162
for ( int id = 1 ; ; id++ )
51635163
{
@@ -5170,37 +5170,9 @@ int ProcessMonitor::changeMyCnf(std::string type)
51705170
Config* sysConfig = Config::makeConfig();
51715171
moduleName = sysConfig->getConfig(Section, "Module");
51725172

5173-
if ( moduleName == slaveModuleName )
5173+
if ( moduleName == localModuleName )
51745174
{
51755175
slaveID = oam.itoa(id);
5176-
5177-
// if slave ID from above is 1, then it means this is a former Original master and use the ID of the current Master
5178-
if ( slaveID == "1" )
5179-
{
5180-
string PrimaryUMModuleName;
5181-
oam.getSystemConfig("PrimaryUMModuleName", PrimaryUMModuleName);
5182-
5183-
for ( int mid = 1 ; ; mid++ )
5184-
{
5185-
string Section = "ExeMgr" + oam.itoa(mid);
5186-
5187-
string moduleName;
5188-
5189-
try
5190-
{
5191-
Config* sysConfig = Config::makeConfig();
5192-
moduleName = sysConfig->getConfig(Section, "Module");
5193-
5194-
if ( moduleName == PrimaryUMModuleName )
5195-
{
5196-
slaveID = oam.itoa(mid);
5197-
break;
5198-
}
5199-
}
5200-
catch (...) {}
5201-
}
5202-
}
5203-
52045176
break;
52055177
}
52065178
}

0 commit comments

Comments
 (0)