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 D0306200BC2 for ; Thu, 3 Nov 2016 06:11:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CEB61160B0A; Thu, 3 Nov 2016 05:11:19 +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 22101160AFB for ; Thu, 3 Nov 2016 06:11:18 +0100 (CET) Received: (qmail 61647 invoked by uid 500); 3 Nov 2016 05:11:18 -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 61636 invoked by uid 99); 3 Nov 2016 05:11:17 -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; Thu, 03 Nov 2016 05:11:17 +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 5E1D21A0615 for ; Thu, 3 Nov 2016 05:11:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id OwoSqyAODk1C for ; Thu, 3 Nov 2016 05:11:15 +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 99EF05FBCF for ; Thu, 3 Nov 2016 05:11:14 +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 uA35BDlV019738; Thu, 3 Nov 2016 05:11:13 GMT Message-Id: <201611030511.uA35BDlV019738@ip-10-146-233-104.ec2.internal> Date: Thu, 3 Nov 2016 05:11:13 +0000 From: "Dimitris Tsirogiannis (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Matthew Jacobs , Alex Behm Reply-To: dtsirogiannis@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3724=3A_Support_Kudu_non-covering_range_partitions=0A?= X-Gerrit-Change-Id: I6799c01a37003f0f4c068d911a13e3f060110a06 X-Gerrit-ChangeURL: X-Gerrit-Commit: ad5fc51e8ed47ab27eb5a847d36b8292e4921168 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: Thu, 03 Nov 2016 05:11:20 -0000 Dimitris Tsirogiannis has posted comments on this change. Change subject: IMPALA-3724: Support Kudu non-covering range partitions ...................................................................... Patch Set 5: (5 comments) http://gerrit.cloudera.org:8080/#/c/4856/5/fe/src/main/java/org/apache/impala/analysis/DistributeParam.java File fe/src/main/java/org/apache/impala/analysis/DistributeParam.java: Line 137: for (String colName: colNames_) pkColDefs.add(pkColumnDefByName_.get(colName)); > is pkColumnDefByName_.get(colName) guaranteed to be non-NULL? Yes, we've already checked that in analyze() before the call to this function. http://gerrit.cloudera.org:8080/#/c/4856/5/fe/src/main/java/org/apache/impala/analysis/RangePartition.java File fe/src/main/java/org/apache/impala/analysis/RangePartition.java: Line 150: LiteralExpr literal = LiteralExpr.create(value, analyzer.getQueryCtx()); > Can't we move this after the implicit casting? That way we'll only have one I have one example where this doesn't seem to work. e.g. PARTITION VALUES < factorial(4), where the partition column is type INT. Because factorial returns type BIGINT the check in L162 throws an error. However, by doing the folding first the checks pass as the return value can be implicitly casted to INT without precision loss. Thoughts? Line 169: Expr castedLiteral = literal.uncheckedCastTo(colType); > castLiteral Done http://gerrit.cloudera.org:8080/#/c/4856/5/fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java File fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java: Line 1859: AnalyzesOk("create table tab (a int primary key) distribute by range (a) " + > // Test implicit casting/folding of partition values. Done http://gerrit.cloudera.org:8080/#/c/4856/5/testdata/workloads/functional-query/queries/QueryTest/kudu_create.test File testdata/workloads/functional-query/queries/QueryTest/kudu_create.test: Line 82: create table tab (a int primary key) distributed by range (a) (partition value = false) > add comment that this is testing implicit casting + folding Done -- To view, visit http://gerrit.cloudera.org:8080/4856 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6799c01a37003f0f4c068d911a13e3f060110a06 Gerrit-PatchSet: 5 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Dimitris Tsirogiannis Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Dimitris Tsirogiannis Gerrit-Reviewer: Matthew Jacobs Gerrit-HasComments: Yes