From dev-return-710-apmail-madlib-dev-archive=madlib.apache.org@madlib.incubator.apache.org Tue Aug 23 00:27:07 2016 Return-Path: X-Original-To: apmail-madlib-dev-archive@minotaur.apache.org Delivered-To: apmail-madlib-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0274D19026 for ; Tue, 23 Aug 2016 00:27:07 +0000 (UTC) Received: (qmail 14278 invoked by uid 500); 23 Aug 2016 00:27:06 -0000 Delivered-To: apmail-madlib-dev-archive@madlib.apache.org Received: (qmail 14232 invoked by uid 500); 23 Aug 2016 00:27:06 -0000 Mailing-List: contact dev-help@madlib.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@madlib.incubator.apache.org Delivered-To: mailing list dev@madlib.incubator.apache.org Received: (qmail 14219 invoked by uid 99); 23 Aug 2016 00:27:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2016 00:27:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4145CC75E1 for ; Tue, 23 Aug 2016 00:27:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.539 X-Spam-Level: X-Spam-Status: No, score=-4.539 tagged_above=-999 required=6.31 tests=[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=-0.519] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id PvErSBTf146x for ; Tue, 23 Aug 2016 00:27:05 +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 91F855FAD5 for ; Tue, 23 Aug 2016 00:27:04 +0000 (UTC) Received: (qmail 14204 invoked by uid 99); 23 Aug 2016 00:27:03 -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; Tue, 23 Aug 2016 00:27:03 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 97701DFF8D; Tue, 23 Aug 2016 00:27:03 +0000 (UTC) From: iyerr3 To: dev@madlib.incubator.apache.org Reply-To: dev@madlib.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-madlib pull request #65: Pivoting Content-Type: text/plain Message-Id: <20160823002703.97701DFF8D@git1-us-west.apache.org> Date: Tue, 23 Aug 2016 00:27:03 +0000 (UTC) Github user iyerr3 commented on a diff in the pull request: https://github.com/apache/incubator-madlib/pull/65#discussion_r75784595 --- Diff: src/ports/postgres/modules/utilities/pivot.py_in --- @@ -234,30 +235,46 @@ def pivot(schema_madlib, source_table, out_table, index, pivot_cols, dict_counter += 1 # Collecting the whole sql query # Please refer to the earlier comment for a sample output - pivot_str = ("{fill_str_begin}" - "{agg} (CASE WHEN {pivot_begin} THEN {pval} END) " - "{fill_str_end} AS {pivot_end}". - format(fill_str_begin=fill_str_begin, + + # Create the masked set + pivot_str_from = ("(CASE WHEN {pivot_begin} THEN {pval} END) " + "AS {pivot_end}". + format(fill_str_begin=fill_str_begin, + fill_str_end=fill_str_end, --- End diff -- We don't need the additional format specifiers --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---