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-427. Fix bug of wrong results in mdqa+rollup.
Date Mon, 22 Feb 2016 01:56:47 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master e6cabe821 -> 267dd2780


HAWQ-427. Fix bug of wrong results in mdqa+rollup.


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

Branch: refs/heads/master
Commit: 267dd2780da81d4ab918fa0db00d3ff659e0b81e
Parents: e6cabe8
Author: zhenglin tao <zhenglin.taozl@gmail.com>
Authored: Sun Feb 21 20:15:59 2016 +0800
Committer: zhenglin tao <zhenglin.taozl@gmail.com>
Committed: Mon Feb 22 09:56:35 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/267dd278/src/backend/optimizer/util/tlist.c
----------------------------------------------------------------------
diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c
index 533d1b2..ce30db9 100644
--- a/src/backend/optimizer/util/tlist.c
+++ b/src/backend/optimizer/util/tlist.c
@@ -323,6 +323,14 @@ get_sortgrouplist_exprs(List *sortClauses, List *targetList)
 		 */
 		if (sortcl == NULL) continue;
 
+		/*
+		 * tleSortGroupRef in SortClause and ressortgroupref in TargetEntry
+		 * may be zero at the sametime, which means no reference by
+		 * sort/group clause. Should avoid calling get_sortgroupclause_expr
+		 * in this situation.
+		 */
+		if (sortcl->tleSortGroupRef == 0) continue;
+
 		sortexpr = get_sortgroupclause_expr(sortcl, targetList);
 		result = lappend(result, sortexpr);
 	}


Mime
View raw message