Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B53A9200BC9 for ; Sat, 22 Oct 2016 00:09:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B3DC7160AE8; Fri, 21 Oct 2016 22:09:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DBBE3160AF5 for ; Sat, 22 Oct 2016 00:09:56 +0200 (CEST) Received: (qmail 81221 invoked by uid 500); 21 Oct 2016 22:09:56 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 81198 invoked by uid 99); 21 Oct 2016 22:09:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2016 22:09:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6D655C18FD for ; Fri, 21 Oct 2016 22:09:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id GauyO8NtgyHr for ; Fri, 21 Oct 2016 22:09:53 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 7EBF15FBD8 for ; Fri, 21 Oct 2016 22:09:52 +0000 (UTC) Received: (qmail 80999 invoked by uid 99); 21 Oct 2016 22:09:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2016 22:09:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8C222E00B3; Fri, 21 Oct 2016 22:09:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: odiachenko@apache.org To: commits@hawq.incubator.apache.org Date: Fri, 21 Oct 2016 22:09:54 -0000 Message-Id: <27ac03317a6049cfa64207436fba2deb@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [4/5] incubator-hawq git commit: HAWQ-1103. Fixed warnings. archived-at: Fri, 21 Oct 2016 22:09:57 -0000 HAWQ-1103. Fixed warnings. Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/35442228 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/35442228 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/35442228 Branch: refs/heads/HAWQ-1103 Commit: 354422287af2cb1af0e9465821d8ec9f6062fa10 Parents: 2497b6f Author: Oleksandr Diachenko Authored: Tue Oct 18 14:44:49 2016 -0700 Committer: Oleksandr Diachenko Committed: Tue Oct 18 14:44:49 2016 -0700 ---------------------------------------------------------------------- src/backend/access/external/pxffilters.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/35442228/src/backend/access/external/pxffilters.c ---------------------------------------------------------------------- diff --git a/src/backend/access/external/pxffilters.c b/src/backend/access/external/pxffilters.c index ef7b16f..0d13074 100644 --- a/src/backend/access/external/pxffilters.c +++ b/src/backend/access/external/pxffilters.c @@ -31,7 +31,7 @@ #include "utils/guc.h" #include "utils/lsyscache.h" -static List* pxf_make_expression_items_list(List *quals, Node *parent, bool *logicalOpsNum); +static List* pxf_make_expression_items_list(List *quals, Node *parent, int *logicalOpsNum); static void pxf_free_filter(PxfFilterDesc* filter); static char* pxf_serialize_filter_list(List *filters); static bool opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc *filter); @@ -193,7 +193,6 @@ Oid pxf_supported_types[] = static void pxf_free_expression_items_list(List *expressionItems, bool freeBoolExprNodes) { - ListCell *lc = NULL; ExpressionItem *expressionItem = NULL; int previousLength; @@ -228,7 +227,7 @@ pxf_free_expression_items_list(List *expressionItems, bool freeBoolExprNodes) * */ static List * -pxf_make_expression_items_list(List *quals, Node *parent, bool *logicalOpsNum) +pxf_make_expression_items_list(List *quals, Node *parent, int *logicalOpsNum) { ExpressionItem *expressionItem = NULL; List *result = NIL; @@ -369,7 +368,7 @@ pxf_serialize_filter_list(List *expressionItems) PxfOperatorCode o = filter->op; if (pxfoperand_is_attr(l) && pxfoperand_is_const(r)) { - appendStringInfo(resbuf, "%c%d%c%d%c%d%c%s", + appendStringInfo(resbuf, "%c%d%c%d%c%lu%c%s", PXF_ATTR_CODE, l.attnum - 1, /* Java attrs are 0-based */ PXF_CONST_CODE, r.consttype, PXF_SIZE_BYTES, strlen(r.conststr->data), @@ -377,7 +376,7 @@ pxf_serialize_filter_list(List *expressionItems) } else if (pxfoperand_is_const(l) && pxfoperand_is_attr(r)) { - appendStringInfo(resbuf, "%c%d%c%d%c%s%c%d", + appendStringInfo(resbuf, "%c%d%c%lu%c%s%c%d", PXF_CONST_CODE, l.consttype, PXF_SIZE_BYTES, strlen(l.conststr->data), PXF_CONST_DATA, (l.conststr)->data, @@ -410,6 +409,10 @@ pxf_serialize_filter_list(List *expressionItems) appendStringInfo(resbuf, "%c%d", PXF_LOGICAL_OPERATOR_CODE, boolType); break; } + default: + { + elog(DEBUG5, "Skipping tag: %d", tag); + } } } @@ -726,7 +729,7 @@ void enrich_trivial_expression(List *expressionItems) { andExpr->boolop = AND_EXPR; - andExpressionItem->node = andExpr; + andExpressionItem->node = (Node *) andExpr; andExpressionItem->parent = NULL; andExpressionItem->processed = false;