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

Merge pull request #1990 from drrtuy/MCOL-4173_9

MCOL-4173 This patch adds support for wide-DECIMAL INNER, OUTER, SEMI…
This commit is contained in:
Roman Nozdrin
2021-06-24 16:15:07 +03:00
committed by GitHub
22 changed files with 2347 additions and 228 deletions

View File

@ -411,6 +411,33 @@ inline bool isNumeric(const datatypes::SystemCatalog::ColDataType type)
}
}
inline bool isInteger(const datatypes::SystemCatalog::ColDataType type)
{
switch (type)
{
case datatypes::SystemCatalog::TINYINT:
case datatypes::SystemCatalog::SMALLINT:
case datatypes::SystemCatalog::MEDINT:
case datatypes::SystemCatalog::INT:
case datatypes::SystemCatalog::BIGINT:
case datatypes::SystemCatalog::UTINYINT:
case datatypes::SystemCatalog::USMALLINT:
case datatypes::SystemCatalog::UMEDINT:
case datatypes::SystemCatalog::UINT:
case datatypes::SystemCatalog::UBIGINT:
return true;
default:
return false;
}
}
inline bool isLongDouble(const datatypes::SystemCatalog::ColDataType type)
{
return type == datatypes::SystemCatalog::LONGDOUBLE;
}
inline bool isDecimal(const datatypes::SystemCatalog::ColDataType type)
{
return (type == datatypes::SystemCatalog::DECIMAL ||

View File

@ -83,7 +83,7 @@ namespace datatypes
constexpr uint32_t MAXDECIMALWIDTH = 16U;
constexpr uint8_t INT64MAXPRECISION = 18U;
constexpr uint8_t INT128MAXPRECISION = 38U;
constexpr uint8_t MAXLEGACYWIDTH = 8U;
constexpr uint32_t MAXLEGACYWIDTH = 8U;
constexpr uint8_t MAXSCALEINC4AVG = 4U;

View File

@ -285,6 +285,21 @@ class TSInt128
return TSInt128(s128Value + rhs.s128Value);
}
inline bool operator>(const TSInt128& rhs) const
{
return s128Value > rhs.s128Value;
}
inline bool operator<(const TSInt128& rhs) const
{
return s128Value < rhs.s128Value;
}
inline bool operator!=(const TSInt128& rhs) const
{
return s128Value != rhs.getValue();
}
inline TFloat128 toTFloat128() const
{
return TFloat128(s128Value);

View File

@ -51,6 +51,11 @@ public:
{
return mValue;
}
void store(uint8_t* dst) const
{
*(uint64_t*) dst = mValue;
}
};