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 8A71B200CB7 for ; Fri, 30 Jun 2017 17:10:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 88615160BEB; Fri, 30 Jun 2017 15:10:51 +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 CD174160BDD for ; Fri, 30 Jun 2017 17:10:50 +0200 (CEST) Received: (qmail 58044 invoked by uid 500); 30 Jun 2017 15:10:50 -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 58032 invoked by uid 99); 30 Jun 2017 15:10:49 -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; Fri, 30 Jun 2017 15:10:49 +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 3C82FC09BE for ; Fri, 30 Jun 2017 15:10:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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-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 pWn15D6CTdbd for ; Fri, 30 Jun 2017 15:10: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-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C09235F6C3 for ; Fri, 30 Jun 2017 15:10:47 +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 v5UFAkrm032075; Fri, 30 Jun 2017 15:10:46 GMT Message-Id: <201706301510.v5UFAkrm032075@ip-10-146-233-104.ec2.internal> Date: Fri, 30 Jun 2017 15:10:45 +0000 From: "Tim Armstrong (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Matthew Jacobs , Dan Hecht Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5560=3A_always_store_CHAR=28N=29_inline_in_tuple=0A?= X-Gerrit-Change-Id: I9c0b823ccff6b0c37f5267c548d096c29b8caac3 X-Gerrit-ChangeURL: X-Gerrit-Commit: 413fdef5f6eb06ec7ec6c5187f9fda0e293f829e 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.7 archived-at: Fri, 30 Jun 2017 15:10:51 -0000 Tim Armstrong has uploaded a new patch set (#5). Change subject: IMPALA-5560: always store CHAR(N) inline in tuple ...................................................................... IMPALA-5560: always store CHAR(N) inline in tuple This is done to simplify the CHAR(N) logic. I believe this is overall an improvement - any benefits of the out-of-line storage that motivated this optimisation originally were outweighed by the added complexity. This also avoids IMPALA-5559 (fe/be have different notions of var-len), which will unblock IMPALA-3200. Pros: * Reduce the number of code paths and improve test coverage. (e.g. avoids IMPALA-5559: fe/be have different notions of var-len) * Reduced memory to store non-NULL data (saves 12-byte StringValue) * Fewer branches in code -> save CPU cycles. * If CHAR(N) performance is important, reduced complexity makes it easier to implement codegen. Cons: * Requires N bytes to store a NULL value. * May hurt cache locality (although this is speculative in my mind). The change is mostly mechanical - I removed MAX_CHAR_INLINE_LENGTH and then removed branches that depended on that. Testing: Ran exhaustive build. Change-Id: I9c0b823ccff6b0c37f5267c548d096c29b8caac3 --- M be/src/exec/hash-table.cc M be/src/exec/hdfs-avro-scanner-test.cc M be/src/exec/hdfs-parquet-table-writer.cc M be/src/exec/hdfs-text-table-writer.cc M be/src/exec/parquet-column-readers.cc M be/src/exprs/agg-fn-evaluator.cc M be/src/exprs/anyval-util.h M be/src/exprs/scalar-expr-evaluator.cc M be/src/exprs/slot-ref.cc M be/src/runtime/raw-value-ir.cc M be/src/runtime/raw-value.cc M be/src/runtime/raw-value.inline.h M be/src/runtime/string-value.h M be/src/runtime/string-value.inline.h M be/src/runtime/types.h M be/src/service/fe-support.cc M be/src/service/hs2-util.cc M fe/src/main/java/org/apache/impala/catalog/ScalarType.java M testdata/workloads/functional-query/queries/QueryTest/spilling.test 19 files changed, 68 insertions(+), 129 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/03/7303/5 -- To view, visit http://gerrit.cloudera.org:8080/7303 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9c0b823ccff6b0c37f5267c548d096c29b8caac3 Gerrit-PatchSet: 5 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Tim Armstrong