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 2016/09/02 08:47:39 UTC
incubator-hawq git commit: HAWQ-1032. Fix bug of set bucket number of
child partition to parent partition only when policy type equals to
POLICYTYPE_PARTITIONED.
Repository: incubator-hawq
Updated Branches:
refs/heads/master 47892a1fd -> af3e3b722
HAWQ-1032. Fix bug of set bucket number of child partition to parent partition only when policy type equals to POLICYTYPE_PARTITIONED.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/af3e3b72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/af3e3b72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/af3e3b72
Branch: refs/heads/master
Commit: af3e3b722af4319f3a1fa3586a7a2860c5259db5
Parents: 47892a1
Author: hzhang2 <zh...@163.com>
Authored: Fri Sep 2 16:43:30 2016 +0800
Committer: hzhang2 <zh...@163.com>
Committed: Fri Sep 2 16:43:30 2016 +0800
----------------------------------------------------------------------
src/backend/cdb/cdbpartition.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/af3e3b72/src/backend/cdb/cdbpartition.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbpartition.c b/src/backend/cdb/cdbpartition.c
index eb157ed..3efeea2 100644
--- a/src/backend/cdb/cdbpartition.c
+++ b/src/backend/cdb/cdbpartition.c
@@ -6623,7 +6623,10 @@ atpxPartAddList(Relation rel,
/* propagate owner */
((CreateStmt *)q->utilityStmt)->ownerid = ownerid;
/* child partition should have the same bucket number with parent partition */
- if (parPolicy && parPolicy->ptype == POLICYTYPE_PARTITIONED) {
+ if (parPolicy && ((CreateStmt *)q->utilityStmt)->policy
+ && ((CreateStmt *)q->utilityStmt)->policy->nattrs > 0
+ && ((CreateStmt *)q->utilityStmt)->policy->ptype ==
+ POLICYTYPE_PARTITIONED) {
((CreateStmt *)q->utilityStmt)->policy->bucketnum = parPolicy->bucketnum;
}
}