hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ztao1...@apache.org
Subject incubator-hawq git commit: HAWQ-402. Fix bug that core dump due to nullptr in GroupClause.
Date Tue, 16 Feb 2016 01:45:33 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master f58baae01 -> 2968e5154


HAWQ-402. Fix bug that core dump due to nullptr in GroupClause.


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

Branch: refs/heads/master
Commit: 2968e51540c24b4cfef7c4635ff3105897b4109b
Parents: f58baae
Author: zhenglin tao <zhenglin.taozl@gmail.com>
Authored: Mon Feb 15 17:29:17 2016 +0800
Committer: zhenglin tao <zhenglin.taozl@gmail.com>
Committed: Tue Feb 16 09:45:14 2016 +0800

----------------------------------------------------------------------
 src/backend/optimizer/util/tlist.c | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2968e515/src/backend/optimizer/util/tlist.c
----------------------------------------------------------------------
diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c
index 3cb01fc..533d1b2 100644
--- a/src/backend/optimizer/util/tlist.c
+++ b/src/backend/optimizer/util/tlist.c
@@ -317,6 +317,12 @@ get_sortgrouplist_exprs(List *sortClauses, List *targetList)
 		SortClause *sortcl = (SortClause *) lfirst(l);
 		Node	   *sortexpr;
 
+		/*
+		 * if GroupClause in grouping sets is null,
+		 * there is no need to build the referenced targetlist expr
+		 */
+		if (sortcl == NULL) continue;
+
 		sortexpr = get_sortgroupclause_expr(sortcl, targetList);
 		result = lappend(result, sortexpr);
 	}


Mime
View raw message