You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
Merge pull request #1613 from tntnatbry/MCOL-641-alter-table-fix
MCOL-641 Fix alter table add wide decimal column.
This commit is contained in:
@ -371,7 +371,6 @@ TypeHandler::find(SystemCatalog::ColDataType typeCode,
|
||||
case SystemCatalog::NUM_OF_COL_DATA_TYPE:
|
||||
case SystemCatalog::STRINT:
|
||||
case SystemCatalog::UNDEFINED:
|
||||
case SystemCatalog::BINARY:
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
@ -452,7 +451,6 @@ TypeHandler::find_by_ddltype(const ddlpackage::ColumnType &ct)
|
||||
case ddlpackage::DDL_UNSIGNED_FLOAT: return &mcs_type_handler_ufloat;
|
||||
case ddlpackage::DDL_UNSIGNED_DOUBLE: return &mcs_type_handler_udouble;
|
||||
|
||||
case ddlpackage::DDL_BINARY: //return &mcs_type_handler_binary;
|
||||
case ddlpackage::DDL_INVALID_DATATYPE:
|
||||
break;
|
||||
}
|
||||
|
@ -154,7 +154,6 @@ public:
|
||||
LONGDOUBLE, /* @bug3241, dev and variance calculation only */
|
||||
STRINT, /* @bug3532, string as int for fast comparison */
|
||||
UNDEFINED, /*!< Undefined - used in UDAF API */
|
||||
BINARY, /*!< BINARY type */
|
||||
};
|
||||
|
||||
class TypeAttributesStd
|
||||
|
@ -178,45 +178,24 @@ class Decimal
|
||||
|
||||
static inline bool isWideDecimalNullValue(const int128_t& val)
|
||||
{
|
||||
const uint64_t* ptr = reinterpret_cast<const uint64_t*>(&val);
|
||||
return (ptr[0] == utils::BINARYNULLVALUELOW && ptr[1] == utils::BINARYNULLVALUEHIGH);
|
||||
return (val == TSInt128::NullValue);
|
||||
}
|
||||
|
||||
static inline bool isWideDecimalEmptyValue(const int128_t& val)
|
||||
{
|
||||
const uint64_t* ptr = reinterpret_cast<const uint64_t*>(&val);
|
||||
return (ptr[0] == utils::BINARYEMPTYVALUELOW && ptr[1] == utils::BINARYEMPTYVALUEHIGH);
|
||||
return (val == TSInt128::EmptyValue);
|
||||
}
|
||||
|
||||
static inline void setWideDecimalNullValue(int128_t& val)
|
||||
{
|
||||
uint64_t* ptr = reinterpret_cast<uint64_t*>(&val);
|
||||
ptr[0] = utils::BINARYNULLVALUELOW;
|
||||
ptr[1] = utils::BINARYNULLVALUEHIGH;
|
||||
val = TSInt128::NullValue;
|
||||
}
|
||||
|
||||
static inline void setWideDecimalEmptyValue(int128_t& val)
|
||||
{
|
||||
uint64_t* ptr = reinterpret_cast<uint64_t*>(&val);
|
||||
ptr[0] = utils::BINARYEMPTYVALUELOW;
|
||||
ptr[1] = utils::BINARYEMPTYVALUEHIGH;
|
||||
val = TSInt128::EmptyValue;
|
||||
}
|
||||
|
||||
static inline void setWideDecimalNullValue(int128_t* val)
|
||||
{
|
||||
uint64_t* ptr = reinterpret_cast<uint64_t*>(val);
|
||||
ptr[0] = utils::BINARYNULLVALUELOW;
|
||||
ptr[1] = utils::BINARYNULLVALUEHIGH;
|
||||
}
|
||||
|
||||
static inline void setWideDecimalEmptyValue(int128_t* val)
|
||||
{
|
||||
uint64_t* ptr = reinterpret_cast<uint64_t*>(val);
|
||||
ptr[0] = utils::BINARYEMPTYVALUELOW;
|
||||
ptr[1] = utils::BINARYEMPTYVALUEHIGH;
|
||||
}
|
||||
|
||||
|
||||
static constexpr int128_t minInt128 = int128_t(0x8000000000000000LL) << 64;
|
||||
static constexpr int128_t maxInt128 = (int128_t(0x7FFFFFFFFFFFFFFFLL) << 64) + 0xFFFFFFFFFFFFFFFFLL;
|
||||
|
||||
|
Reference in New Issue
Block a user