You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-5215 Fix overflow of UNION operation involving DECIMAL datatypes.
When a UNION operation involving DECIMAL datatypes with scale and digits before the decimal exceeds the currently supported maximum precision of 38, we throw an error to the user: "MCS-2060: Union operation exceeds maximum DECIMAL precision of 38". This is until MCOL-5417 is implemented where ColumnStore will have full parity with MariaDB server in terms of maximum supported DECIMAL precision and scale of 65 and 38 digits respectively.
This commit is contained in:
@ -5102,11 +5102,18 @@ SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo&
|
||||
unionStep->inputAssociation(jsaToUnion);
|
||||
unionStep->outputAssociation(jsa);
|
||||
|
||||
// This return code in the call to convertUnionColType() below would
|
||||
// always be 0. This is because convertUnionColType() is also called
|
||||
// in the connector code in getSelectPlan()/getGroupPlan() which handle
|
||||
// the non-zero return code scenarios from this function call and error
|
||||
// out, in which case, the execution does not even get to ExeMgr.
|
||||
unsigned int dummyUnionedTypeRc = 0;
|
||||
|
||||
// get unioned column types
|
||||
for (uint64_t j = 0; j < colCount; ++j)
|
||||
{
|
||||
CalpontSystemCatalog::ColType colType =
|
||||
CalpontSystemCatalog::ColType::convertUnionColType(queryColTypes[j]);
|
||||
CalpontSystemCatalog::ColType::convertUnionColType(queryColTypes[j], dummyUnionedTypeRc);
|
||||
types.push_back(colType.colDataType);
|
||||
csNums.push_back(colType.charsetNumber);
|
||||
scale.push_back(colType.scale);
|
||||
|
Reference in New Issue
Block a user