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 281DB21427 for ; Mon, 10 Dec 2018 09:23:50 -0500 (EST) 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 YcSf5JL8-H5K for ; Mon, 10 Dec 2018 09:23:50 -0500 (EST) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 D879820BFB for ; Mon, 10 Dec 2018 09:23:49 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v2 1/1] sql: support HAVING without GROUP BY clause References: <2a59a404-d305-3be3-6c11-5be0d1a06363@tarantool.org> From: Vladislav Shpilevoy Message-ID: <160c2407-aff7-9f45-44de-01298021f370@tarantool.org> Date: Mon, 10 Dec 2018 17:23:47 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Kirill Shcherbatov , tarantool-patches@freelists.org Hi! Thanks for the fixes! On 04/12/2018 13:44, Kirill Shcherbatov wrote: > Hi! Thank you for comments: >> 1. Please, add an example and a reference to a standard (I've >> found more strict description in 2011 SQL standard >> "Part 2: Foundation" on 403 page). > Appended to the end of @TarantoolBot document: > > 2011 SQL standard "Part 2: Foundation" 7.10 p.381 > Example: > SELECT MIN(s1) FROM te40 HAVING SUM(s1) > 0; -- is valid > SELECT 1 FROM te40 HAVING SUM(s1) > 0; -- is valid > SELECT NULL FROM te40 HAVING SUM(s1) > 0; -- is valid > SELECT date() FROM te40 HAVING SUM(s1) > 0; -- is valid > >> 2. Why do you need sql_expr_is_literal() and sql_expr_is_constant_func() >> if you have sqlite3ExprIsConstantOrFunction() ? > Yep, good idea; didn't know that such function already exists > On the branch I still see my commit with review fixes and your old implementation. Please, push a new version.