1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Merge pull request #730 from mariadb-corporation/MCOL-1559

Mcol 1559
This commit is contained in:
Andrew Hutchings
2019-04-11 08:00:02 +01:00
committed by GitHub
5 changed files with 14 additions and 5 deletions

View File

@@ -36,6 +36,7 @@
#endif
#include <cstring>
#include <boost/regex.hpp>
#include <boost/algorithm/string/trim.hpp>
#include "expressionparser.h"
#include "returnedcolumn.h"
@@ -456,16 +457,20 @@ inline bool PredicateOperator::getBoolVal(rowgroup::Row& row, bool& isNull, Retu
return !ret;
}
// MCOL-1559
std::string val1 = lop->getStrVal(row, isNull);
if (isNull)
return false;
const std::string& val1 = lop->getStrVal(row, isNull);
std::string val2 = rop->getStrVal(row, isNull);
if (isNull)
return false;
return strCompare(val1, rop->getStrVal(row, isNull)) && !isNull;
}
boost::trim_right_if(val1, boost::is_any_of(" "));
boost::trim_right_if(val2, boost::is_any_of(" "));
return strCompare(val1, val2);
}
//FIXME: ???
case execplan::CalpontSystemCatalog::VARBINARY:

View File

@@ -1636,7 +1636,6 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
string constval(cc->constval());
CalpontSystemCatalog::OID dictOid = 0;
CalpontSystemCatalog::ColType ct = sc->colType();
const PseudoColumn* pc = dynamic_cast<const PseudoColumn*>(sc);

View File

@@ -749,6 +749,7 @@ bool LBIDList::CasualPartitionPredicate(const int64_t Min,
int64_t tMax = Max;
dataconvert::DataConvert::trimWhitespace(tMin);
dataconvert::DataConvert::trimWhitespace(tMax);
dataconvert::DataConvert::trimWhitespace(value);
scan = compareVal(order_swap(tMin), order_swap(tMax), order_swap(value),
op, lcf);