From: Kirill Yukhin <kyukhin@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org,
Kirill Shcherbatov <kshcherbatov@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v2 1/1] sql: support HAVING without GROUP BY clause
Date: Sat, 29 Dec 2018 17:58:51 +0300 [thread overview]
Message-ID: <20181229145851.3ushmcqrbwhz5kkr@tarantool.org> (raw)
In-Reply-To: <bd050d940bcea8202a5357de15a2fb76950b56ba.1543501922.git.kshcherbatov@tarantool.org>
Hello,
On 29 Nov 17:33, Kirill Shcherbatov wrote:
> Branch: http://github.com/tarantool/tarantool/tree/kshsh/gh-2364-having-without-groupby
> Issue: https://github.com/tarantool/tarantool/issues/2364
>
> Allowed to make SELECT requests that have HAVING clause without
> GROUP BY. It is possible when both - left and right parts of
> request have aggregate function or constant value.
>
> Closes #2364.
>
> @TarantoolBot document
> Title: HAVING without GROUP BY clause
> A query with a having clause should also have a group by clause.
> If you omit group by, all the rows not excluded by the where
> clause return as a single group.
> Because no grouping is performed between the where and having
> clauses, they cannot act independently of each other. Having
> acts like where because it affects the rows in a single group
> rather than groups, except the having clause can still use
> aggregates.
> Having without group by is not supported for select from
> multiple tables.
> ---
> src/box/sql/resolve.c | 97 +++++++++++++++++++++++---
> src/box/sql/sqliteInt.h | 3 +-
> test/sql-tap/count.test.lua | 8 +--
> test/sql-tap/select3.test.lua | 2 +-
> test/sql-tap/select5.test.lua | 128 +++++++++++++++++++++++++++++++++-
> 5 files changed, 223 insertions(+), 15 deletions(-)
I've checked your patch into 2.1 branch.
--
Regards, Kirill Yukhin
prev parent reply other threads:[~2018-12-29 14:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 14:33 [tarantool-patches] " Kirill Shcherbatov
2018-11-30 17:22 ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-30 17:32 ` Kirill Shcherbatov
2018-12-03 20:45 ` Vladislav Shpilevoy
[not found] ` <a5ca7201-7b45-3b97-ddb9-93216a4682a2@tarantool.org>
2018-12-10 14:23 ` Vladislav Shpilevoy
[not found] ` <61be199c-a233-aac3-18ee-fa64c908126d@tarantool.org>
2018-12-25 12:59 ` Kirill Shcherbatov
2018-12-28 14:39 ` n.pettik
2018-12-26 11:19 ` Vladislav Shpilevoy
2018-12-29 14:58 ` Kirill Yukhin [this message]
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=20181229145851.3ushmcqrbwhz5kkr@tarantool.org \
--to=kyukhin@tarantool.org \
--cc=kshcherbatov@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='[tarantool-patches] Re: [PATCH v2 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