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 D4E172E6C3 for ; Sat, 25 May 2019 01:51:44 -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 9MN2MaZYxLaB for ; Sat, 25 May 2019 01:51:44 -0400 (EDT) Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 2B6E32E6BA for ; Sat, 25 May 2019 01:51:43 -0400 (EDT) Date: Sat, 25 May 2019 08:51:40 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 3/3] sql: fix passing FP values to integer iterator Message-ID: <20190525055140.GA14501@atlas> References: <789091b7acd99c908d26689f27c55f8b6dba3d16.1558700151.git.korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <789091b7acd99c908d26689f27c55f8b6dba3d16.1558700151.git.korablev@tarantool.org> 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 Cc: Nikita Pettik * Nikita Pettik [19/05/24 20:42]: > That happened due to the fact that type casting mechanism (OP_ApplyType) > doesn't affect FP value when it is converted to integer. Hence, FP value > was passed to the iterator over integer field which resulted in error. > Meanwhile, comparison of integer and FP values is legal in SQL. To cope > with this problem for each equality comparison involving integer field > we emit OP_MustBeInt, which checks whether value to be compared is > integer or not. If the latter, we assume that result of comparison is > always false and continue processing query. Are you sure other vendords would fail to return any results for WHERE foo = 1.0? -- Konstantin Osipov, Moscow, Russia