From dev-return-51968-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed May 23 22:04:49 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 860F5180645 for ; Wed, 23 May 2018 22:04:49 +0200 (CEST) Received: (qmail 50640 invoked by uid 500); 23 May 2018 20:04:48 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 50628 invoked by uid 99); 23 May 2018 20:04:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2018 20:04:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D77D5E10B7; Wed, 23 May 2018 20:04:47 +0000 (UTC) From: JamesRTaylor To: dev@phoenix.apache.org Reply-To: dev@phoenix.apache.org References: In-Reply-To: Subject: [GitHub] phoenix pull request #301: PHOENIX-4728 The upsert select must project tuple... Content-Type: text/plain Message-Id: <20180523200447.D77D5E10B7@git1-us-west.apache.org> Date: Wed, 23 May 2018 20:04:47 +0000 (UTC) Github user JamesRTaylor commented on a diff in the pull request: https://github.com/apache/phoenix/pull/301#discussion_r190381688 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java --- @@ -549,7 +549,7 @@ public MutationPlan compile(UpsertStatement upsert) throws SQLException { select = SelectStatement.create(select, hint); // Pass scan through if same table in upsert and select so that projection is computed correctly // Use optimizer to choose the best plan - QueryCompiler compiler = new QueryCompiler(statement, select, selectResolver, targetColumns, parallelIteratorFactoryToBe, new SequenceManager(statement), false, false, null); + QueryCompiler compiler = new QueryCompiler(statement, select, selectResolver, targetColumns, parallelIteratorFactoryToBe, new SequenceManager(statement), true, false, null); --- End diff -- This seems like too general of a change for the specific issue you're trying to fix for ARRAY_APPEND. I'm also not sure *why* it would impact it. Can't you make changes to ArrayAppendFunction or it's base class to get the desired affect? Any opinions, @maryannxue. Do you remember when/why we need this projectTuples boolean for QueryCompiler? ---