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 63CCF200C7E for ; Tue, 9 May 2017 01:24:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 625C2160BBF; Mon, 8 May 2017 23:24:46 +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 81CE3160BA5 for ; Tue, 9 May 2017 01:24:45 +0200 (CEST) Received: (qmail 76289 invoked by uid 500); 8 May 2017 23:24:44 -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 76277 invoked by uid 99); 8 May 2017 23:24:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 May 2017 23:24:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D3047C030F for ; Mon, 8 May 2017 23:24:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.297 X-Spam-Level: X-Spam-Status: No, score=-0.297 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id fx4Ga0ROolGO for ; Mon, 8 May 2017 23:24:41 +0000 (UTC) Received: from mail-wr0-f173.google.com (mail-wr0-f173.google.com [209.85.128.173]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 494C55F477 for ; Mon, 8 May 2017 23:24:41 +0000 (UTC) Received: by mail-wr0-f173.google.com with SMTP id w50so56448129wrc.0 for ; Mon, 08 May 2017 16:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BD3tP3NWFOkR8tnqs4QXHJ7Nl8CZDhtGP6FNd9+H2tU=; b=hNqGB9bennHIG/0MFXkTYsGsEkxXKac0R0+oIGPVHcsvRz7FrVeCYVRQACIIL6uLcN e7ObVqKqbpH4kNCJmZ10RDQk+8mwg05hUwjnV42a9oHsiH7S1lDb+4lGYeI80cDYYL8/ stX8kAnpkg/zVzpqyca+habh7KBrS8dZ4Hf7SAxhoX6URQLBcGAdy46OEjLZ7fDcWQq3 4xRPNm1w3V+6W7w2nLoT+k2+LPJoFvK1ZNiyub/oiCKZK3kXRSn6fMdG/hrIUuL43B+2 DHINOR0V86IU6PyXfgLaQF0YIiGSu7KuojsmAjMCQanPRj0Mz5h2HicXGMeCLrwxR8JH Yw9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BD3tP3NWFOkR8tnqs4QXHJ7Nl8CZDhtGP6FNd9+H2tU=; b=GHyeHXi5Y5snGfxneInJxzpPJqcdpIiqITsswgYh5jxd+evYqTP6vAdTPQowLLFD42 WF/JZuDMh81/UmiILsso5CKGpYxYfze2VerpPNXmxxG/Ufodyx2YTmV98mga83wV+CCQ Y83eQg+Jz8CXPQ3LDCUNzCHxrObg9QpWI1ficrZs6nMrNySdhVKGKvLkWQU2vw+Y3RY2 dQZSL5+8kDBdNgdcA0sSh2GokrTNRAhhEBGQG9B33JvOJW1wsOqhH/iuh/e+xgPQHDUt wqntHgThLdC4sA/Bl3xOKFM6yfMyRlO0BNHhfGPdOMEfMm0nfkDXo6Ur2zpWq1mGolGq sk+w== X-Gm-Message-State: AODbwcB2JHkkCOSAIlrdAb45FvniOqnwkWzsXJs3/K4GwfBCazCK7UHC vaEeZ4um3PbxfY3mNIUrakMw7hpGe169 X-Received: by 10.46.77.66 with SMTP id a63mr7172497ljb.52.1494285880156; Mon, 08 May 2017 16:24:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.219.76 with HTTP; Mon, 8 May 2017 16:24:19 -0700 (PDT) In-Reply-To: References: <201705061516.v46FGUCT009148@ip-10-146-233-104.ec2.internal> From: Dimitris Tsirogiannis Date: Mon, 8 May 2017 16:24:19 -0700 Message-ID: Subject: Re: [Impala-ASF-CR] IMPALA-4166: Add SORT BY sql clause To: Lars Volker Cc: Marcel Kornacker , impala-cr , reviews@impala.incubator.apache.org, Thomas Tauber-Marshall , Alex Behm Content-Type: multipart/alternative; boundary=94eb2c1abcee147d84054f0b8b84 archived-at: Mon, 08 May 2017 23:24:46 -0000 --94eb2c1abcee147d84054f0b8b84 Content-Type: text/plain; charset=UTF-8 The other alternative would be to populate it with the partitioning columns, if any. Thoughts? Dimitris On Mon, May 8, 2017 at 4:02 PM, Lars Volker wrote: > > On Mon, May 8, 2017 at 11:41 PM, Marcel Kornacker > wrote: > >> >> >> On Mon, May 8, 2017 at 9:50 AM, Dimitris Tsirogiannis < >> dtsirogiannis@cloudera.com> wrote: >> >>> I believe it sends the wrong message and is probably confusing to throw >>> an error when someone writes a CREATE TABLE with an empty SORT BY() but >>> allow the same clause in an ALTER. No doubt the users can read the >>> documentation and figure it out but its an extra step. Also, as Marcel >>> mentions, scripting may be easier as you don't have to figure out whether >>> to add a clause or not. Anyways, the patch is great as is, I just wanted to >>> mention this. >>> >> >> Sounds like we should allow an empty list then. >> > > I will change the parser accordingly. On a related note, ALTER TABLE SORT > BY () will leave an empty property 'sort.by.columns'. Should it remove the > property altogether instead? > >> >> >>> >>> >>> Dimitris >>> >>> On Mon, May 8, 2017 at 7:50 AM, Marcel Kornacker >>> wrote: >>> >>>> >>>> >>>> On Sat, May 6, 2017 at 7:57 PM, Dimitris Tsirogiannis < >>>> dtsirogiannis@cloudera.com> wrote: >>>> >>>>> For consistency, I believe we should at least allow an empty SORT BY() >>>>> clause in the CREATE TABLE statement, but I'll defer the decision to Alex >>>>> or Marcel. >>>>> >>>> >>>> Do we think there'll be scripts generating create table statements with >>>> empty sort-by clauses? I'm not sure there's a benefit to supporting that >>>> (but happy to stand corrected). >>>> >>>> >>>>> >>>>> Dimitris >>>>> >>>>> On Sat, May 6, 2017 at 8:16 AM, Lars Volker (Code Review) < >>>>> gerrit@cloudera.org> wrote: >>>>> >>>>>> Lars Volker has posted comments on this change. >>>>>> >>>>>> Change subject: IMPALA-4166: Add SORT BY sql clause >>>>>> ............................................................ >>>>>> .......... >>>>>> >>>>>> >>>>>> Patch Set 20: >>>>>> >>>>>> > There is still one thing that is not clear to me. Why is it allowed >>>>>> > to do an ALTER TABLE with an empty SORT BY clause but not a CREATE >>>>>> > TABLE? >>>>>> >>>>>> The easiest way to specify an empty list of sort by columns during >>>>>> CREATE TABLE is to omit the SORT BY clause altogether. To keep things >>>>>> simple I did not add additional support for an empty SORT BY () clause. >>>>>> >>>>>> For ALTER TABLE there needs to be a way to specify an empty list of >>>>>> columns, but since SORT BY is used to identify the command, the most simple >>>>>> form seemed to be an empty column list(). >>>>>> >>>>>> Do you think we should allow CREATE TABLE SORT BY() in addition to >>>>>> specify an empty set of column? >>>>>> >>>>>> -- >>>>>> To view, visit http://gerrit.cloudera.org:8080/6495 >>>>>> To unsubscribe, visit http://gerrit.cloudera.org:8080/settings >>>>>> >>>>>> Gerrit-MessageType: comment >>>>>> Gerrit-Change-Id: I08834f38a941786ab45a4381c2732d929a934f75 >>>>>> Gerrit-PatchSet: 20 >>>>>> Gerrit-Project: Impala-ASF >>>>>> Gerrit-Branch: master >>>>>> Gerrit-Owner: Lars Volker >>>>>> Gerrit-Reviewer: Alex Behm >>>>>> Gerrit-Reviewer: Dimitris Tsirogiannis >>>>>> Gerrit-Reviewer: Lars Volker >>>>>> Gerrit-Reviewer: Marcel Kornacker >>>>>> Gerrit-Reviewer: Thomas Tauber-Marshall >>>>>> Gerrit-HasComments: No >>>>>> >>>>> >>>>> >>>> >>> >> > --94eb2c1abcee147d84054f0b8b84--