diff --git a/dbcon/execplan/calpontsystemcatalog.cpp b/dbcon/execplan/calpontsystemcatalog.cpp index f122fbae8..f8271affd 100644 --- a/dbcon/execplan/calpontsystemcatalog.cpp +++ b/dbcon/execplan/calpontsystemcatalog.cpp @@ -108,6 +108,44 @@ namespace namespace execplan { + +ColumnCommandDataType::ColumnCommandDataType(const CalpontSystemCatalog::DataType &rhs, + bool fudge) + :DataType(rhs), + mIsDict(false) +{ + if (!fudge) + return; + + //If this is a dictionary column, fudge the numbers... + if (colDataType == CalpontSystemCatalog::VARCHAR ) + colWidth++; + + //If this is a dictionary column, fudge the numbers... + if ((colDataType == CalpontSystemCatalog::VARBINARY) + || (colDataType == CalpontSystemCatalog::BLOB) + || (colDataType == CalpontSystemCatalog::TEXT)) + { + colWidth = 8; + mIsDict = true; + } + // MCOL-641 WIP + else if (colWidth > 8 + && colDataType != CalpontSystemCatalog::DECIMAL + && colDataType != CalpontSystemCatalog::UDECIMAL) + { + colWidth = 8; + mIsDict = true; + } + + //Round colWidth up + if (colWidth == 3) + colWidth = 4; + else if (colWidth == 5 || colWidth == 6 || colWidth == 7) + colWidth = 8; +} + + const SOP opeq(new Operator("=")); const string colDataTypeToString(CalpontSystemCatalog::ColDataType cdt) @@ -6090,43 +6128,34 @@ CalpontSystemCatalog::ColType::ColType() : constraintType(NO_CONSTRAINT), defaultValue(""), colPosition(-1), - compressionType(NO_COMPRESSION), columnOID(0), autoincrement(0), - nextvalue(0), - cs(NULL) + nextvalue(0) { - charsetNumber = default_charset_info->number; } CalpontSystemCatalog::ColType::ColType(const ColType& rhs) - :TypeHolderStd(rhs) + :DataType(rhs) { constraintType = rhs.constraintType; ddn = rhs.ddn; defaultValue = rhs.defaultValue; colPosition = rhs.colPosition; - compressionType = rhs.compressionType; columnOID = rhs.columnOID; autoincrement = rhs.autoincrement; nextvalue = rhs.nextvalue; - charsetNumber = rhs.charsetNumber; - cs = rhs.cs; } CalpontSystemCatalog::ColType& CalpontSystemCatalog::ColType::operator=(const ColType& rhs) { - TypeHolderStd::operator=(rhs); + DataType::operator=(rhs); constraintType = rhs.constraintType; ddn = rhs.ddn; defaultValue = rhs.defaultValue; colPosition = rhs.colPosition; - compressionType = rhs.compressionType; columnOID = rhs.columnOID; autoincrement = rhs.autoincrement; nextvalue = rhs.nextvalue; - charsetNumber = rhs.charsetNumber; - cs = rhs.cs; return *this; } @@ -6134,11 +6163,11 @@ CalpontSystemCatalog::ColType& CalpontSystemCatalog::ColType::operator=(const Co -CHARSET_INFO* CalpontSystemCatalog::ColType::getCharset() +CHARSET_INFO* CalpontSystemCatalog::DataType::getCharset() { - if (!cs) - cs= & datatypes::Charset(charsetNumber).getCharset(); - return cs; + if (!mCharset) + mCharset= & datatypes::Charset(charsetNumber).getCharset(); + return mCharset; } const string CalpontSystemCatalog::ColType::toString() const diff --git a/dbcon/execplan/calpontsystemcatalog.h b/dbcon/execplan/calpontsystemcatalog.h index 8f64b90cb..c3ab5d719 100644 --- a/dbcon/execplan/calpontsystemcatalog.h +++ b/dbcon/execplan/calpontsystemcatalog.h @@ -198,26 +198,19 @@ public: typedef std::vector DictOIDList; - /** the structure returned by colType - * - * defaultValue is only meaningful when constraintType == DEFAULT_CONSTRAINT - */ - struct ColType: public datatypes::SystemCatalog::TypeHolderStd + class DataType: public datatypes::SystemCatalog::TypeHolderStd { - ColType(); - ConstraintType constraintType; - DictOID ddn; - std::string defaultValue; - int32_t colPosition; // temporally put here. may need to have ColInfo struct later + public: int32_t compressionType; - OID columnOID; - bool autoincrement; //set to true if SYSCOLUMN autoincrement is �y� - uint64_t nextvalue; //next autoincrement value uint32_t charsetNumber; - const CHARSET_INFO* cs; - - ColType(const ColType& rhs); - ColType& operator=(const ColType& rhs); + protected: + const CHARSET_INFO* mCharset; + public: + DataType() + :compressionType(NO_COMPRESSION), + charsetNumber(63), // &my_charset_bin + mCharset(nullptr) + { } CHARSET_INFO* getCharset(); // for F&E use. only serialize necessary info for now @@ -242,6 +235,27 @@ public: b >> (uint32_t&)compressionType; b >> charsetNumber; } + }; + + + /** the structure returned by colType + * + * defaultValue is only meaningful when constraintType == DEFAULT_CONSTRAINT + */ + struct ColType: public DataType + { + ColType(); + ConstraintType constraintType; + DictOID ddn; + std::string defaultValue; + int32_t colPosition; // temporally put here. may need to have ColInfo struct later + OID columnOID; + bool autoincrement; //set to true if SYSCOLUMN autoincrement is �y� + uint64_t nextvalue; //next autoincrement value + + ColType(const ColType& rhs); + ColType& operator=(const ColType& rhs); + /** * @brief convert a columns data, represnted as a string, @@ -885,6 +899,52 @@ private: static uint32_t fModuleID; }; + +class ColumnCommandDataType: public CalpontSystemCatalog::DataType +{ + bool mIsDict; +public: + ColumnCommandDataType() + :DataType(), + mIsDict(false) + { } + explicit ColumnCommandDataType(const DataType &rhs, bool fudge); + bool isDict() const + { + return mIsDict; + } + void serialize(messageqcpp::ByteStream& bs) const + { + bs << (uint8_t) colDataType; + bs << (uint8_t) colWidth; + bs << (uint8_t) scale; + bs << (uint8_t) compressionType; + bs << (uint32_t) charsetNumber; + bs << (bool) mIsDict; + } + void unserialize(messageqcpp::ByteStream& bs) + { + uint8_t tmp8; + uint32_t tmp32; + bool tmpBool; + bs >> tmp8; + colDataType = (execplan::CalpontSystemCatalog::ColDataType) tmp8; + bs >> tmp8; + colWidth = tmp8; + bs >> tmp8; + scale = tmp8; + bs >> tmp8; + compressionType = tmp8; + bs >> tmp32; + charsetNumber = tmp32; + mCharset = nullptr; + bs >> tmpBool; + mIsDict = tmpBool; + } +}; + + + /** convenience function to make a TableColName from 3 strings */ const CalpontSystemCatalog::TableColName make_tcn(const std::string& s, const std::string& t, const std::string& c, int lower_case_table_names=0); @@ -897,12 +957,12 @@ const CalpontSystemCatalog::TableAliasName make_aliastable(const std::string& s, const CalpontSystemCatalog::TableAliasName make_aliasview(const std::string& s, const std::string& t, const std::string& a, const std::string& v, const bool fisColumnStore = true, int lower_case_table_names=0); -inline bool isNull(int128_t val, const execplan::CalpontSystemCatalog::ColType& ct) +inline bool isNull(int128_t val, const execplan::CalpontSystemCatalog::DataType& ct) { return datatypes::Decimal::isWideDecimalNullValue(val); } -inline bool isNull(int64_t val, const execplan::CalpontSystemCatalog::ColType& ct) +inline bool isNull(int64_t val, const execplan::CalpontSystemCatalog::DataType& ct) { bool ret = false; diff --git a/dbcon/joblist/batchprimitiveprocessor-jl.cpp b/dbcon/joblist/batchprimitiveprocessor-jl.cpp index c155cf1ec..108a169d8 100644 --- a/dbcon/joblist/batchprimitiveprocessor-jl.cpp +++ b/dbcon/joblist/batchprimitiveprocessor-jl.cpp @@ -756,7 +756,8 @@ void BatchPrimitiveProcessorJL::deserializeAggregateResult(ByteStream* in, void BatchPrimitiveProcessorJL::getRowGroupData(ByteStream& in, vector* out, bool* validCPData, uint64_t* lbid, int128_t* min, int128_t* max, uint32_t* cachedIO, uint32_t* physIO, uint32_t* touchedBlocks, bool* countThis, - uint32_t threadID, bool* hasWideColumn, const execplan::CalpontSystemCatalog::ColType& colType) const + uint32_t threadID, bool* hasWideColumn, + const ColumnCommandDataType& colType) const { uint64_t tmp64; int128_t tmp128; diff --git a/dbcon/joblist/batchprimitiveprocessor-jl.h b/dbcon/joblist/batchprimitiveprocessor-jl.h index cdc03e262..fd8c1e9d4 100644 --- a/dbcon/joblist/batchprimitiveprocessor-jl.h +++ b/dbcon/joblist/batchprimitiveprocessor-jl.h @@ -171,7 +171,8 @@ public: void getRowGroupData(messageqcpp::ByteStream& in, std::vector* out, bool* validCPData, uint64_t* lbid, int128_t* min, int128_t* max, uint32_t* cachedIO, uint32_t* physIO, uint32_t* touchedBlocks, bool* countThis, - uint32_t threadID, bool* hasBinaryColumn, const execplan::CalpontSystemCatalog::ColType& colType) const; + uint32_t threadID, bool* hasBinaryColumn, + const execplan::ColumnCommandDataType & colType) const; void deserializeAggregateResult(messageqcpp::ByteStream* in, std::vector* out) const; bool countThisMsg(messageqcpp::ByteStream& in) const; diff --git a/dbcon/joblist/columncommand-jl.cpp b/dbcon/joblist/columncommand-jl.cpp index 1910e7e7a..acde9cdb6 100644 --- a/dbcon/joblist/columncommand-jl.cpp +++ b/dbcon/joblist/columncommand-jl.cpp @@ -45,6 +45,7 @@ namespace joblist { ColumnCommandJL::ColumnCommandJL(const pColScanStep& scan, vector lastLBID) + :colType(scan.fColType) { BRM::DBRM dbrm; isScan = true; @@ -53,13 +54,11 @@ ColumnCommandJL::ColumnCommandJL(const pColScanStep& scan, vector l traceFlags = scan.fTraceFlags; filterString = scan.fFilterString; filterCount = scan.fFilterCount; - colType = scan.fColType; BOP = scan.fBOP; extents = scan.extents; OID = scan.fOid; colName = scan.fName; rpbShift = scan.rpbShift; - fIsDict = scan.fIsDict; fLastLbid = lastLBID; //cout << "CCJL inherited lastlbids: "; @@ -84,6 +83,7 @@ ColumnCommandJL::ColumnCommandJL(const pColScanStep& scan, vector l } ColumnCommandJL::ColumnCommandJL(const pColStep& step) + :colType(step.fColType) { BRM::DBRM dbrm; @@ -93,7 +93,6 @@ ColumnCommandJL::ColumnCommandJL(const pColStep& step) traceFlags = step.fTraceFlags; filterString = step.fFilterString; filterCount = step.fFilterCount; - colType = step.fColType; BOP = step.fBOP; extents = step.extents; divShift = step.divShift; @@ -101,7 +100,6 @@ ColumnCommandJL::ColumnCommandJL(const pColStep& step) rpbShift = step.rpbShift; OID = step.fOid; colName = step.fName; - fIsDict = step.fIsDict; ResourceManager* rm = ResourceManager::instance(); numDBRoots = rm->getDBRootCount(); @@ -148,11 +146,7 @@ void ColumnCommandJL::createCommand(ByteStream& bs) const cout << endl; #endif - bs << (uint8_t) colType.colDataType; - bs << (uint8_t) colType.colWidth; - bs << (uint8_t) colType.scale; - bs << (uint8_t) colType.compressionType; - bs << (uint32_t) colType.charsetNumber; + colType.serialize(bs); bs << BOP; bs << filterCount; serializeInlineVector(bs, fLastLbid); diff --git a/dbcon/joblist/columncommand-jl.h b/dbcon/joblist/columncommand-jl.h index 9206f484d..b07e56a3c 100644 --- a/dbcon/joblist/columncommand-jl.h +++ b/dbcon/joblist/columncommand-jl.h @@ -72,13 +72,13 @@ public: { return extents; } - const execplan::CalpontSystemCatalog::ColType& getColType() const + const execplan::ColumnCommandDataType& getColType() const { return colType; } bool isDict() const { - return fIsDict; + return colType.isDict(); } void scan(bool b) @@ -96,7 +96,7 @@ protected: uint32_t currentExtentIndex; messageqcpp::ByteStream filterString; std::vector extents; - execplan::CalpontSystemCatalog::ColType colType; + execplan::ColumnCommandDataType colType; private: ColumnCommandJL(); @@ -112,8 +112,6 @@ private: uint16_t filterCount; std::vector fLastLbid; - bool fIsDict; - // @Bug 2889. Added two members below for drop partition enhancement. // RJD: make sure that we keep enough significant digits around for partition math uint64_t fFilesPerColumnPartition; diff --git a/dbcon/joblist/lbidlist.cpp b/dbcon/joblist/lbidlist.cpp index 53bed0168..bf79509d1 100644 --- a/dbcon/joblist/lbidlist.cpp +++ b/dbcon/joblist/lbidlist.cpp @@ -351,7 +351,7 @@ int LBIDList::getMinMaxFromEntries(T& min, T& max, int32_t& seq, template void LBIDList::UpdateMinMax(T min, T max, int64_t lbid, - const CalpontSystemCatalog::ColType & type, + const ColumnCommandDataType & type, bool validData) { MinMaxPartition* mmp = NULL; @@ -392,7 +392,7 @@ void LBIDList::UpdateMinMax(T min, T max, int64_t lbid, { if (datatypes::isCharType(type.colDataType)) { - datatypes::Charset cs(const_cast(type).getCharset()); + datatypes::Charset cs(const_cast(type).getCharset()); if (datatypes::TCharShort::strnncollsp(cs, min, mmp->min, type.colWidth) < 0 || mmp->min == numeric_limits::max()) mmp->min = min; @@ -450,7 +450,7 @@ void LBIDList::UpdateMinMax(T min, T max, int64_t lbid, } } -void LBIDList::UpdateAllPartitionInfo(const execplan::CalpontSystemCatalog::ColType& colType) +void LBIDList::UpdateAllPartitionInfo(const ColumnCommandDataType & colType) { MinMaxPartition* mmp = NULL; #ifdef DEBUG @@ -693,13 +693,13 @@ static inline bool compareStr(const datatypes::Charset &cs, template bool LBIDList::checkSingleValue(T min, T max, T value, - const execplan::CalpontSystemCatalog::ColType & type) + const ColumnCommandDataType & type) { if (isCharType(type.colDataType)) { // MCOL-641 LBIDList::CasualPartitionDataType() returns false if // width > 8 for a character type, so T cannot be int128_t here - datatypes::Charset cs(const_cast(type).getCharset()); + datatypes::Charset cs(const_cast(type).getCharset()); return datatypes::TCharShort::strnncollsp(cs, value, min, type.colWidth) >= 0 && datatypes::TCharShort::strnncollsp(cs, value, max, type.colWidth) <= 0; } @@ -716,13 +716,13 @@ bool LBIDList::checkSingleValue(T min, T max, T value, template bool LBIDList::checkRangeOverlap(T min, T max, T tmin, T tmax, - const execplan::CalpontSystemCatalog::ColType & type) + const ColumnCommandDataType & type) { if (isCharType(type.colDataType)) { // MCOL-641 LBIDList::CasualPartitionDataType() returns false if // width > 8 for a character type, so T cannot be int128_t here - datatypes::Charset cs(const_cast(type).getCharset()); + datatypes::Charset cs(const_cast(type).getCharset()); return datatypes::TCharShort::strnncollsp(cs, tmin, max, type.colWidth) <= 0 && datatypes::TCharShort::strnncollsp(cs, tmax, min, type.colWidth) >= 0; } @@ -740,7 +740,7 @@ bool LBIDList::checkRangeOverlap(T min, T max, T tmin, T tmax, bool LBIDList::CasualPartitionPredicate(const BRM::EMCasualPartition_t& cpRange, const messageqcpp::ByteStream* bs, const uint16_t NOPS, - const execplan::CalpontSystemCatalog::ColType& ct, + const ColumnCommandDataType& ct, const uint8_t BOP) { @@ -952,27 +952,27 @@ bool LBIDList::GetMinMax(int64_t* min, int64_t* max, int64_t* seq, template void LBIDList::UpdateMinMax(int128_t min, int128_t max, int64_t lbid, - const execplan::CalpontSystemCatalog::ColType & type, bool validData = true); + const ColumnCommandDataType & type, bool validData = true); template void LBIDList::UpdateMinMax(int64_t min, int64_t max, int64_t lbid, - const execplan::CalpontSystemCatalog::ColType & type, bool validData = true); + const ColumnCommandDataType & type, bool validData = true); template bool LBIDList::checkSingleValue(int128_t min, int128_t max, int128_t value, - const execplan::CalpontSystemCatalog::ColType & type); + const ColumnCommandDataType & type); template bool LBIDList::checkSingleValue(int64_t min, int64_t max, int64_t value, - const execplan::CalpontSystemCatalog::ColType & type); + const ColumnCommandDataType & type); template bool LBIDList::checkRangeOverlap(int128_t min, int128_t max, int128_t tmin, int128_t tmax, - const execplan::CalpontSystemCatalog::ColType & type); + const ColumnCommandDataType &type); template bool LBIDList::checkRangeOverlap(int64_t min, int64_t max, int64_t tmin, int64_t tmax, - const execplan::CalpontSystemCatalog::ColType & type); + const ColumnCommandDataType &type); } //namespace joblist diff --git a/dbcon/joblist/lbidlist.h b/dbcon/joblist/lbidlist.h index 5009d5039..d56e10050 100644 --- a/dbcon/joblist/lbidlist.h +++ b/dbcon/joblist/lbidlist.h @@ -104,25 +104,25 @@ public: template void UpdateMinMax(T min, T max, int64_t lbid, - const execplan::CalpontSystemCatalog::ColType & type, bool validData = true); + const execplan::ColumnCommandDataType & type, bool validData = true); - void UpdateAllPartitionInfo(const execplan::CalpontSystemCatalog::ColType& colType); + void UpdateAllPartitionInfo(const execplan::ColumnCommandDataType & colType); bool IsRangeBoundary(uint64_t lbid); bool CasualPartitionPredicate(const BRM::EMCasualPartition_t& cpRange, const messageqcpp::ByteStream* MsgDataPtr, const uint16_t NOPS, - const execplan::CalpontSystemCatalog::ColType& ct, + const execplan::ColumnCommandDataType& ct, const uint8_t BOP); template bool checkSingleValue(T min, T max, T value, - const execplan::CalpontSystemCatalog::ColType & type); + const execplan::ColumnCommandDataType & type); template bool checkRangeOverlap(T min, T max, T tmin, T tmax, - const execplan::CalpontSystemCatalog::ColType & type); + const execplan::ColumnCommandDataType & type); // check the column data type and the column size to determine if it // is a data type to apply casual paritioning. diff --git a/dbcon/joblist/passthrucommand-jl.cpp b/dbcon/joblist/passthrucommand-jl.cpp index 9fcf79131..2f59ca416 100644 --- a/dbcon/joblist/passthrucommand-jl.cpp +++ b/dbcon/joblist/passthrucommand-jl.cpp @@ -49,11 +49,11 @@ PassThruCommandJL::PassThruCommandJL(const PassThruStep& p) { OID = p.oid(); colName = p.name(); - colWidth = p.colWidth; + colWidth = p.colType().colWidth; // cout << "PassThru col width = " << (int) colWidth << " for OID " << OID << endl; /* Is this ever a dictionary column? */ - if (p.isDictColumn) + if (p.isDictCol()) tableColumnType = TableColumn::STRING; else switch (colWidth) diff --git a/dbcon/joblist/passthrustep.cpp b/dbcon/joblist/passthrustep.cpp index 426b60f2f..8784e4d0f 100644 --- a/dbcon/joblist/passthrustep.cpp +++ b/dbcon/joblist/passthrustep.cpp @@ -208,40 +208,17 @@ using namespace execplan; namespace joblist { -PassThruStep::PassThruStep( - execplan::CalpontSystemCatalog::OID oid, - execplan::CalpontSystemCatalog::OID tableOid, - const execplan::CalpontSystemCatalog::ColType& colType, - const JobInfo& jobInfo) : - JobStep(jobInfo), - fOid(oid), - fTableOid(tableOid), - isEM(jobInfo.isExeMgr), - fSwallowRows(false), - fRm(jobInfo.rm) -{ - colWidth = colType.colWidth; - realWidth = colType.colWidth; - isDictColumn = ((colType.colDataType == CalpontSystemCatalog::VARCHAR && colType.colWidth > 7) - || (colType.colDataType == CalpontSystemCatalog::CHAR && colType.colWidth > 8) - || (colType.colDataType == CalpontSystemCatalog::TEXT) - || (colType.colDataType == CalpontSystemCatalog::BLOB)); - fColType = colType; - fPseudoType = 0; - -} - -PassThruStep::PassThruStep(const pColStep& rhs) : JobStep(rhs), fRm(rhs.fRm) +PassThruStep::PassThruStep(const pColStep& rhs) + :JobStep(rhs), + fColType(rhs.colType()), + fRm(rhs.fRm) { fInputJobStepAssociation = rhs.inputAssociation(); fOutputJobStepAssociation = rhs.outputAssociation(); - colWidth = rhs.fColType.colWidth; realWidth = rhs.realWidth; fOid = rhs.oid(); fTableOid = rhs.tableOid(); fSwallowRows = rhs.getSwallowRows(); - isDictColumn = rhs.isDictCol(); - fColType = rhs.colType(); isEM = rhs.isExeMgr(); const PseudoColStep* pcs = dynamic_cast(&rhs); @@ -251,17 +228,17 @@ PassThruStep::PassThruStep(const pColStep& rhs) : JobStep(rhs), fRm(rhs.fRm) } -PassThruStep::PassThruStep(const PseudoColStep& rhs) : JobStep(rhs), fRm(rhs.fRm) +PassThruStep::PassThruStep(const PseudoColStep& rhs) + :JobStep(rhs), + fColType(rhs.colType()), + fRm(rhs.fRm) { fInputJobStepAssociation = rhs.inputAssociation(); fOutputJobStepAssociation = rhs.outputAssociation(); - colWidth = rhs.fColType.colWidth; realWidth = rhs.realWidth; fOid = rhs.oid(); fTableOid = rhs.tableOid(); fSwallowRows = rhs.getSwallowRows(); - isDictColumn = rhs.isDictCol(); - fColType = rhs.colType(); fPseudoType = rhs.pseudoColumnId(); isEM = rhs.isExeMgr(); } diff --git a/dbcon/joblist/pcolscan.cpp b/dbcon/joblist/pcolscan.cpp index 3e5fcc540..892961b9a 100644 --- a/dbcon/joblist/pcolscan.cpp +++ b/dbcon/joblist/pcolscan.cpp @@ -119,7 +119,7 @@ namespace joblist pColScanStep::pColScanStep( CalpontSystemCatalog::OID o, CalpontSystemCatalog::OID t, - const CalpontSystemCatalog::ColType& ct, + const CalpontSystemCatalog::DataType& ct, const JobInfo& jobInfo) : JobStep(jobInfo), fRm(jobInfo.rm), @@ -128,7 +128,7 @@ pColScanStep::pColScanStep( fFilterCount(0), fOid(o), fTableOid(t), - fColType(ct), + fColType(ct, t != 0 /* For cross-engine we preserve the exact data type */), fBOP(BOP_OR), sentCount(0), recvCount(0), @@ -153,41 +153,6 @@ pColScanStep::pColScanStep( recvWaiting = 0; recvExited = 0; rDoNothing = false; - fIsDict = false; - - //If this is a dictionary column, fudge the numbers... - if ( fColType.colDataType == CalpontSystemCatalog::VARCHAR ) - { - if (8 > fColType.colWidth && 4 <= fColType.colWidth ) - fColType.colDataType = CalpontSystemCatalog::CHAR; - - fColType.colWidth++; - } - - //If this is a dictionary column, fudge the numbers... - if ((fColType.colDataType == CalpontSystemCatalog::VARBINARY) - || (fColType.colDataType == CalpontSystemCatalog::BLOB) - || (fColType.colDataType == CalpontSystemCatalog::TEXT)) - { - fColType.colWidth = 8; - fIsDict = true; - } - // MCOL-641 WIP - else if (fColType.colWidth > 8 - && fColType.colDataType != CalpontSystemCatalog::DECIMAL - && fColType.colDataType != CalpontSystemCatalog::UDECIMAL) - { - fColType.colWidth = 8; - fIsDict = true; - //TODO: is this right? - fColType.colDataType = CalpontSystemCatalog::VARCHAR; - } - - //Round colWidth up - if (fColType.colWidth == 3) - fColType.colWidth = 4; - else if (fColType.colWidth == 5 || fColType.colWidth == 6 || fColType.colWidth == 7) - fColType.colWidth = 8; err = dbrm.lookup(fOid, lbidRanges); @@ -1008,7 +973,8 @@ uint64_t pColScanStep::getFBO(uint64_t lbid) pColScanStep::pColScanStep(const pColStep& rhs) : JobStep(rhs), fRm(rhs.resourceManager()), - fMsgHeader() + fMsgHeader(), + fColType(rhs.colType()) { fNumThreads = fRm->getJlNumScanReceiveThreads(); fFilterCount = rhs.filterCount(); @@ -1016,9 +982,7 @@ pColScanStep::pColScanStep(const pColStep& rhs) : isFilterFeeder = rhs.getFeederFlag(); fOid = rhs.oid(); fTableOid = rhs.tableOid(); - fColType = rhs.colType(); fBOP = rhs.BOP(); - fIsDict = rhs.isDictCol(); sentCount = 0; recvCount = 0; fScanLbidReqLimit = fRm->getJlScanLbidReqLimit(); diff --git a/dbcon/joblist/pcolstep.cpp b/dbcon/joblist/pcolstep.cpp index edaa51af6..dbcbe19ba 100644 --- a/dbcon/joblist/pcolstep.cpp +++ b/dbcon/joblist/pcolstep.cpp @@ -102,14 +102,14 @@ struct pColStepAggregator pColStep::pColStep( CalpontSystemCatalog::OID o, CalpontSystemCatalog::OID t, - const CalpontSystemCatalog::ColType& ct, + const CalpontSystemCatalog::DataType& ct, const JobInfo& jobInfo) : JobStep(jobInfo), fRm(jobInfo.rm), sysCat(jobInfo.csc), fOid(o), fTableOid(t), - fColType(ct), + fColType(ct, t != 0 /* For cross-engine we preserve the exact data type */), fFilterCount(0), fBOP(BOP_NONE), ridList(0), @@ -117,7 +117,6 @@ pColStep::pColStep( msgsRecvd(0), finishedSending(false), recvWaiting(false), - fIsDict(false), isEM(jobInfo.isExeMgr), ridCount(0), fFlushInterval(jobInfo.flushInterval), @@ -159,40 +158,7 @@ pColStep::pColStep( throw runtime_error(oss.str()); } - realWidth = fColType.colWidth; - - if ( fColType.colDataType == CalpontSystemCatalog::VARCHAR ) - { - if (8 > fColType.colWidth && 4 <= fColType.colWidth ) - fColType.colDataType = CalpontSystemCatalog::CHAR; - - fColType.colWidth++; - } - - //If this is a dictionary column, fudge the numbers... - if ((fColType.colDataType == CalpontSystemCatalog::VARBINARY) - || (fColType.colDataType == CalpontSystemCatalog::BLOB) - || (fColType.colDataType == CalpontSystemCatalog::TEXT)) - { - fColType.colWidth = 8; - fIsDict = true; - } - // WIP MCOL-641 - else if (fColType.colWidth > 8 - && fColType.colDataType != CalpontSystemCatalog::DECIMAL - && fColType.colDataType != CalpontSystemCatalog::UDECIMAL) - { - fColType.colWidth = 8; - fIsDict = true; - //TODO: is this right? - fColType.colDataType = CalpontSystemCatalog::VARCHAR; - } - - //Round colWidth up - if (fColType.colWidth == 3) - fColType.colWidth = 4; - else if (fColType.colWidth == 5 || fColType.colWidth == 6 || fColType.colWidth == 7) - fColType.colWidth = 8; + realWidth = ct.colWidth; idbassert(fColType.colWidth > 0); ridsPerBlock = BLOCK_SIZE / fColType.colWidth; @@ -283,7 +249,6 @@ pColStep::pColStep(const pColScanStep& rhs) : msgsRecvd(0), finishedSending(false), recvWaiting(false), - fIsDict(rhs.isDictCol()), ridCount(0), // Per Cindy, it's save to put fFlushInterval to be 0 fFlushInterval(0), @@ -393,7 +358,6 @@ pColStep::pColStep(const PassThruStep& rhs) : msgsRecvd(0), finishedSending(false), recvWaiting(false), - fIsDict(rhs.isDictCol()), ridCount(0), // Per Cindy, it's save to put fFlushInterval to be 0 fFlushInterval(0), diff --git a/dbcon/joblist/primitivemsg.h b/dbcon/joblist/primitivemsg.h index 1ede5ecad..f25ab4b42 100644 --- a/dbcon/joblist/primitivemsg.h +++ b/dbcon/joblist/primitivemsg.h @@ -343,18 +343,27 @@ struct ColRequestHeaderDataType: public datatypes::Charset int32_t CompType; uint16_t DataSize; uint8_t DataType; // enum ColDataType defined in calpont system catalog header file +private: + bool mIsDict; +public: ColRequestHeaderDataType() :Charset(my_charset_bin), CompType(0), DataSize(0), - DataType(0) + DataType(0), + mIsDict(false) { } - ColRequestHeaderDataType(const execplan::CalpontSystemCatalog::ColType &rhs) + ColRequestHeaderDataType(const execplan::ColumnCommandDataType &rhs) :Charset(rhs.charsetNumber), CompType(rhs.compressionType), DataSize(rhs.colWidth), - DataType(rhs.colDataType) + DataType(rhs.colDataType), + mIsDict(rhs.isDict()) { } + bool isDict() const + { + return mIsDict; + } }; diff --git a/dbcon/joblist/primitivestep.h b/dbcon/joblist/primitivestep.h index d594685b1..49b753ccd 100644 --- a/dbcon/joblist/primitivestep.h +++ b/dbcon/joblist/primitivestep.h @@ -141,7 +141,7 @@ public: pColStep( execplan::CalpontSystemCatalog::OID oid, execplan::CalpontSystemCatalog::OID tableOid, - const execplan::CalpontSystemCatalog::ColType& ct, + const execplan::CalpontSystemCatalog::DataType& ct, const JobInfo& jobInfo); pColStep(const pColScanStep& rhs); @@ -165,7 +165,7 @@ public: virtual bool isDictCol() const { - return fIsDict; + return fColType.isDict(); }; bool isExeMgr() const { @@ -266,7 +266,7 @@ public: { return fBOP; } - const execplan::CalpontSystemCatalog::ColType& colType() const + const execplan::ColumnCommandDataType& colType() const { return fColType; } @@ -353,7 +353,7 @@ private: boost::shared_ptr sysCat; execplan::CalpontSystemCatalog::OID fOid; execplan::CalpontSystemCatalog::OID fTableOid; - execplan::CalpontSystemCatalog::ColType fColType; + execplan::ColumnCommandDataType fColType; uint32_t fFilterCount; int8_t fBOP; int8_t fOutputType; @@ -365,7 +365,7 @@ private: uint32_t extentSize, divShift, modMask, ridsPerBlock, rpbShift, blockSizeShift, numExtents; uint64_t rpbMask; uint64_t msgsSent, msgsRecvd; - bool finishedSending, recvWaiting, fIsDict; + bool finishedSending, recvWaiting; bool isEM; int64_t ridCount; uint32_t fFlushInterval; @@ -430,7 +430,7 @@ public: pColScanStep( execplan::CalpontSystemCatalog::OID oid, execplan::CalpontSystemCatalog::OID tableOid, - const execplan::CalpontSystemCatalog::ColType& ct, + const execplan::CalpontSystemCatalog::DataType& ct, const JobInfo& jobInfo); pColScanStep(const pColStep& rhs); @@ -450,7 +450,7 @@ public: virtual bool isDictCol() const { - return fIsDict; + return fColType.isDict(); }; /** @brief The main loop for the send-side thread @@ -535,7 +535,7 @@ public: { return fTableOid; } - const execplan::CalpontSystemCatalog::ColType& colType() const + const execplan::ColumnCommandDataType& colType() const { return fColType; } @@ -632,7 +632,7 @@ private: uint32_t fFilterCount; execplan::CalpontSystemCatalog::OID fOid; execplan::CalpontSystemCatalog::OID fTableOid; - execplan::CalpontSystemCatalog::ColType fColType; + execplan::ColumnCommandDataType fColType; int8_t fBOP; int8_t fOutputType; uint32_t sentCount; @@ -646,7 +646,7 @@ private: boost::mutex cpMutex; boost::condition condvar; boost::condition condvarWakeupProducer; - bool finishedSending, sendWaiting, rDoNothing, fIsDict; + bool finishedSending, sendWaiting, rDoNothing; uint32_t recvWaiting, recvExited; std::vector extents; @@ -1085,8 +1085,6 @@ class TupleBPS : public BatchPrimitive, public TupleDeliveryStep public: TupleBPS(const pColStep& rhs, const JobInfo& jobInfo); TupleBPS(const pColScanStep& rhs, const JobInfo& jobInfo); - TupleBPS(const pDictionaryStep& rhs, const JobInfo& jobInfo); - TupleBPS(const pDictionaryScan& rhs, const JobInfo& jobInfo); TupleBPS(const PassThruStep& rhs, const JobInfo& jobInfo); virtual ~TupleBPS(); @@ -1201,7 +1199,7 @@ public: { return fTableOid; } - const execplan::CalpontSystemCatalog::ColType& colType() const + const execplan::ColumnCommandDataType & colType() const { return fColType; } @@ -1376,7 +1374,7 @@ private: std::vector fProducerThreads; // thread pool handles messageqcpp::ByteStream fFilterString; uint32_t fFilterCount; - execplan::CalpontSystemCatalog::ColType fColType; + execplan::ColumnCommandDataType fColType; execplan::CalpontSystemCatalog::OID fOid; execplan::CalpontSystemCatalog::OID fTableOid; uint64_t fLastTupleId; @@ -1609,12 +1607,6 @@ class PassThruStep : public JobStep, public PrimitiveMsg public: /** @brief PassThruStep constructor */ - PassThruStep( - execplan::CalpontSystemCatalog::OID oid, - execplan::CalpontSystemCatalog::OID tableOid, - const execplan::CalpontSystemCatalog::ColType& colType, - const JobInfo& jobInfo); - PassThruStep(const pColStep& rhs); PassThruStep(const PseudoColStep& rhs); @@ -1643,20 +1635,15 @@ public: { return fTableOid; } - - uint8_t getColWidth() const - { - return colWidth; - } bool isDictCol() const { - return isDictColumn; + return fColType.isDict(); } bool isExeMgr() const { return isEM; } - const execplan::CalpontSystemCatalog::ColType& colType() const + const execplan::ColumnCommandDataType & colType() const { return fColType; } @@ -1688,11 +1675,9 @@ private: boost::shared_ptr catalog; execplan::CalpontSystemCatalog::OID fOid; execplan::CalpontSystemCatalog::OID fTableOid; - uint8_t colWidth; uint16_t realWidth; uint32_t fPseudoType; - execplan::CalpontSystemCatalog::ColType fColType; - bool isDictColumn; + execplan::ColumnCommandDataType fColType; bool isEM; // boost::thread* fPTThd; diff --git a/dbcon/joblist/rowestimator.cpp b/dbcon/joblist/rowestimator.cpp index 1d7eab1e1..ff1fc88df 100644 --- a/dbcon/joblist/rowestimator.cpp +++ b/dbcon/joblist/rowestimator.cpp @@ -96,7 +96,7 @@ uint32_t RowEstimator::daysThroughMonth(uint32_t mth) // This function takes a column value and if necessary adjusts it based on rules defined in the requirements. // The values are adjusted so that one can be subtracted from another to find a range, compare, etc. -uint64_t RowEstimator::adjustValue(const execplan::CalpontSystemCatalog::ColType& ct, +uint64_t RowEstimator::adjustValue(const ColumnCommandDataType & ct, const uint64_t& value) { switch (ct.colDataType) @@ -141,7 +141,7 @@ uint64_t RowEstimator::adjustValue(const execplan::CalpontSystemCatalog::ColType // Estimates the number of distinct values given a min/max range. When the range has not been set, // rules from the requirements are used based on the column type. template -uint32_t RowEstimator::estimateDistinctValues(const execplan::CalpontSystemCatalog::ColType& ct, +uint32_t RowEstimator::estimateDistinctValues(const ColumnCommandDataType &ct, const T& min, const T& max, const char cpStatus) @@ -214,7 +214,7 @@ template float RowEstimator::estimateOpFactor(const T& min, const T& max, const T& value, char op, uint8_t lcf, uint32_t distinctValues, char cpStatus, - const execplan::CalpontSystemCatalog::ColType& ct) + const ColumnCommandDataType& ct) { float factor = 1.0; @@ -295,7 +295,7 @@ float RowEstimator::estimateOpFactor(const T& min, const T& max, const T& value, float RowEstimator::estimateRowReturnFactor(const BRM::EMEntry& emEntry, const messageqcpp::ByteStream* bs, const uint16_t NOPS, - const execplan::CalpontSystemCatalog::ColType& ct, + const ColumnCommandDataType& ct, const uint8_t BOP, const uint32_t& rowsInExtent) { diff --git a/dbcon/joblist/rowestimator.h b/dbcon/joblist/rowestimator.h index a4c702a44..dd5c8f2d3 100644 --- a/dbcon/joblist/rowestimator.h +++ b/dbcon/joblist/rowestimator.h @@ -84,13 +84,13 @@ private: * @param value The column value. * */ - uint64_t adjustValue(const execplan::CalpontSystemCatalog::ColType& ct, + uint64_t adjustValue(const execplan::ColumnCommandDataType & ct, const uint64_t& value); uint32_t daysThroughMonth(uint32_t mth); template - uint32_t estimateDistinctValues(const execplan::CalpontSystemCatalog::ColType& ct, + uint32_t estimateDistinctValues(const execplan::ColumnCommandDataType & ct, const T& min, const T& max, const char cpStatus); @@ -108,7 +108,7 @@ private: template float estimateOpFactor(const T& min, const T& max, const T& value, char op, uint8_t lcf, uint32_t distinctValues, char cpStatus, - const execplan::CalpontSystemCatalog::ColType& ct); + const execplan::ColumnCommandDataType & ct); /** @brief returns a factor between 0 and 1 for the estimate of rows that will qualify * the given operation(s). @@ -126,7 +126,7 @@ private: float estimateRowReturnFactor(const BRM::EMEntry& emEntry, const messageqcpp::ByteStream* msgDataPtr, const uint16_t NOPS, - const execplan::CalpontSystemCatalog::ColType& ct, + const execplan::ColumnCommandDataType & ct, const uint8_t BOP, const uint32_t& rowsInExtent); diff --git a/dbcon/joblist/tuple-bps.cpp b/dbcon/joblist/tuple-bps.cpp index f05432bb7..f9dec0efd 100644 --- a/dbcon/joblist/tuple-bps.cpp +++ b/dbcon/joblist/tuple-bps.cpp @@ -195,7 +195,10 @@ void TupleBPS::initializeConfigParms() } TupleBPS::TupleBPS(const pColStep& rhs, const JobInfo& jobInfo) : - BatchPrimitive(jobInfo), pThread(0), fRm(jobInfo.rm) + BatchPrimitive(jobInfo), + fColType(rhs.colType()), + pThread(0), + fRm(jobInfo.rm) { fInputJobStepAssociation = rhs.inputAssociation(); fOutputJobStepAssociation = rhs.outputAssociation(); @@ -234,7 +237,6 @@ TupleBPS::TupleBPS(const pColStep& rhs, const JobInfo& jobInfo) : fStepCount = 1; fCPEvaluated = false; fEstimatedRows = 0; - fColType = rhs.colType(); alias(rhs.alias()); view(rhs.view()); name(rhs.name()); @@ -280,7 +282,9 @@ TupleBPS::TupleBPS(const pColStep& rhs, const JobInfo& jobInfo) : } TupleBPS::TupleBPS(const pColScanStep& rhs, const JobInfo& jobInfo) : - BatchPrimitive(jobInfo), fRm(jobInfo.rm) + BatchPrimitive(jobInfo), + fColType(rhs.colType()), + fRm(jobInfo.rm) { fInputJobStepAssociation = rhs.inputAssociation(); fOutputJobStepAssociation = rhs.outputAssociation(); @@ -317,7 +321,6 @@ TupleBPS::TupleBPS(const pColScanStep& rhs, const JobInfo& jobInfo) : fStepCount = 1; fCPEvaluated = false; fEstimatedRows = 0; - fColType = rhs.colType(); alias(rhs.alias()); view(rhs.view()); name(rhs.name()); @@ -364,7 +367,9 @@ TupleBPS::TupleBPS(const pColScanStep& rhs, const JobInfo& jobInfo) : } TupleBPS::TupleBPS(const PassThruStep& rhs, const JobInfo& jobInfo) : - BatchPrimitive(jobInfo), fRm(jobInfo.rm) + BatchPrimitive(jobInfo), + fColType(rhs.colType()), + fRm(jobInfo.rm) { fInputJobStepAssociation = rhs.inputAssociation(); fOutputJobStepAssociation = rhs.outputAssociation(); @@ -386,7 +391,6 @@ TupleBPS::TupleBPS(const PassThruStep& rhs, const JobInfo& jobInfo) : fStepCount = 1; fCPEvaluated = false; fEstimatedRows = 0; - fColType = rhs.colType(); alias(rhs.alias()); view(rhs.view()); name(rhs.name()); @@ -431,70 +435,6 @@ TupleBPS::TupleBPS(const PassThruStep& rhs, const JobInfo& jobInfo) : } -TupleBPS::TupleBPS(const pDictionaryStep& rhs, const JobInfo& jobInfo) : - BatchPrimitive(jobInfo), fRm(jobInfo.rm) -{ - fInputJobStepAssociation = rhs.inputAssociation(); - fOutputJobStepAssociation = rhs.outputAssociation(); - fDec = 0; - fOid = rhs.oid(); - fTableOid = rhs.tableOid(); - totalMsgs = 0; - msgsSent = 0; - msgsRecvd = 0; - ridsReturned = 0; - ridsRequested = 0; - fNumBlksSkipped = 0; - fBlockTouched = 0; - fMsgBytesIn = 0; - fMsgBytesOut = 0; - fExtentsPerSegFile = DEFAULT_EXTENTS_PER_SEG_FILE; - recvWaiting = 0; - fSwallowRows = false; - fStepCount = 1; - fCPEvaluated = false; - fEstimatedRows = 0; - alias(rhs.alias()); - view(rhs.view()); - name(rhs.name()); - finishedSending = sendWaiting = false; - recvExited = 0; - fBPP.reset(new BatchPrimitiveProcessorJL(fRm)); - initializeConfigParms(); - fBPP->setSessionID(fSessionId); - fBPP->setStepID(fStepId); - fBPP->setQueryContext(fVerId); - fBPP->setTxnID(fTxnId); - fTraceFlags = rhs.fTraceFlags; - fBPP->setTraceFlags(fTraceFlags); - fBPP->setOutputType(ROW_GROUP); - fPhysicalIO = 0; - fCacheIO = 0; - BPPIsAllocated = false; - uniqueID = UniqueNumberGenerator::instance()->getUnique32(); - fBPP->setUniqueID(uniqueID); - fBPP->setUuid(fStepUuid); - fCardinality = rhs.cardinality(); - doJoin = false; - hasPMJoin = false; - hasUMJoin = false; - fRunExecuted = false; - isFilterFeeder = false; - smallOuterJoiner = -1; - // @1098 initialize scanFlags to be true - scanFlags.assign(numExtents, true); - runtimeCPFlags.assign(numExtents, true); - bop = BOP_AND; - - runRan = joinRan = false; - fDelivery = false; - fExtendedInfo = "TBPS: "; - fQtc.stepParms().stepType = StepTeleStats::T_BPS; - - hasPCFilter = hasPMFilter = hasRIDFilter = hasSegmentFilter = hasDBRootFilter = hasSegmentDirFilter = - hasPartitionFilter = hasMaxFilter = hasMinFilter = hasLBIDFilter = hasExtentIDFilter = false; - -} TupleBPS::~TupleBPS() { @@ -3242,7 +3182,7 @@ void TupleBPS::addCPPredicates(uint32_t OID, const vector& vals, bool if (cmd != NULL && cmd->getOID() == OID) { - const execplan::CalpontSystemCatalog::ColType& colType = cmd->getColType(); + const ColumnCommandDataType &colType = cmd->getColType(); if (!ll.CasualPartitionDataType(colType.colDataType, colType.colWidth) || cmd->isDict()) diff --git a/primitives/linux-port/column.cpp b/primitives/linux-port/column.cpp index ffe2c5fa3..f485ff167 100644 --- a/primitives/linux-port/column.cpp +++ b/primitives/linux-port/column.cpp @@ -524,12 +524,12 @@ inline bool isMinMaxValid(const NewColRequestHeader* in) switch (in->colType.DataType) { case CalpontSystemCatalog::CHAR: - return (in->colType.DataSize < 9); + return !in->colType.isDict(); case CalpontSystemCatalog::VARCHAR: case CalpontSystemCatalog::BLOB: case CalpontSystemCatalog::TEXT: - return (in->colType.DataSize < 8); + return !in->colType.isDict(); case CalpontSystemCatalog::TINYINT: case CalpontSystemCatalog::SMALLINT: diff --git a/primitives/primproc/columncommand.cpp b/primitives/primproc/columncommand.cpp index a785b75cb..ef5a00ee8 100644 --- a/primitives/primproc/columncommand.cpp +++ b/primitives/primproc/columncommand.cpp @@ -466,7 +466,6 @@ void ColumnCommand::processResult() void ColumnCommand::createCommand(ByteStream& bs) { uint8_t tmp8; - uint32_t tmp32; bs.advance(1); bs >> tmp8; @@ -481,16 +480,7 @@ void ColumnCommand::createCommand(ByteStream& bs) cout << endl; #endif - bs >> tmp8; - colType.colDataType = (execplan::CalpontSystemCatalog::ColDataType) tmp8; - bs >> tmp8; - colType.colWidth = tmp8; - bs >> tmp8; - colType.scale = tmp8; - bs >> tmp8; - colType.compressionType = tmp8; - bs >> tmp32; - colType.charsetNumber = tmp32; + colType.unserialize(bs); bs >> BOP; bs >> filterCount; deserializeInlineVector(bs, lastLbid); @@ -900,9 +890,7 @@ ColumnCommand& ColumnCommand::operator=(const ColumnCommand& c) _isScan = c._isScan; traceFlags = c.traceFlags; filterString = c.filterString; - colType.colDataType = c.colType.colDataType; - colType.compressionType = c.colType.compressionType; - colType.colWidth = c.colType.colWidth; + colType = c.colType; BOP = c.BOP; filterCount = c.filterCount; fFilterFeeder = c.fFilterFeeder; diff --git a/primitives/primproc/columncommand.h b/primitives/primproc/columncommand.h index 2f0d22e57..e47ea4494 100644 --- a/primitives/primproc/columncommand.h +++ b/primitives/primproc/columncommand.h @@ -62,7 +62,7 @@ public: { return filterCount; } - const execplan::CalpontSystemCatalog::ColType& getColType() + const execplan::ColumnCommandDataType & getColType() { return colType; } @@ -110,7 +110,7 @@ protected: // we only care about the width and type fields. //On the PM the rest is uninitialized - execplan::CalpontSystemCatalog::ColType colType; + execplan::ColumnCommandDataType colType; private: ColumnCommand(const ColumnCommand&); diff --git a/primitives/primproc/filtercommand.cpp b/primitives/primproc/filtercommand.cpp index f63cb4beb..3cede2323 100644 --- a/primitives/primproc/filtercommand.cpp +++ b/primitives/primproc/filtercommand.cpp @@ -246,8 +246,8 @@ SCommand FilterCommand::duplicate() } -void FilterCommand::setColTypes(const execplan::CalpontSystemCatalog::ColType& left, - const execplan::CalpontSystemCatalog::ColType& right) +void FilterCommand::setColTypes(const execplan::ColumnCommandDataType& left, + const execplan::ColumnCommandDataType& right) { leftColType = left; rightColType = right; diff --git a/primitives/primproc/filtercommand.h b/primitives/primproc/filtercommand.h index 263523bef..98e4cadab 100644 --- a/primitives/primproc/filtercommand.h +++ b/primitives/primproc/filtercommand.h @@ -57,8 +57,8 @@ public: SCommand duplicate(); void prep(int8_t outputType, bool makeAbsRids); - void setColTypes(const execplan::CalpontSystemCatalog::ColType& left, - const execplan::CalpontSystemCatalog::ColType& right); + void setColTypes(const execplan::ColumnCommandDataType& left, + const execplan::ColumnCommandDataType& right); // operator override bool operator==(const FilterCommand&) const; @@ -85,8 +85,8 @@ protected: bool hasWideColumns; // column type for null check - execplan::CalpontSystemCatalog::ColType leftColType; - execplan::CalpontSystemCatalog::ColType rightColType; + execplan::ColumnCommandDataType leftColType; + execplan::ColumnCommandDataType rightColType; private: // disabled copy constructor and operator