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 3C00D200BBB for ; Thu, 27 Oct 2016 01:40:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3ABB1160AFD; Wed, 26 Oct 2016 23:40:41 +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 830E0160AEE for ; Thu, 27 Oct 2016 01:40:40 +0200 (CEST) Received: (qmail 55318 invoked by uid 500); 26 Oct 2016 23:40:39 -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 55307 invoked by uid 99); 26 Oct 2016 23:40:39 -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; Wed, 26 Oct 2016 23:40:39 +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 EFE80C7452 for ; Wed, 26 Oct 2016 23:40:38 +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-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 BVQu_gEXv1Pl for ; Wed, 26 Oct 2016 23:40:36 +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 8669F5F56C for ; Wed, 26 Oct 2016 23:40:36 +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 u9QNeaOO032200; Wed, 26 Oct 2016 23:40:36 GMT Message-Id: <201610262340.u9QNeaOO032200@ip-10-146-233-104.ec2.internal> Date: Wed, 26 Oct 2016 23:40:34 +0000 From: "Thomas Tauber-Marshall (Code Review)" To: Matthew Jacobs , Alex Behm , impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dimitris Tsirogiannis Reply-To: tmarshall@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3725_Support_Kudu_UPSERT_in_Impala=0A?= X-Gerrit-Change-Id: I8df5cea36b642e267f85ff6b163f3dd96b8386e9 X-Gerrit-ChangeURL: X-Gerrit-Commit: 1357f0c675ef6c87d95eb472b631f379e513bcc9 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, 26 Oct 2016 23:40:41 -0000 Hello Matthew Jacobs, Internal Jenkins, Alex Behm, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/4047 to look at the new patch set (#16). Change subject: IMPALA-3725 Support Kudu UPSERT in Impala ...................................................................... IMPALA-3725 Support Kudu UPSERT in Impala This patch introduces a new query statement, UPSERT, for Kudu tables which operates like an INSERT and uses all of the analysis, planning, and execution machinery as INSERT, except that if there's a primary key collision instead of returning an error an update is performed. New syntax: [with_clause] UPSERT INTO [TABLE] table_name [(column list)] { query_stmt | VALUES (value [, value...]) [, (value [, (value...)]) ...] } where column list must contain all of the key columns in table_name, if specified, and table_name must be a Kudu table. This patch also improves the behavior of INSERTing into Kudu tables without specifying all of the key columns - this now results in an analysis exception, rather than attempting the INSERT and receiving an error back from Kudu. Change-Id: I8df5cea36b642e267f85ff6b163f3dd96b8386e9 --- M be/src/exec/kudu-table-sink.cc M common/thrift/DataSinks.thrift M fe/src/main/cup/sql-parser.cup M fe/src/main/java/org/apache/impala/analysis/CreateTableAsSelectStmt.java M fe/src/main/java/org/apache/impala/analysis/InsertStmt.java M fe/src/main/java/org/apache/impala/planner/KuduTableSink.java M fe/src/main/java/org/apache/impala/planner/TableSink.java M fe/src/main/jflex/sql-scanner.flex M fe/src/test/java/org/apache/impala/analysis/AnalyzeStmtsTest.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeSubqueriesTest.java A fe/src/test/java/org/apache/impala/analysis/AnalyzeUpsertStmtTest.java M fe/src/test/java/org/apache/impala/analysis/AnalyzerTest.java M fe/src/test/java/org/apache/impala/analysis/ParserTest.java M fe/src/test/java/org/apache/impala/analysis/ToSqlTest.java M fe/src/test/java/org/apache/impala/planner/PlannerTest.java A testdata/workloads/functional-planner/queries/PlannerTest/kudu-upsert.test M testdata/workloads/functional-query/queries/QueryTest/kudu_crud.test 17 files changed, 678 insertions(+), 84 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/47/4047/16 -- To view, visit http://gerrit.cloudera.org:8080/4047 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I8df5cea36b642e267f85ff6b163f3dd96b8386e9 Gerrit-PatchSet: 16 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Thomas Tauber-Marshall Gerrit-Reviewer: Alex Behm Gerrit-Reviewer: Dimitris Tsirogiannis Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Matthew Jacobs Gerrit-Reviewer: Thomas Tauber-Marshall