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 E41B0200C6E for ; Mon, 8 May 2017 18:51:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E29F9160BBF; Mon, 8 May 2017 16:51:10 +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 0DE2C160BA2 for ; Mon, 8 May 2017 18:51:09 +0200 (CEST) Received: (qmail 48674 invoked by uid 500); 8 May 2017 16:51:09 -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 48662 invoked by uid 99); 8 May 2017 16:51:08 -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 16:51:08 +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 7963FC0E9B for ; Mon, 8 May 2017 16:51:08 +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-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dXKwMZq_vWT4 for ; Mon, 8 May 2017 16:51:06 +0000 (UTC) Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 577185FDB7 for ; Mon, 8 May 2017 16:51:05 +0000 (UTC) Received: by mail-wr0-f169.google.com with SMTP id z52so49598047wrc.2 for ; Mon, 08 May 2017 09:51:05 -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=cgZCXT9WoeuuXqzTuvYOk5WLnAbBTJW9Yu54CZ0Vvto=; b=FeQoWZaIaAzxltQ1jeX1QxlcaY3emg9G34sT+0o/QW5Oac/e35gwRgCmIU1fCA3jpR KnRP961LiebCOzZ7HaiaaB7w1WFQ7H3kDvBSMuLbYzGzuesll2Mequ5an3skn80a44Yf Y0Jv8xJ6uRDtl+Bw4NnJABAstOU6jYuwoOxow1XiMENZY+OVqOzRMR5UaaT/894MH4mM xmuWAH7pMCJX3+gEOA5aNV1XGgJru1NpGJ+M5dPszcn7+tisAFg07mnBnQtQyONpIjVE WfrhC7eCfsy1l8DVL5Njwt8Henk7iUarXySNimysSDfwgBChfI3J5NfLVmKBDZW/Bl8D +R7g== 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=cgZCXT9WoeuuXqzTuvYOk5WLnAbBTJW9Yu54CZ0Vvto=; b=Ws/tO1/DX8KqJqZPLNQtMahA9oZp0m/0Fmjmnqazu16fpKBb4WCigbVJ9D9fVMNgKS Pqsll3a+Sx00ppKiJLZvJeZpegcs/PO+Z0DOVFw433Skik0i20vaJmxL982uhMZJczed n7UPSPZxky2+nAkV9ZHgC3EknOK1SztXt5tUwzfT+AKoX67IB3O/pz2uvRCOgik3PDOS BgvRFml41V6meU/gmhGrUPOSXmm3UAfl7/ovjrdLkcs9DTC2YhBjXguCOtd8tumKiVXQ rtziCfH+eQAyxYYBfGcIWVLKq95HvGiUaTkL4yff1WX/D+OVwzLanQYQI1H3KtZSMzYg w6/Q== X-Gm-Message-State: AODbwcAGSn0qyK99RXCI2t3zPBdCf3FCoXOxeclydibAcBK4ZDZ91ZvX qhgvtGWSOhLJoSgRdn6Edqkhj+w70aEF X-Received: by 10.46.71.203 with SMTP id u194mr6710358lja.124.1494262259426; Mon, 08 May 2017 09:50:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.219.76 with HTTP; Mon, 8 May 2017 09:50:38 -0700 (PDT) In-Reply-To: References: <201705061516.v46FGUCT009148@ip-10-146-233-104.ec2.internal> From: Dimitris Tsirogiannis Date: Mon, 8 May 2017 09:50:38 -0700 Message-ID: Subject: Re: [Impala-ASF-CR] IMPALA-4166: Add SORT BY sql clause To: Marcel Kornacker Cc: Lars Volker , impala-cr , reviews@impala.incubator.apache.org, Thomas Tauber-Marshall , Alex Behm Content-Type: multipart/alternative; boundary=001a114118e42cce0f054f060b6b archived-at: Mon, 08 May 2017 16:51:11 -0000 --001a114118e42cce0f054f060b6b Content-Type: text/plain; charset=UTF-8 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. 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 >>> >> >> > --001a114118e42cce0f054f060b6b--