1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-5522 Properly process pm join result count. (#2909)

This patch:
1. Properly processes situation when pm join result count is exceeded.
2. Adds session variable 'columnstore_max_pm_join_result_count` to control the limit.
This commit is contained in:
Denis Khalikov
2023-08-04 16:55:45 +03:00
committed by GitHub
parent 4f580d109d
commit 896e8dd769
17 changed files with 144 additions and 60 deletions

View File

@ -89,6 +89,7 @@ CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(const int location)
, fDJSPartitionSize(100 * 1024 * 1024)
, fDJSMaxPartitionTreeDepth(8)
, fDJSForceRun(false)
, fMaxPmJoinResultCount(1048576)
, // 100MB mem usage for disk based join,
fUMMemLimit(numeric_limits<int64_t>::max())
, fIsDML(false)
@ -463,6 +464,7 @@ void CalpontSelectExecutionPlan::serialize(messageqcpp::ByteStream& b) const
b << fDJSPartitionSize;
b << fDJSMaxPartitionTreeDepth;
b << (uint8_t)fDJSForceRun;
b << (uint32_t)fMaxPmJoinResultCount;
b << fUMMemLimit;
b << (uint8_t)fIsDML;
messageqcpp::ByteStream::octbyte timeZone = fTimeZone;
@ -661,6 +663,7 @@ void CalpontSelectExecutionPlan::unserialize(messageqcpp::ByteStream& b)
b >> fDJSPartitionSize;
b >> fDJSMaxPartitionTreeDepth;
b >> (uint8_t&)fDJSForceRun;
b >> (uint32_t&)fMaxPmJoinResultCount;
b >> fUMMemLimit;
b >> tmp8;
fIsDML = tmp8;

View File

@ -708,6 +708,15 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
return fDJSForceRun;
}
void maxPmJoinResultCount(uint32_t value)
{
fMaxPmJoinResultCount = value;
}
uint32_t maxPmJoinResultCount()
{
return fMaxPmJoinResultCount;
}
void umMemLimit(uint64_t l)
{
fUMMemLimit = l;
@ -942,6 +951,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
uint64_t fDJSPartitionSize = 100 * 1024 * 1024;
uint32_t fDJSMaxPartitionTreeDepth = 8;
bool fDJSForceRun = false;
uint32_t fMaxPmJoinResultCount = 1048576;
int64_t fUMMemLimit = numeric_limits<int64_t>::max();
bool fIsDML = false;
long fTimeZone = 0;