1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-641 Refactored MultiplicationOverflowCheck but it still has flaws.

Introduced fDecimalOverflowCheck to enable/disable overflow check.

Add support into a FunctionColumn.

Low level scanning crashes on medium sized data sets.
This commit is contained in:
Roman Nozdrin
2020-03-24 13:41:28 +00:00
parent 74b64eb4f1
commit b5534eb847
13 changed files with 528 additions and 36 deletions

View File

@ -34,17 +34,20 @@ namespace execplan
/**
* Constructors/Destructors
*/
ArithmeticOperator::ArithmeticOperator() : Operator()
ArithmeticOperator::ArithmeticOperator() : Operator(),
fDecimalOverflowCheck(true)
{
}
ArithmeticOperator::ArithmeticOperator(const string& operatorName): Operator(operatorName)
ArithmeticOperator::ArithmeticOperator(const string& operatorName): Operator(operatorName),
fDecimalOverflowCheck(true)
{
}
ArithmeticOperator::ArithmeticOperator(const ArithmeticOperator& rhs):
Operator(rhs),
fTimeZone(rhs.timeZone())
fTimeZone(rhs.timeZone()),
fDecimalOverflowCheck(true)
{
}
@ -63,6 +66,7 @@ ostream& operator<<(ostream& output, const ArithmeticOperator& rhs)
{
output << rhs.toString();
output << "opType=" << rhs.operationType().colDataType << endl;
output << "decimalOverflowCheck=" << rhs.getOverflowCheck() << endl;
return output;
}
@ -73,6 +77,8 @@ void ArithmeticOperator::serialize(messageqcpp::ByteStream& b) const
{
b << (ObjectReader::id_t) ObjectReader::ARITHMETICOPERATOR;
b << fTimeZone;
const messageqcpp::ByteStream::byte tmp = fDecimalOverflowCheck;
b << tmp;
Operator::serialize(b);
}
@ -80,6 +86,9 @@ void ArithmeticOperator::unserialize(messageqcpp::ByteStream& b)
{
ObjectReader::checkType(b, ObjectReader::ARITHMETICOPERATOR);
b >> fTimeZone;
messageqcpp::ByteStream::byte tmp;
b >> tmp;
fDecimalOverflowCheck = tmp;
Operator::unserialize(b);
}