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
MCOL-4931 Make cpimport charset-aware. (#2938)
1. Extend the following CalpontSystemCatalog member functions to set CalpontSystemCatalog::ColType::charsetNumber, after the system catalog update to add charset number to calpontsys.syscolumn in MCOL-5005: CalpontSystemCatalog::lookupOID CalpontSystemCatalog::colType CalpontSystemCatalog::columnRIDs CalpontSystemCatalog::getSchemaInfo 2. Update cpimport to use the CHARSET_INFO object associated with the charset number retrieved from the system catalog, for a dictionary/non-dictionary CHAR/VARCHAR/TEXT column, to truncate long strings that exceed the target column character length. 3. Add MTR test cases.
This commit is contained in:
@ -40,6 +40,7 @@
|
||||
#include "IDBDataFile.h"
|
||||
#include "IDBPolicy.h"
|
||||
#include "nullstring.h"
|
||||
#include "collation.h" // For CHARSET_INFO struct
|
||||
|
||||
#undef EXPORT
|
||||
#undef DELETE
|
||||
@ -410,6 +411,7 @@ struct JobColumn /** @brief Job Column Structure */
|
||||
double fDefaultDbl; /** @brief Dbl/Flt column default */
|
||||
int128_t fDefaultWideDecimal; /** @brief Wide decimal column default */
|
||||
utils::NullString fDefaultChr; /** @brief Char column default */
|
||||
const CHARSET_INFO* cs; /** @brief character set info for the column */
|
||||
JobColumn()
|
||||
: mapOid(0)
|
||||
, dataType(execplan::CalpontSystemCatalog::INT)
|
||||
@ -435,6 +437,7 @@ struct JobColumn /** @brief Job Column Structure */
|
||||
, fDefaultUInt(0)
|
||||
, fDefaultDbl(0.0)
|
||||
, fDefaultWideDecimal(0)
|
||||
, cs(nullptr)
|
||||
{
|
||||
}
|
||||
JobColumn(const std::string& colName_, OID mapOid_, const std::string& typeName_,
|
||||
@ -466,6 +469,7 @@ struct JobColumn /** @brief Job Column Structure */
|
||||
, fDefaultUInt(defaultUInt_)
|
||||
, fDefaultDbl(0.0)
|
||||
, fDefaultWideDecimal(0)
|
||||
, cs(nullptr)
|
||||
{
|
||||
dctnry.fCompressionType = dctnryCompressionType_;
|
||||
}
|
||||
|
Reference in New Issue
Block a user