1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

MCOL-4173 This patch adds support for wide-DECIMAL INNER, OUTER, SEMI, functional JOINs

based on top of TypelessData
This commit is contained in:
Roman Nozdrin
2021-02-16 10:23:49 +00:00
parent 4ecd561878
commit bed0b7c6bc
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;
constexpr int8_t IGNOREPRECISION = -1;

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;
}
};