[tarantool-patches] Re: [PATCH v1 1/1] sql: support HAVING without GROUP BY clause
n.pettik
korablev at tarantool.org
Wed Aug 29 14:52:32 MSK 2018
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
More information about the Tarantool-patches
mailing list