1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-677 Fix incompatible join detection

If two tables have multiple joins and one of them was compatible then
the incompatible join detection would fail.

This patch moves the incompatible join detection so that every join is
checked. It also removes the incompatible join detection from
expressionstep as this is redundant and was causing some valid quries to
fail.
This commit is contained in:
Andrew Hutchings
2017-04-25 13:09:19 +01:00
parent f240c89faf
commit a2f919fdd9
2 changed files with 69 additions and 74 deletions

View File

@ -559,18 +559,8 @@ void ExpressionStep::functionJoinCheck(SimpleFilter* sf, JobInfo& jobInfo)
fFunctionJoinInfo.reset(new FunctionJoinInfo);
if ((parseFuncJoinColumn(sf->lhs(), jobInfo) == false) ||
(parseFuncJoinColumn(sf->rhs(), jobInfo) == false) ||
(fFunctionJoinInfo->fTableKey[0] == fFunctionJoinInfo->fTableKey[1]) ||
(!compatibleColumnTypes(sf->lhs()->resultType(), sf->rhs()->resultType(), true)))
(fFunctionJoinInfo->fTableKey[0] == fFunctionJoinInfo->fTableKey[1]))
{
// for better error message
if (fFunctionJoinInfo->fTableKey.size() == 2)
{
uint32_t t1 = fFunctionJoinInfo->fTableKey[0];
uint32_t t2 = fFunctionJoinInfo->fTableKey[1];
jobInfo.incompatibleJoinMap[t1] = t2;
jobInfo.incompatibleJoinMap[t2] = t1;
}
// not convertible
fFunctionJoinInfo.reset();
return;