hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject incubator-hawq git commit: HAWQ-484. Fix bug in gpcopy and pgdump bug.
Date Thu, 03 Mar 2016 03:32:18 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 419d89e7b -> e88a257ad


HAWQ-484. Fix bug in gpcopy and pgdump bug.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/e88a257a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/e88a257a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/e88a257a

Branch: refs/heads/master
Commit: e88a257adf45e6ed730210e4e360d0674a65b06a
Parents: 419d89e
Author: hubertzhang <hzhang@pivotal.io>
Authored: Thu Mar 3 11:29:49 2016 +0800
Committer: hubertzhang <hzhang@pivotal.io>
Committed: Thu Mar 3 11:29:49 2016 +0800

----------------------------------------------------------------------
 src/backend/commands/analyze.c | 3 +++
 src/backend/commands/copy.c    | 5 ++---
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e88a257a/src/backend/commands/analyze.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index b4ad0c9..779aea5 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -817,6 +817,9 @@ static int calculate_virtual_segment_number(List* candidateRelations)
{
 		if (rel ) {
 			GpPolicy *targetPolicy = GpPolicyFetch(CurrentMemoryContext,
 					rel->rd_id);
+			if(targetPolicy == NULL){
+				return GetUtilPartitionNum();
+			}
 			if (targetPolicy->nattrs > 0) {
 				isHashRelationExist = true;
 				if(maxHashBucketNumber < targetPolicy->bucketnum){

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e88a257a/src/backend/commands/copy.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index e78c1ca..bcd5384 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -2273,8 +2273,7 @@ CopyTo(CopyState cstate)
 				MemTupleBinding *mt_bind = create_memtuple_binding(tupDesc);
 
 				aoscandesc = appendonly_beginscan(rel, ActiveSnapshot, 0, NULL);
-				aoscandesc->splits = GetFileSplitsOfSegment(cstate->splits,
-												rel->rd_id, GetQEIndex());
+				aoscandesc->splits = GetFileSplitsOfSegment(cstate->splits,rel->rd_id, GetQEIndex());
 
 
 				while ((tuple = appendonly_getnext(aoscandesc, ForwardScanDirection, slot)) != NULL)
@@ -2314,7 +2313,7 @@ CopyTo(CopyState cstate)
 					proj[i] = true;
 
 				scan = parquet_beginscan(rel, ActiveSnapshot, 0, proj);
-				scan->splits = cstate->splits;
+				scan->splits = GetFileSplitsOfSegment(cstate->splits, rel->rd_id, GetQEIndex());
 				for(;;)
 				{
 					parquet_getnext(scan, ForwardScanDirection, slot);


Mime
View raw message