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 EFE16200BD3 for ; Tue, 6 Dec 2016 09:10:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EE942160B1B; Tue, 6 Dec 2016 08:10:07 +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 44460160B0C for ; Tue, 6 Dec 2016 09:10:07 +0100 (CET) Received: (qmail 83602 invoked by uid 500); 6 Dec 2016 08:10:06 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 83591 invoked by uid 99); 6 Dec 2016 08:10: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, 06 Dec 2016 08:10: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 A8951D2697 for ; Tue, 6 Dec 2016 08:10:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qpl8mMneRrsp for ; Tue, 6 Dec 2016 08:10:03 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 79D1B5F4A7 for ; Tue, 6 Dec 2016 08:10:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id uB68A1lt019908; Tue, 6 Dec 2016 08:10:01 GMT Date: Tue, 6 Dec 2016 08:10:01 +0000 From: "Sailesh Mukil (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org Message-ID: Reply-To: sailesh@cloudera.com X-Gerrit-MessageType: newchange Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4594=3A_WriteSlot_and_CodegenWriteSlot_handle_escaped_NULL_slots_differently=0A?= X-Gerrit-Change-Id: I858e427ad7c2b2da8c2bb657be06b7443655781f X-Gerrit-ChangeURL: X-Gerrit-Commit: 523b3d7467ce39020442376127212ce77db4c38c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Tue, 06 Dec 2016 08:10:08 -0000 Sailesh Mukil has uploaded a new change for review. http://gerrit.cloudera.org:8080/5377 Change subject: IMPALA-4594: WriteSlot and CodegenWriteSlot handle escaped NULL slots differently ...................................................................... IMPALA-4594: WriteSlot and CodegenWriteSlot handle escaped NULL slots differently CodegenWriteSlot() receives negative length values for the lengths of the slots passed to it if the slots contains escape characters. This differs from the behavior of WriteSlot() where the length passed to it is always positive. Due to this, the codegen generated code to check if the slot is NULL or not never marks a slot NULL, when the slot contains the default NULL pattern '\N' because the length for that slot is negative (due to the escape character) and the IsNullString() and IrGenericIsNullString() functions always returns false for these cases, even though the slot is a NULL slot. Things worked fine because of some incorrect code in CodegenWriteSlot that marks invalid slots and NULL slots as NULL. Due to this code, invalid slots were not marked as invalid and did not return an error. Instead they were just sliently marked as NULL. This patch makes sure that only positive lengths are passed to CodegenWriteSlot() so that NULL checking is correct and it also makes sure that invalid slots are not silently marked as NULL. Testing: Re-enabled an older hdfs-scan-node-errors test. Formatted it to fit new error message format after IMPALA-3859 and IMPALA-3895. Change-Id: I858e427ad7c2b2da8c2bb657be06b7443655781f --- M be/src/exec/hdfs-scanner.cc M be/src/exec/text-converter.cc M testdata/workloads/functional-query/queries/DataErrorsTest/hdfs-scan-node-errors.test 3 files changed, 68 insertions(+), 66 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/5377/1 -- To view, visit http://gerrit.cloudera.org:8080/5377 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I858e427ad7c2b2da8c2bb657be06b7443655781f Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Sailesh Mukil