You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2015/12/16 10:21:21 UTC
incubator-hawq git commit: Revert "HAWQ-218. Core dump while
selecting data from partitioned table with where condition that belongs to no
partition"
Repository: incubator-hawq
Updated Branches:
refs/heads/master 18300ea8f -> cc7ab4b29
Revert "HAWQ-218. Core dump while selecting data from partitioned table with where condition that belongs to no partition"
This reverts commit 18300ea8f6fbe80f74856a2fdaecb0a59713b5ca.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/cc7ab4b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/cc7ab4b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/cc7ab4b2
Branch: refs/heads/master
Commit: cc7ab4b290a836591356f5f0dc1c1f1a36335d02
Parents: 18300ea
Author: Ruilong Huo <rh...@pivotal.io>
Authored: Wed Dec 16 17:15:28 2015 +0800
Committer: Ruilong Huo <rh...@pivotal.io>
Committed: Wed Dec 16 17:15:28 2015 +0800
----------------------------------------------------------------------
src/backend/cdb/cdbdatalocality.c | 11 +------
src/backend/optimizer/plan/planner.c | 49 +++++++++++++++----------------
src/include/cdb/cdbdatalocality.h | 3 +-
3 files changed, 26 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cc7ab4b2/src/backend/cdb/cdbdatalocality.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbdatalocality.c b/src/backend/cdb/cdbdatalocality.c
index 5f7cd1c..5c3cbde 100644
--- a/src/backend/cdb/cdbdatalocality.c
+++ b/src/backend/cdb/cdbdatalocality.c
@@ -3903,7 +3903,7 @@ static void cleanup_allocation_algorithm(
*/
SplitAllocResult *
calculate_planner_segment_num(Query *query, QueryResourceLife resourceLife,
- List *fullRangeTable, GpPolicy *intoPolicy, int sliceNum, int dispatchType) {
+ List *fullRangeTable, GpPolicy *intoPolicy, int sliceNum) {
SplitAllocResult *result;
QueryResource *resource = NULL;
List *virtual_segments;
@@ -4106,15 +4106,6 @@ calculate_planner_segment_num(Query *query, QueryResourceLife resourceLife,
minTargetSegmentNumber = minimum_segment_num;
}
- /*
- * Allocate only one virtual segment for query that execute on entry database
- */
- if (dispatchType == DISPATCH_SEQUENTIAL)
- {
- maxTargetSegmentNumber = 1;
- minTargetSegmentNumber = 1;
- }
-
if (enforce_virtual_segment_number > 0) {
maxTargetSegmentNumber = enforce_virtual_segment_number;
minTargetSegmentNumber = enforce_virtual_segment_number;
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cc7ab4b2/src/backend/optimizer/plan/planner.c
----------------------------------------------------------------------
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index b1f2b93..b09389a 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -453,33 +453,32 @@ static void
resource_negotiator(Query *parse, int cursorOptions, ParamListInfo boundParams,
QueryResourceLife resourceLife, ResourceNegotiatorResult** result)
{
- PlannedStmt *plannedstmt = NULL;
- do
- {
- SplitAllocResult *allocResult = NULL;
- Query *my_parse = copyObject(parse);
- ParamListInfo my_boundParams = copyParamList(boundParams);
-
- plannedstmt = standard_planner(my_parse, cursorOptions, my_boundParams);
- (*result)->stmt = plannedstmt;
-
- /* If this is a parallel plan. */
- if (plannedstmt->planTree->dispatch != DISPATCH_UNDETERMINED)
- {
- /*
- * Now, we want to allocate resource.
- */
- allocResult = calculate_planner_segment_num(my_parse, resourceLife,
- plannedstmt->rtable, plannedstmt->intoPolicy,
- plannedstmt->nMotionNodes + plannedstmt->nInitPlans + 1,
- plannedstmt->planTree->dispatch);
+ PlannedStmt *plannedstmt = NULL;
+ do
+ {
+ SplitAllocResult *allocResult = NULL;
+ Query *my_parse = copyObject(parse);
+ ParamListInfo my_boundParams = copyParamList(boundParams);
+
+ plannedstmt = standard_planner(my_parse, cursorOptions, my_boundParams);
+ (*result)->stmt = plannedstmt;
+
+ /* If this is a parallel plan. */
+ if (plannedstmt->planTree->dispatch == DISPATCH_PARALLEL)
+ {
+ /*
+ * Now, we want to allocate resource.
+ */
+ allocResult = calculate_planner_segment_num(my_parse, resourceLife,
+ plannedstmt->rtable, plannedstmt->intoPolicy,
+ plannedstmt->nMotionNodes + plannedstmt->nInitPlans + 1);
- Assert(allocResult);
+ Assert(allocResult);
- (*result)->saResult = *allocResult;
- pfree(allocResult);
- }
- } while (0);
+ (*result)->saResult = *allocResult;
+ pfree(allocResult);
+ }
+ } while (0);
}
static PlannedStmt *
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cc7ab4b2/src/include/cdb/cdbdatalocality.h
----------------------------------------------------------------------
diff --git a/src/include/cdb/cdbdatalocality.h b/src/include/cdb/cdbdatalocality.h
index b3ebc69..902fc18 100644
--- a/src/include/cdb/cdbdatalocality.h
+++ b/src/include/cdb/cdbdatalocality.h
@@ -69,8 +69,7 @@ typedef struct VirtualSegmentNode
* we calculate the appropriate planner segment_num.
*/
SplitAllocResult * calculate_planner_segment_num(Query *query, QueryResourceLife resourceLife,
- List *rtable, GpPolicy *intoPolicy, int sliceNum,
- int dispatchType);
+ List *rtable, GpPolicy *intoPolicy, int sliceNum);
FILE *fp;
FILE *fpaoseg;