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 C3C69200BCC for ; Tue, 15 Nov 2016 02:12:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C2634160B0D; Tue, 15 Nov 2016 01:12:52 +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 17C6E160B06 for ; Tue, 15 Nov 2016 02:12:51 +0100 (CET) Received: (qmail 76348 invoked by uid 500); 15 Nov 2016 01:12:51 -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 76331 invoked by uid 99); 15 Nov 2016 01:12:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2016 01:12:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A89A6180617 for ; Tue, 15 Nov 2016 01:12:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id hC03nGnq3_Ur for ; Tue, 15 Nov 2016 01:12:48 +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 B39E25FC9C for ; Tue, 15 Nov 2016 01:12:48 +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 uAF1Cm4B016763; Tue, 15 Nov 2016 01:12:48 GMT Message-Id: <201611150112.uAF1Cm4B016763@ip-10-146-233-104.ec2.internal> Date: Tue, 15 Nov 2016 01:12:48 +0000 From: "Dan Hecht (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Alex Behm Reply-To: dhecht@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4436=3A_StringValue=3A=3AStringCompare=28=29_should_match_strncmp=28=29=0A?= X-Gerrit-Change-Id: Ic0750f98d8c5ef7d0c0ea279cd1f80b4acbad1be X-Gerrit-ChangeURL: X-Gerrit-Commit: bc9e95d51d76c42a092cced718fce4ef78758a5b 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: Tue, 15 Nov 2016 01:12:52 -0000 Dan Hecht has uploaded a new patch set (#2). Change subject: IMPALA-4436: StringValue::StringCompare() should match strncmp() ...................................................................... IMPALA-4436: StringValue::StringCompare() should match strncmp() According to the C standard, strncmp() interprets characters as unsigned, whereas StringCompare() uses char (which happens to be signed). This means that for values greater than 127, they don't give the same result (which is especially bad considering StringCompare() falls back to strncmp(), and so the answer depends on the mismatched position). Fix StringCompare() to interpret as unsigned char. Change-Id: Ic0750f98d8c5ef7d0c0ea279cd1f80b4acbad1be --- M be/src/runtime/CMakeLists.txt A be/src/runtime/string-compare-test.cc M be/src/runtime/string-value.inline.h 3 files changed, 71 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/83/5083/2 -- To view, visit http://gerrit.cloudera.org:8080/5083 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic0750f98d8c5ef7d0c0ea279cd1f80b4acbad1be Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Dan Hecht Gerrit-Reviewer: Alex Behm