From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0EA674696C3 for ; Fri, 17 Apr 2020 14:51:37 +0300 (MSK) From: "Timur Safin" References: <20200413041105.22576-1-roman.habibov@tarantool.org> <20200415194149.GA454@tarantool.org> <43EE02FF-1F00-4FBE-AC41-C8C58B390003@tarantool.org> <20200416081731.GA16144@tarantool.org> <6CC4ABB2-D49D-4721-B913-B999D70844FB@tarantool.org> <20200417063512.GA10928@tarantool.org> <1c1301d61489$a1af1790$e50d46b0$@tarantool.org> <8A7E5353-3471-4B54-91F7-F35AB4A4B039@tarantool.org> In-Reply-To: <8A7E5353-3471-4B54-91F7-F35AB4A4B039@tarantool.org> Date: Fri, 17 Apr 2020 14:51:36 +0300 Message-ID: <1e3201d614ae$8cc16d40$a64447c0$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: ru Subject: Re: [Tarantool-patches] [PATCH] sql: fix number and boolean sorting rules List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Roman Khabibov' Cc: tarantool-patches@dev.tarantool.org : -----Original Message----- : From: Roman Khabibov : Sent: Friday, April 17, 2020 2:25 PM : To: Timur Safin : Cc: Mergen Imeev ; tarantool- : patches@dev.tarantool.org : Subject: Re: [PATCH] sql: fix number and boolean sorting rules :=20 : Hi! Thanks for the review. :=20 : > On Apr 17, 2020, at 10:27, Timur Safin wrote: : > : > As a random bypasser I could not resist and not add my 5 kopecks = (see : below). : > : > : Fixed. :=20 : commit 386ba8676c0ebd381d9c03b2ebf80abd986de73b (HEAD -> = romanhabibov/gh- : 4697-scalar-bug, origin/romanhabibov/gh-4697-scalar-bug) : Author: Roman Khabibov : Date: Mon Apr 13 05:03:54 2020 +0300 :=20 : sql: fix sorting rules for scalar :=20 : Sort values=E2=80=8Bin the correct order for scalar type when = using the : vdbe sorter. Boolean always precedes number if it is sorted in : ascending order. :=20 : Closes #4697 :=20 : diff --git a/test/sql-tap/gh-4697-scalar-bug.test.lua = b/test/sql-tap/gh- : 4697-scalar-bug.test.lua : new file mode 100755 : index 000000000..6f600f27b : --- /dev/null : +++ b/test/sql-tap/gh-4697-scalar-bug.test.lua : @@ -0,0 +1,35 @@ : +#!/usr/bin/env tarantool : +test =3D require("sqltester") : +test:plan(2) : + : +-- : +-- gh-4679: Make sure that boolean follow before any number within : +-- scalar. Result with order by indexed (using index) and : +-- non-indexed (using no index) must be the same. : +-- Not everywhere (see the same problem above ^ in the test code) Timur P.S. That was the purpose of 'g' modifier in my sed expression :) To replace all occurrences, not only the first one.