1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-641 Replaced IDB_Decima.__v union with int128_t attribute.

Moved all tests into ./test

Introduced ./datatypes directory
This commit is contained in:
Roman Nozdrin
2020-03-03 15:51:55 +00:00
parent 824615a55b
commit 238386bf63
17 changed files with 398 additions and 106 deletions

View File

@ -116,70 +116,6 @@ bool ArithmeticOperator::operator!=(const TreeNode* t) const
return (!(*this == t));
}
#if 0
void ArithmeticOperator::operationType(const Type& l, const Type& r)
{
if (l.colDataType == execplan::CalpontSystemCatalog::DECIMAL)
{
switch (r.colDataType)
{
case execplan::CalpontSystemCatalog::DECIMAL:
{
// should follow the result type that MySQL gives
fOperationType = fResultType;
break;
}
case execplan::CalpontSystemCatalog::INT:
case execplan::CalpontSystemCatalog::MEDINT:
case execplan::CalpontSystemCatalog::TINYINT:
case execplan::CalpontSystemCatalog::BIGINT:
fOperationType.colDataType = execplan::CalpontSystemCatalog::DECIMAL;
fOperationType.scale = l.scale;
break;
default:
fOperationType.colDataType = execplan::CalpontSystemCatalog::DOUBLE;
}
}
else if (r.colDataType == execplan::CalpontSystemCatalog::DECIMAL)
{
switch (l.colDataType)
{
case execplan::CalpontSystemCatalog::DECIMAL:
{
// should following the result type that MySQL gives based on the following logic?
// @NOTE is this trustable?
fOperationType = fResultType;
break;
}
case execplan::CalpontSystemCatalog::INT:
case execplan::CalpontSystemCatalog::MEDINT:
case execplan::CalpontSystemCatalog::TINYINT:
case execplan::CalpontSystemCatalog::BIGINT:
fOperationType.colDataType = execplan::CalpontSystemCatalog::DECIMAL;
fOperationType.scale = r.scale;
break;
default:
fOperationType.colDataType = execplan::CalpontSystemCatalog::DOUBLE;
}
}
else if ((l.colDataType == execplan::CalpontSystemCatalog::INT ||
l.colDataType == execplan::CalpontSystemCatalog::MEDINT ||
l.colDataType == execplan::CalpontSystemCatalog::TINYINT ||
l.colDataType == execplan::CalpontSystemCatalog::BIGINT) &&
(r.colDataType == execplan::CalpontSystemCatalog::INT ||
r.colDataType == execplan::CalpontSystemCatalog::MEDINT ||
r.colDataType == execplan::CalpontSystemCatalog::TINYINT ||
r.colDataType == execplan::CalpontSystemCatalog::BIGINT))
fOperationType.colDataType = execplan::CalpontSystemCatalog::BIGINT;
else
fOperationType.colDataType = execplan::CalpontSystemCatalog::DOUBLE;
}
#endif
void ArithmeticOperator::adjustResultType(const CalpontSystemCatalog::ColType& m)
{
if (m.colDataType != CalpontSystemCatalog::DECIMAL)