Repository: incubator-hawq Updated Branches: refs/heads/HAWQ-967 f40b2918e -> 0ce866737
HAWQ-975. Added memory cleanup. Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0ce86673 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0ce86673 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0ce86673 Branch: refs/heads/HAWQ-967 Commit: 0ce86673718d99918ed0782aa1c4d3270d3d080c Parents: f40b291 Author: Oleksandr Diachenko <[email protected]> Authored: Fri Aug 19 15:10:57 2016 -0700 Committer: Oleksandr Diachenko <[email protected]> Committed: Fri Aug 19 15:10:57 2016 -0700 ---------------------------------------------------------------------- src/backend/access/external/pxfheaders.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0ce86673/src/backend/access/external/pxfheaders.c ---------------------------------------------------------------------- diff --git a/src/backend/access/external/pxfheaders.c b/src/backend/access/external/pxfheaders.c index c7b2ab4..49dd966 100644 --- a/src/backend/access/external/pxfheaders.c +++ b/src/backend/access/external/pxfheaders.c @@ -35,7 +35,7 @@ static void add_location_options_httpheader(CHURL_HEADERS headers, GPHDUri *gphd static char* prepend_x_gp(const char* key); static void add_delegation_token_headers(CHURL_HEADERS headers, PxfInputData *inputData); static void add_remote_credentials(CHURL_HEADERS headers); -static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo *projInfo, List *whereAttributes); +static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo *projInfo, List *qualsAttributes); /* * Add key/value pairs to connection header. @@ -65,9 +65,9 @@ void build_http_header(PxfInputData *input) if (proj_info != NULL && proj_info->pi_isVarList) { - List* whereAttributes = extractPxfAttributes(input->quals); + List* qualsAttributes = extractPxfAttributes(input->quals); - add_projection_desc_httpheader(headers, proj_info, whereAttributes); + add_projection_desc_httpheader(headers, proj_info, qualsAttributes); } /* GP cluster configuration */ @@ -169,7 +169,7 @@ static void add_tuple_desc_httpheader(CHURL_HEADERS headers, Relation rel) pfree(formatter.data); } -static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo *projInfo, List *whereAttributes) { +static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo *projInfo, List *qualsAttributes) { int i; char long_number[sizeof(int32) * 8]; int *varNumbers = projInfo->pi_varNumbers; @@ -177,7 +177,7 @@ static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo initStringInfo(&formatter); /* Convert the number of projection columns to a string */ - pg_ltoa(list_length(projInfo->pi_targetlist) + list_length(whereAttributes), long_number); + pg_ltoa(list_length(projInfo->pi_targetlist) + list_length(qualsAttributes), long_number); churl_headers_append(headers, "X-GP-ATTRS-PROJ", long_number); for(i = 0; i < list_length(projInfo->pi_targetlist); i++) { @@ -191,7 +191,7 @@ static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo ListCell *attribute = NULL; - foreach(attribute, whereAttributes) + foreach(attribute, qualsAttributes) { AttrNumber attrNumber = lfirst_int(attribute); @@ -203,6 +203,7 @@ static void add_projection_desc_httpheader(CHURL_HEADERS headers, ProjectionInfo } + list_free(qualsAttributes); pfree(formatter.data); }
