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 77E4E200B33 for ; Wed, 29 Jun 2016 22:55:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 74F32160A57; Wed, 29 Jun 2016 20:55:12 +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 BEB18160A3C for ; Wed, 29 Jun 2016 22:55:11 +0200 (CEST) Received: (qmail 68086 invoked by uid 500); 29 Jun 2016 20:55:11 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 68074 invoked by uid 99); 29 Jun 2016 20:55:10 -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; Wed, 29 Jun 2016 20:55:10 +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 37EBAC0373 for ; Wed, 29 Jun 2016 20:55:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id XdZdfdxPI3is for ; Wed, 29 Jun 2016 20:55:08 +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 4D91C5FD1B for ; Wed, 29 Jun 2016 20:55:08 +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 u5TKt7cJ028228; Wed, 29 Jun 2016 20:55:07 GMT Message-Id: <201606292055.u5TKt7cJ028228@ip-10-146-233-104.ec2.internal> Date: Wed, 29 Jun 2016 20:55:07 +0000 From: "anujphadke (Code Review)" To: Tim Armstrong , anujphadke , impala-cr@cloudera.com, dev@impala.incubator.apache.org Reply-To: aphadke@cloudera.com X-Gerrit-MessageType: merged Subject: =?UTF-8?Q?=5BImpala-CR=5D=28cdh5-2=2E5=2E0_5=2E7=2Ex=29_IMPALA-3732=3A_handle_string_length_overflow_in_avro_files=0A?= X-Gerrit-Change-Id: If6541e7c68255bf599b26386a55057c93e62af51 X-Gerrit-ChangeURL: X-Gerrit-Commit: 0eda3b10cc136db157b191620a7c7eafc1d2de7d In-Reply-To: References: 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: Wed, 29 Jun 2016 20:55:12 -0000 anujphadke has submitted this change and it was merged. Change subject: IMPALA-3732: handle string length overflow in avro files ...................................................................... IMPALA-3732: handle string length overflow in avro files Avro string lengths are encoded as 64-bit integers. Impala can only handle up to 32-bit integers, so we need to be careful about handling out-of-range integers. Negative integers were already handled by a previous patch, but if a positive 64-bit integer is truncated to a 32-bit integer, the result can be a negative length. This patch fixes CHAR/VARCHAR behaviour, where we can just truncate the string, and STRING, where we can't truncate the string, so must return an error. Testing: Added unit tests for STRING, CHAR, and VARCHAR that exercise the string overflow handling. Change-Id: If6541e7c68255bf599b26386a55057c93e62af51 Reviewed-on: http://gerrit.cloudera.org:8080/3383 Reviewed-by: Tim Armstrong Tested-by: Internal Jenkins (cherry picked from commit e78b6db7e2b334ff88dd5678290f5b932a6a715f) Reviewed-on: http://gerrit.sjc.cloudera.com:8080/13636 Tested-by: Anuj Phadke (cherry picked from commit ea0200e1ea6ff0f6e54b22b00b4e25ce95a7c2d9) Reviewed-on: http://gerrit.cloudera.org:8080/3538 Reviewed-by: anujphadke Tested-by: anujphadke --- M be/src/exec/hdfs-avro-scanner-ir.cc M be/src/exec/hdfs-avro-scanner-test.cc M be/src/exec/hdfs-avro-scanner.cc M be/src/exec/hdfs-avro-scanner.h M common/thrift/generate_error_codes.py 5 files changed, 109 insertions(+), 16 deletions(-) Approvals: anujphadke: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/3538 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6541e7c68255bf599b26386a55057c93e62af51 Gerrit-PatchSet: 2 Gerrit-Project: Impala Gerrit-Branch: cdh5-2.5.0_5.7.x Gerrit-Owner: anujphadke Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Tim Armstrong Gerrit-Reviewer: anujphadke