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-487. Ensure virtual segment of analyze not greate than GetUtilPartitionNum.
Date Fri, 04 Mar 2016 09:15:56 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 7715e6c30 -> 7924d56fb


HAWQ-487. Ensure virtual segment of analyze not greate than GetUtilPartitionNum.


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

Branch: refs/heads/master
Commit: 7924d56fb9818543d1145defe075ee6c0d337f08
Parents: 7715e6c
Author: hubertzhang <hzhang@pivotal.io>
Authored: Fri Mar 4 17:15:39 2016 +0800
Committer: hubertzhang <hzhang@pivotal.io>
Committed: Fri Mar 4 17:15:39 2016 +0800

----------------------------------------------------------------------
 src/backend/commands/analyze.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/7924d56f/src/backend/commands/analyze.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 91451d8..afa4cc0 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -807,7 +807,7 @@ void analyzeStmt(VacuumStmt *stmt, List *relids, int preferred_seg_num)
 static int calculate_virtual_segment_number(List* candidateRelations) {
 	ListCell* le1;
 	int vsegNumber = 1;
-	int64_t totalDataSize = 0;
+	int64 totalDataSize = 0;
 	bool isHashRelationExist = false;
 	int maxHashBucketNumber = 0;
 
@@ -843,7 +843,7 @@ static int calculate_virtual_segment_number(List* candidateRelations)
{
 		vsegNumber = totalDataSize + 1;
 	}
 	/*vsegNumber should be less than GetUtilPartitionNum*/
-	if(vsegNumber > GetUtilPartitionNum()){
+	if(vsegNumber > GetUtilPartitionNum() || vsegNumber <= 0){
 		vsegNumber = GetUtilPartitionNum();
 	}
 


Mime
View raw message