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 BBE1B200D39 for ; Sat, 28 Oct 2017 06:08:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BA7E2160BF4; Sat, 28 Oct 2017 04:08:04 +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 0BA6B160BF2 for ; Sat, 28 Oct 2017 06:08:03 +0200 (CEST) Received: (qmail 57182 invoked by uid 500); 28 Oct 2017 04:08:03 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 57171 invoked by uid 500); 28 Oct 2017 04:08:02 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 57168 invoked by uid 99); 28 Oct 2017 04:08:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2017 04:08:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D20E61A0EC1 for ; Sat, 28 Oct 2017 04:08:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id EsLbGNuVviJk for ; Sat, 28 Oct 2017 04:08:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id CB4D45FB32 for ; Sat, 28 Oct 2017 04:08:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5DC9CE0373 for ; Sat, 28 Oct 2017 04:08:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1A004212F7 for ; Sat, 28 Oct 2017 04:08:00 +0000 (UTC) Date: Sat, 28 Oct 2017 04:08:00 +0000 (UTC) From: "Koji Noguchi (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PIG-5201) Null handling on FLATTEN MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 28 Oct 2017 04:08:04 -0000 [ https://issues.apache.org/jira/browse/PIG-5201?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Koji Noguchi updated PIG-5201: ------------------------------ Attachment: pig-5201-v05.patch Thanks for the review Rohini!=20 bq. 1) Can we rename flattenNumFieldsForNull to flattenNumFields?=20 Done. bq. 2) POForeach clone should copy flattenNumFieldsForNull Completely missed that. Done. bq. 3) isToBeFlattenedArray[ i ] is checked in 3 if statements. Can we crea= te a outer block with that condition to simplify? Took a look but I'm already afraid of introducing a regression with this cu= rrent change. Prefer not to touch other places if not necessary.=20 bq. 4) TestFlatten.java - license is modified. Unintended change? Ouch. Fixed. bq. System.err.println("KOJIKOJI"); Another ouch. Wiped.=20 {quote} 7) testFlattenOnNullBagWithColumnPrune is redundant. ColumPrune does not af= fect Flatten. Currently we don=E2=80=99t column prune nested data structure= s - tuple, bag (PIG-1324).=20 {quote} Actually this was testing what would happen when a simple field is pruned. = In the test with schema {noformat} (a0:int, bag1:bag {(a1_1:int, a1_2:chararray)}, bag2:bag{(a2_1:chararray, a= 2_2:chararray)}) {noformat} this test is pruning a0:int and checking if {{flattenNumFields}} needs to b= e shifted. Lastly, I added a document for this new behavior. > Null handling on FLATTEN > ------------------------ > > Key: PIG-5201 > URL: https://issues.apache.org/jira/browse/PIG-5201 > Project: Pig > Issue Type: Bug > Reporter: Koji Noguchi > Assignee: Koji Noguchi > Fix For: 0.18.0 > > Attachments: pig-5201-v00-testonly.patch, pig-5201-v01.patch, pig= -5201-v02.patch, pig-5201-v03.patch, pig-5201-v04.patch, pig-5201-v05.patch > > > Sometimes, FLATTEN(null) or FLATTEN(bag-with-null) seem to produce incorr= ect results. > Test code/script to follow. -- This message was sent by Atlassian JIRA (v6.4.14#64029)