hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [3/3] incubator-hawq git commit: HAWQ-983. Fix compiler warning in gp_dump_query_oids
Date Fri, 26 Aug 2016 07:07:17 GMT
HAWQ-983. Fix compiler warning in gp_dump_query_oids

We just need to pass the query tree, we don't need source sql text and
other arguments, so change to QueryRewrite here. Previously an implicit
cast was causing a compiler warning. Also, the method pg_analyze_and_rewrite
is overkill, and in fact calls QueryRewrite.


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

Branch: refs/heads/master
Commit: 08a1c6c2af705df850b1b9bbd6188d0cd2036b42
Parents: 19124b7
Author: Haisheng Yuan <hyuan@pivotal.io>
Authored: Mon Aug 8 17:31:45 2016 -0700
Committer: Ming LI <mli@pivotal.io>
Committed: Fri Aug 26 15:02:56 2016 +0800

----------------------------------------------------------------------
 src/bin/gpoptutils/gpoptutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/08a1c6c2/src/bin/gpoptutils/gpoptutils.c
----------------------------------------------------------------------
diff --git a/src/bin/gpoptutils/gpoptutils.c b/src/bin/gpoptutils/gpoptutils.c
index 0c0197b..e4641f0 100644
--- a/src/bin/gpoptutils/gpoptutils.c
+++ b/src/bin/gpoptutils/gpoptutils.c
@@ -123,8 +123,8 @@ gp_dump_query_oids(PG_FUNCTION_ARGS)
 		Query *query = (Query *) lfirst(plc);
 		if (CMD_UTILITY == query->commandType && T_ExplainStmt == query->utilityStmt->type)
 		{
-			Node *queryExplain = ((ExplainStmt *)query->utilityStmt)->query;
-			List *queryTree = pg_analyze_and_rewrite(queryExplain, sqlText, NULL, 0);
+			Query *queryExplain = ((ExplainStmt *)query->utilityStmt)->query;
+			List *queryTree = QueryRewrite(queryExplain);
 			Assert(1 == list_length(queryTree));
 			query = (Query *) lfirst(list_head(queryTree));
 		}


Mime
View raw message