You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-641 Refactor initial extent elimination support.
This commit also adds support in TupleHashJoinStep::forwardCPData, although we currently do not support wide decimals as join keys. Row estimation to determine large-side of the join is also updated.
This commit is contained in:
committed by
Roman Nozdrin
parent
ca53b6348a
commit
d3bc68b02f
@ -1597,8 +1597,8 @@ inline void p_Col_bin_ridArray(NewColRequestHeader* in,
|
||||
}
|
||||
else
|
||||
{
|
||||
dataconvert::DataConvert::int128Max(out->Min);
|
||||
dataconvert::DataConvert::int128Min(out->Max);
|
||||
utils::int128Max(out->Min);
|
||||
utils::int128Min(out->Max);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -54,6 +54,7 @@ using namespace boost;
|
||||
#include "MonitorProcMem.h"
|
||||
#include "threadnaming.h"
|
||||
#include "vlarray.h"
|
||||
#include "widedecimalutils.h"
|
||||
|
||||
#define MAX64 0x7fffffffffffffffLL
|
||||
#define MIN64 0x8000000000000000LL
|
||||
@ -1098,8 +1099,8 @@ void BatchPrimitiveProcessor::initProcessor()
|
||||
}
|
||||
else
|
||||
{
|
||||
dataconvert::DataConvert::int128Min(bigMaxVal);
|
||||
dataconvert::DataConvert::int128Max(bigMinVal);
|
||||
utils::int128Min(bigMaxVal);
|
||||
utils::int128Max(bigMinVal);
|
||||
}
|
||||
|
||||
// @bug 1269, initialize data used by execute() for async loading blocks
|
||||
@ -2213,8 +2214,8 @@ int BatchPrimitiveProcessor::operator()()
|
||||
}
|
||||
else
|
||||
{
|
||||
dataconvert::DataConvert::int128Min(bigMaxVal);
|
||||
dataconvert::DataConvert::int128Max(bigMinVal);
|
||||
utils::int128Min(bigMaxVal);
|
||||
utils::int128Max(bigMinVal);
|
||||
}
|
||||
validCPData = false;
|
||||
#ifdef PRIMPROC_STOPWATCH
|
||||
|
@ -42,6 +42,7 @@ SCommand PseudoCC::duplicate()
|
||||
ret.reset(pseudo);
|
||||
pseudo->function = function;
|
||||
pseudo->valueFromUM = valueFromUM;
|
||||
pseudo->bigValueFromUM = bigValueFromUM;
|
||||
ColumnCommand::duplicate(pseudo);
|
||||
return ret;
|
||||
}
|
||||
@ -55,9 +56,21 @@ void PseudoCC::createCommand(messageqcpp::ByteStream& bs)
|
||||
|
||||
void PseudoCC::resetCommand(messageqcpp::ByteStream& bs)
|
||||
{
|
||||
if (function == PSEUDO_EXTENTMAX || function == PSEUDO_EXTENTMIN || function == PSEUDO_EXTENTID)
|
||||
if (function == PSEUDO_EXTENTMAX || function == PSEUDO_EXTENTMIN)
|
||||
{
|
||||
if (!datatypes::Decimal::isWideDecimalType(colType))
|
||||
bs >> valueFromUM;
|
||||
else
|
||||
bs >> bigValueFromUM;
|
||||
}
|
||||
else if (function == PSEUDO_EXTENTID)
|
||||
{
|
||||
bs >> valueFromUM;
|
||||
|
||||
if (datatypes::Decimal::isWideDecimalType(colType))
|
||||
bigValueFromUM = valueFromUM;
|
||||
}
|
||||
|
||||
ColumnCommand::resetCommand(bs);
|
||||
}
|
||||
|
||||
@ -91,8 +104,11 @@ void PseudoCC::loadData()
|
||||
case 8:
|
||||
loadPMNumber<uint64_t>();
|
||||
break;
|
||||
|
||||
case 16:
|
||||
cout << __FILE__<< ":" <<__LINE__ << " Fix for 16 Bytes ?" << endl;
|
||||
loadPMNumber<uint128_t>();
|
||||
break;
|
||||
|
||||
default:
|
||||
cout << "PC::loadData(): bad column width" << endl;
|
||||
break;
|
||||
@ -119,6 +135,10 @@ void PseudoCC::loadData()
|
||||
loadRIDs<uint64_t>();
|
||||
break;
|
||||
|
||||
case 16:
|
||||
loadRIDs<uint128_t>();
|
||||
break;
|
||||
|
||||
default:
|
||||
cout << "PC::loadData(): bad column width" << endl;
|
||||
break;
|
||||
@ -144,8 +164,11 @@ void PseudoCC::loadData()
|
||||
case 8:
|
||||
loadSegmentNum<uint64_t>();
|
||||
break;
|
||||
|
||||
case 16:
|
||||
cout << __FILE__<< ":" <<__LINE__ << " Fix for 16 Bytes ?" << endl;
|
||||
loadSegmentNum<uint128_t>();
|
||||
break;
|
||||
|
||||
default:
|
||||
cout << "PC::loadData(): bad column width" << endl;
|
||||
break;
|
||||
@ -173,7 +196,9 @@ void PseudoCC::loadData()
|
||||
break;
|
||||
|
||||
case 16:
|
||||
cout << __FILE__<< ":" <<__LINE__ << " Fix for 16 Bytes ?" << endl;
|
||||
loadPartitionNum<uint128_t>();
|
||||
break;
|
||||
|
||||
default:
|
||||
cout << "PC::loadData(): bad column width" << endl;
|
||||
break;
|
||||
@ -201,7 +226,9 @@ void PseudoCC::loadData()
|
||||
break;
|
||||
|
||||
case 16:
|
||||
cout << __FILE__<< ":" <<__LINE__ << " Fix for 16 Bytes ?" << endl;
|
||||
loadLBID<uint128_t>();
|
||||
break;
|
||||
|
||||
default:
|
||||
cout << "PC::loadData(): bad column width" << endl;
|
||||
break;
|
||||
@ -227,8 +254,10 @@ void PseudoCC::loadData()
|
||||
case 8:
|
||||
loadDBRootNum<uint64_t>();
|
||||
break;
|
||||
|
||||
case 16:
|
||||
cout << __FILE__<< ":" <<__LINE__ << " Fix for 16 Bytes ?" << endl;
|
||||
loadDBRootNum<uint128_t>();
|
||||
break;
|
||||
|
||||
default:
|
||||
cout << "PC::loadData(): bad column width" << endl;
|
||||
@ -258,8 +287,10 @@ void PseudoCC::loadData()
|
||||
case 8:
|
||||
loadSingleValue<int64_t>(valueFromUM);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
cout << __FILE__<< ":" <<__LINE__ << " Fix for 16 Bytes ?" << endl;
|
||||
loadSingleValue<uint128_t>(bigValueFromUM);
|
||||
break;
|
||||
|
||||
default:
|
||||
cout << "PC::loadData(): bad column width" << endl;
|
||||
|
@ -49,6 +49,7 @@ private:
|
||||
|
||||
uint32_t function;
|
||||
uint64_t valueFromUM;
|
||||
uint128_t bigValueFromUM;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user