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 8F89926F07 for ; Wed, 14 Aug 2019 03:25:43 -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 Cmkpo56AqKKe for ; Wed, 14 Aug 2019 03:25:43 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 4DC9026EF7 for ; Wed, 14 Aug 2019 03:25:43 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 4/8] sql: get rid of SQL_FUNC_COUNT flag References: <2f18c9df1d818a222f2fb3005d13bd59228d4698.1565275469.git.kshcherbatov@tarantool.org> From: Kirill Shcherbatov Message-ID: Date: Wed, 14 Aug 2019 10:25:41 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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: "n.pettik" , Tarantool MailList >> A helper routine is_simple_count decides whether such >> optimisation is correct. Using SQL_FUNC_COUNT flag to mark a >> dummy (non-functional) > > Why do you consider it to be non-functional? > >> function entry with 0 arguments is a bad practice > > Why? Please, support this with arguments. Because the hastable entry define a function that **NEVER** called. It relies on arguments overloading and it is strange. > Hm, this code works just by accident :) There’s no check > that function is really COUNT, but we are lucky enough > and there’s no other aggregate function which can take > empty list of arguments... Maybe because the helper function's name is "is_simple_count"? =)