Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: support HAVING without GROUP BY clause
Date: Wed, 29 Aug 2018 14:52:32 +0300	[thread overview]
Message-ID: <16D5B1D2-2DBF-4BAE-9C5D-F23CCCE3723D@tarantool.org> (raw)
In-Reply-To: <c16ef9f386d7765b2decff6c26c5bd19f770ea2b.1535474346.git.kshcherbatov@tarantool.org>

To be honest, personally I don’t like this idea. IMHO this tickets
should be simply closed (as it was before ‘wontfix’). 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]
…

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.
> 
> Closes 2364.

Closes #2364

  reply	other threads:[~2018-08-29 11:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 16:39 [tarantool-patches] " Kirill Shcherbatov
2018-08-29 11:52 ` n.pettik [this message]
2018-08-29 13:29   ` [tarantool-patches] " Kirill Shcherbatov
2018-09-03 11:24     ` n.pettik
2018-09-03 13:23     ` n.pettik
2018-09-10  7:51       ` Kirill Shcherbatov
2018-09-10 21:43         ` n.pettik
2018-09-20 12:43           ` Kirill Shcherbatov
2018-10-01 16:37             ` n.pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16D5B1D2-2DBF-4BAE-9C5D-F23CCCE3723D@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1 1/1] sql: support HAVING without GROUP BY clause' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox