mirror of https://github.com/citusdata/citus.git
Rename functions and files
parent
47fc6a7afe
commit
e635de95a0
|
@ -34,9 +34,9 @@
|
|||
#include "distributed/multi_logical_optimizer.h"
|
||||
#include "distributed/multi_physical_planner.h"
|
||||
#include "distributed/multi_router_planner.h"
|
||||
#include "distributed/multi_planner_utils.h"
|
||||
#include "distributed/listutils.h"
|
||||
#include "distributed/citus_ruleutils.h"
|
||||
#include "distributed/relation_restriction_equivalence.h"
|
||||
#include "distributed/relay_utility.h"
|
||||
#include "distributed/resource_lock.h"
|
||||
#include "distributed/shardinterval_utils.h"
|
||||
|
@ -280,7 +280,7 @@ CreateInsertSelectRouterPlan(Query *originalQuery,
|
|||
RelationRestrictionContext *relationRestrictionContext =
|
||||
plannerRestrictionContext->relationRestrictionContext;
|
||||
bool allReferenceTables = relationRestrictionContext->allReferenceTables;
|
||||
bool allRelationsJoinedOnPartitionKey = false;
|
||||
bool restrictionEquivalenceForPartitionKeys = false;
|
||||
|
||||
multiPlan->operation = originalQuery->commandType;
|
||||
|
||||
|
@ -296,8 +296,8 @@ CreateInsertSelectRouterPlan(Query *originalQuery,
|
|||
return multiPlan;
|
||||
}
|
||||
|
||||
allRelationsJoinedOnPartitionKey =
|
||||
AllRelationsJoinedOnPartitionKey(plannerRestrictionContext);
|
||||
restrictionEquivalenceForPartitionKeys =
|
||||
RestrictionEquivalenceForPartitionKeys(plannerRestrictionContext);
|
||||
|
||||
/*
|
||||
* Plan select query for each shard in the target table. Do so by replacing the
|
||||
|
@ -317,7 +317,7 @@ CreateInsertSelectRouterPlan(Query *originalQuery,
|
|||
modifyTask = RouterModifyTaskForShardInterval(originalQuery, targetShardInterval,
|
||||
relationRestrictionContext,
|
||||
taskIdIndex,
|
||||
allRelationsJoinedOnPartitionKey);
|
||||
restrictionEquivalenceForPartitionKeys);
|
||||
|
||||
/* add the task if it could be created */
|
||||
if (modifyTask != NULL)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* multi_planner_utils.c
|
||||
* relation_restriction_equivalence.c
|
||||
*
|
||||
* This file contains functions helper functions for planning
|
||||
* queries with colocated tables and subqueries.
|
||||
|
@ -10,10 +10,10 @@
|
|||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
#include "distributed/multi_planner_utils.h"
|
||||
#include "distributed/multi_planner.h"
|
||||
#include "distributed/multi_logical_planner.h"
|
||||
#include "distributed/pg_dist_partition.h"
|
||||
#include "distributed/relation_restriction_equivalence.h"
|
||||
#include "nodes/nodeFuncs.h"
|
||||
#include "nodes/pg_list.h"
|
||||
#include "nodes/primnodes.h"
|
||||
|
@ -92,7 +92,7 @@ static void ListConcatUniqueAttributeClassMemberLists(AttributeEquivalenceClass
|
|||
secondClass);
|
||||
|
||||
/*
|
||||
* AllRelationsJoinedOnPartitionKey aims to deduce whether each of the RTE_RELATION
|
||||
* RestrictionEquivalenceForPartitionKeys aims to deduce whether each of the RTE_RELATION
|
||||
* is joined with at least one another RTE_RELATION on their partition keys. If each
|
||||
* RTE_RELATION follows the above rule, we can conclude that all RTE_RELATIONs are
|
||||
* joined on their partition keys.
|
||||
|
@ -123,7 +123,8 @@ static void ListConcatUniqueAttributeClassMemberLists(AttributeEquivalenceClass
|
|||
* and GenerateAttributeEquivalencesForJoinRestrictions()
|
||||
*/
|
||||
bool
|
||||
AllRelationsJoinedOnPartitionKey(PlannerRestrictionContext *plannerRestrictionContext)
|
||||
RestrictionEquivalenceForPartitionKeys(
|
||||
PlannerRestrictionContext *plannerRestrictionContext)
|
||||
{
|
||||
RelationRestrictionContext *restrictionContext =
|
||||
plannerRestrictionContext->relationRestrictionContext;
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* multi_planner_utils.h
|
||||
*
|
||||
* This file contains functions helper functions for planning
|
||||
* queries with colocated tables and subqueries.
|
||||
*
|
||||
* Copyright (c) 2017-2017, Citus Data, Inc.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef MULTI_PLANNER_UTILS_H
|
||||
#define MULTI_PLANNER_UTILS_H
|
||||
|
||||
#include "distributed/multi_planner.h"
|
||||
|
||||
|
||||
extern bool AllRelationsJoinedOnPartitionKey(PlannerRestrictionContext *
|
||||
plannerRestrictionContext);
|
||||
|
||||
|
||||
#endif /* MULTI_PLANNER_UTILS_H */
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* relation_restriction_equivalence.h
|
||||
*
|
||||
* This file contains functions helper functions for planning
|
||||
* queries with colocated tables and subqueries.
|
||||
*
|
||||
* Copyright (c) 2017-2017, Citus Data, Inc.
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef RELATION_RESTRICTION_EQUIVALENCE_H
|
||||
#define RELATION_RESTRICTION_EQUIVALENCE_H
|
||||
|
||||
#include "distributed/multi_planner.h"
|
||||
|
||||
|
||||
extern bool RestrictionEquivalenceForPartitionKeys(PlannerRestrictionContext *
|
||||
plannerRestrictionContext);
|
||||
|
||||
|
||||
#endif /* RELATION_RESTRICTION_EQUIVALENCE_H */
|
Loading…
Reference in New Issue