From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 543982A7A3 for ; Wed, 29 Aug 2018 07:52:35 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z2DMyUocxrT9 for ; Wed, 29 Aug 2018 07:52:35 -0400 (EDT) Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id F3CF92A78D for ; Wed, 29 Aug 2018 07:52:34 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: support HAVING without GROUP BY clause From: "n.pettik" In-Reply-To: Date: Wed, 29 Aug 2018 14:52:32 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <16D5B1D2-2DBF-4BAE-9C5D-F23CCCE3723D@tarantool.org> References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Kirill Shcherbatov To be honest, personally I don=E2=80=99t like this idea. IMHO this = tickets should be simply closed (as it was before =E2=80=98wontfix=E2=80=99). = Also, I see that your implementation differs from other DBs: Postgres, Oracle, DB2: drop table if exists t1 \\ create table t1(id int primary key, a int, b int) \\ insert into t1 values(1,2,3), (4,5,6), (7,8,9) \\ SELECT SUM(a) FROM t1 HAVING SUM(a) > 0 \\ 1 PostgreSQL 9.6.2, compiled by Visual C++ build 1800, 64-bit sum 1 15 Your version: tarantool> \set language sql --- - true ... tarantool> create table t1(id int primary key, a int, b int) --- ... tarantool> insert into t1 values(1,2,3), (4,5,6), (7,8,9) --- ... tarantool> SELECT SUM(a) FROM t1 HAVING SUM(a) > 0 --- - - [2] - [5] - [8] =E2=80=A6 Please, make it behave the same way as other DBs and resend patch. > To allow user do not specify GROUP BY directly we build it > manually using table primary index. >=20 > Closes 2364. Closes #2364