diff --git a/VERSION b/VERSION index 276af06e0..6830abc60 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ COLUMNSTORE_VERSION_MAJOR=1 COLUMNSTORE_VERSION_MINOR=1 -COLUMNSTORE_VERSION_PATCH=0 +COLUMNSTORE_VERSION_PATCH=1 COLUMNSTORE_VERSION_RELEASE=1 diff --git a/dbcon/joblist/crossenginestep.cpp b/dbcon/joblist/crossenginestep.cpp index 4a073297e..7f9f3199f 100644 --- a/dbcon/joblist/crossenginestep.cpp +++ b/dbcon/joblist/crossenginestep.cpp @@ -189,7 +189,7 @@ void CrossEngineStep::addFcnJoinExp(const vector& fe) void CrossEngineStep::addFcnExpGroup1(const boost::shared_ptr& fe) { - fFeFilters = fe; + fFeFilters.push_back(fe); } @@ -217,7 +217,7 @@ void CrossEngineStep::makeMappings() for (uint64_t i = 0; i < fColumnCount; ++i) fFe1Column[i] = -1; - if (fFeFilters != NULL || fFeFcnJoin.size() > 0) + if (fFeFilters.size() > 0 || fFeFcnJoin.size() > 0) { const std::vector& colInFe1 = fRowGroupFe1.getKeys(); for (uint64_t i = 0; i < colInFe1.size(); i++) @@ -499,7 +499,7 @@ void CrossEngineStep::execute() // Any functions to evaluate makeMappings(); - bool doFE1 = ((fFeFcnJoin.size() > 0) || (fFeFilters != NULL)); + bool doFE1 = ((fFeFcnJoin.size() > 0) || (fFeFilters.size() > 0)); bool doFE3 = (fFeSelects.size() > 0); if (!doFE1 && !doFE3) { @@ -529,8 +529,20 @@ void CrossEngineStep::execute() setField(fFe1Column[i], rowIn[i], mysql->getFieldLength(i), mysql->getField(i), rowFe1); } - if (fFeFilters && fFeInstance->evaluate(rowFe1, fFeFilters.get()) == false) - continue; + if (fFeFilters.size() > 0) + { + bool feBreak = false; + for (std::vector >::iterator it = fFeFilters.begin(); it != fFeFilters.end(); it++) + { + if (fFeInstance->evaluate(rowFe1, (*it).get()) == false) + { + feBreak = true; + break; + } + } + if (feBreak) + continue; + } // evaluate the FE join column fFeInstance->evaluate(rowFe1, fFeFcnJoin); @@ -592,8 +604,20 @@ void CrossEngineStep::execute() setField(fFe1Column[i], rowIn[i], mysql->getFieldLength(i), mysql->getField(i), rowFe1); } - if (fFeFilters && fFeInstance->evaluate(rowFe1, fFeFilters.get()) == false) - continue; + if (fFeFilters.size() > 0) + { + bool feBreak = false; + for (std::vector >::iterator it = fFeFilters.begin(); it != fFeFilters.end(); it++) + { + if (fFeInstance->evaluate(rowFe1, (*it).get()) == false) + { + feBreak = true; + break; + } + } + if (feBreak) + continue; + } // evaluate the FE join column fFeInstance->evaluate(rowFe1, fFeFcnJoin); diff --git a/dbcon/joblist/crossenginestep.h b/dbcon/joblist/crossenginestep.h index 82bb8eda3..30b715c25 100644 --- a/dbcon/joblist/crossenginestep.h +++ b/dbcon/joblist/crossenginestep.h @@ -211,7 +211,7 @@ protected: std::string fSelectClause; // Function & Expression columns - boost::shared_ptr fFeFilters; + std::vector > fFeFilters; std::vector > fFeSelects; std::vector > fFeFcnJoin; std::map fColumnMap; // projected key position (k->p) diff --git a/dbcon/mysql/ha_calpont_execplan.cpp b/dbcon/mysql/ha_calpont_execplan.cpp index 0b4b9ba46..494763c35 100755 --- a/dbcon/mysql/ha_calpont_execplan.cpp +++ b/dbcon/mysql/ha_calpont_execplan.cpp @@ -2655,7 +2655,7 @@ ArithmeticColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool } } - if (!lhs->data() || !rhs->data() || nonSupport) + if (nonSupport || !lhs->data() || !rhs->data()) { gwi.fatalParseError = true; if (gwi.parseErrorText.empty()) @@ -2688,7 +2688,7 @@ ArithmeticColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool gwi.rcWorkStack.pop(); } } - if (!rhs->data() || nonSupport) + if (nonSupport || !rhs->data()) { gwi.fatalParseError = true; if (gwi.parseErrorText.empty()) @@ -3606,6 +3606,10 @@ ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi) else { rc = buildReturnedColumn(ord_col, gwi, gwi.fatalParseError); + if (!rc || gwi.fatalParseError) + { + return NULL; + } } // 10.2 TODO: direction is now a tri-state flag rc->asc((*order_item)->direction == ORDER::ORDER_ASC ? true : false); diff --git a/oam/etc/Columnstore.xml b/oam/etc/Columnstore.xml index 165951ddb..6efa3f8aa 100644 --- a/oam/etc/Columnstore.xml +++ b/oam/etc/Columnstore.xml @@ -463,7 +463,6 @@ unassigned n 3306 - unassigned /dev/xvd y diff --git a/oam/etc/Columnstore.xml.singleserver b/oam/etc/Columnstore.xml.singleserver index ff466c398..9b3fed686 100644 --- a/oam/etc/Columnstore.xml.singleserver +++ b/oam/etc/Columnstore.xml.singleserver @@ -458,7 +458,6 @@ unassigned unassigned 3306 - unassigned