You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-10-31 18:30:33 +03:00 
			
		
		
		
	fix(rbo,rules,QA): ExistsFilter::transform merges statistics to enable QA for EXISTS expressions.
This commit is contained in:
		| @@ -1182,10 +1182,15 @@ execplan::SCSEP CalpontSelectExecutionPlan::cloneForTableWORecursiveSelectsGbObH | ||||
|   // Deep copy of column map | ||||
|   for (const auto& entry : fColumnMap) | ||||
|   { | ||||
|     // WIP only relevant RCs must be copied | ||||
|     if (entry.second) | ||||
|     auto tableAlias = entry.second->singleTable(); | ||||
|     // TODO We insert multiple times if there are multiple SCs for the same RC. | ||||
|     if (tableAlias && targetTableAlias.weakerEq(*tableAlias)) | ||||
|     { | ||||
|       newColumnMap.insert({entry.first, SRCP(entry.second->clone())}); | ||||
|       auto it = fColumnMap.find(entry.first); | ||||
|       if (it == fColumnMap.end()) | ||||
|       { | ||||
|         newColumnMap.insert({entry.first, SRCP(entry.second->clone())}); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -127,6 +127,9 @@ execplan::ParseTree* ExistsSub::transform() | ||||
|     return NULL; | ||||
|   } | ||||
|  | ||||
|   // Insert column statistics | ||||
|   fGwip.mergeTableStatistics(gwi.tableStatisticsMap); | ||||
|  | ||||
|   // remove outer query tables | ||||
|   CalpontSelectExecutionPlan::TableList tblist; | ||||
|  | ||||
|   | ||||
| @@ -441,6 +441,8 @@ execplan::SCSEP createDerivedTableFromTable(execplan::CalpontSelectExecutionPlan | ||||
|   } | ||||
|  | ||||
|   { | ||||
|     derivedCSEP->tableAlias(tableAlias, true); | ||||
|  | ||||
|     auto additionalUnionVec = makeUnionFromTable( | ||||
|         *derivedCSEP, const_cast<execplan::CalpontSystemCatalog::TableAliasName&>(table), ctx); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user