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 2E86724F77 for ; Fri, 18 May 2018 17:37:34 -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 er4zCVHVLx1k for ; Fri, 18 May 2018 17:37:34 -0400 (EDT) Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (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 CBBAA24ED4 for ; Fri, 18 May 2018 17:37:33 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 1/1] sql: IS is only applicable when dealing with NULL References: <1526642787.218420559@f261.i.mail.ru> <10ce4eb3-e380-3007-8811-78d6f4517e1b@tarantool.org> <1526659840.883327245@f345.i.mail.ru> From: Vladislav Shpilevoy Message-ID: Date: Sat, 19 May 2018 00:37:31 +0300 MIME-Version: 1.0 In-Reply-To: <1526659840.883327245@f345.i.mail.ru> Content-Type: text/plain; charset="utf-8"; format="flowed" 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: tarantool-patches@freelists.org, =?UTF-8?B?0JzQtdGA0LPQtdC9INCY0LzQtdC1?= =?UTF-8?B?0LI=?= Hello. Thanks for the fixes! You did a huge work fixing the tests! > > > > -%include { > > -  /* A routine to convert a binary TK_IS or TK_ISNOT expression into a > > -  ** unary TK_ISNULL or TK_NOTNULL expression. */ > > 3. I still can grep ISNULL token. NOTNULL too. They must be removed completely, but > very accurately. For example, TK_NULL, TK_ISNULL, TK_NOTNULL are not tokens, they > are identifiers for 'NULL', 'IS NULL', and 'IS NOT NULL'. But strings 'ISNULL' and > 'NOTNULL' must be removed. For example, look extra/mkkeywordhash.c:196. Here all the > tokens are stored and their identifiers, so "NOTNULL" is reflected into TK_NOTNULL. > We must remove "NOTNULL". Same in parse.y:137, 213. > > In treeview.c:475 NOTNULL must be replaced with "NOT NULL". Same in vdbeaux.c:1508. > > Same about ISNULL. > > Partially done. Ones in parse.y used to generate identifiers to operations 'IS NULL' and 'IS NOT NULL' I see, but they now are unused by parser. Please, remove them. The parser uses not "NOTNULL" or "ISNULL" - it uses TK_ISNULL and TK_NOTNULL. Look at addopcodes.sh how to add TK_... constants with no adding them to parser. In the final patch you must not be able to grep "ISNULL" or "NOTNULL" strings anywhere. By removal of these parser-unused things you will make the parser slightly faster. The rest of the patch is ok.