From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id B8D096EC61; Tue, 25 May 2021 12:01:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B8D096EC61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1621933295; bh=FGy50ZROrVZnwf6EN8gwW4KUdAiTo7K3xyGSfzr0qpk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tx4HkLJyXvBQlUE7o3R96Q2GXW9EW6I7c2r+Q5Z9vFKsDjxR3dT+5G2ah6EKj9ur6 svpPb/pcBeqbwO5D7Y0iG9Kz/4BmmNDyH5HFdnTofLzyydRnFmMPChTUePrRcW71rc IIDHor+AC8baL065KkAH9p+GmU2DS7gLHhXbJ1+U= 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 dev.tarantool.org (Postfix) with ESMTPS id C3D1A6EC58 for ; Tue, 25 May 2021 12:01:34 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C3D1A6EC58 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1llSwP-0005YC-Mk; Tue, 25 May 2021 12:01:34 +0300 To: tarantool-patches@dev.tarantool.org, imeevma@tarantool.org Date: Tue, 25 May 2021 12:00:59 +0300 Message-Id: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91B019B01C53E51AFA94C0B24B2C939D4C80F0683D6F6F7C600894C459B0CD1B9EFCE169CB3AF2F3300687EACEEB8B6D586E560675804A5CA3FE2B8E3424E27AE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71BDE6A359BD5B800EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D0C488966F20D4908638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D83AD702E9193CCC014AC91DB387E6E6AA117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC55B19328CBC4F849A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18618001F51B5FD3F9D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE38D4DC57D478E68881C726BC2B329815D8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3893991AD1F2BFC6A6136E347CC761E07C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F790063764BD0C886786234BEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24209795067102C07E8F7B195E1C978314B2132A5FE2FB318D5B09C2752DC36E1 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CDFB9373DB28FDDFB79074562CE57C7A01D0D9EE6FA2085279C2B6934AE262D3EE7EAB7254005DCED1B9476D48FD672EE1E0A4E2319210D9B64D260DF9561598F01A9E91200F654B02DA3D96DA0CEF5C48E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D348D68DCC07DD06FF53F9668E3786601A12788B3068520A7A67A1268CCA33B40D0DA523D4AACB414811D7E09C32AA3244CEDFBC9A4CCA863AA3F361533C35EA3EC259227199D06760AFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXiFlDFT/xDPqkIrHYEq54CI X-Mailru-Sender: B5B6A6EBBD94DAD8C2E767F6285855A0A4F9ACC5BFDFD37D465538F9CE1ED613A39478410A1298495C2808D6142752370A8ED71B308007E3DC85537438B7E1A423D748DE48713E689437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [Tarantool-patches] [PATCH 0/3] sql: modify explicit conversion tables X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Timur Safin via Tarantool-patches Reply-To: Timur Safin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Recent RFC "Consistent Lua/SQL types" (#6009) defined ideal explicit and implicit conversion tables we would like to have for all current and future Taranool SQL types. This patchset modifies explict conversion tables, and implicit conversion table to come soon. The ideal picture would be as below: | 0 | 1 | 2 | 4 | 5 | 6 | 7 | 3 | 9 |10 |11 |12 | 8 | +---+---+---+---+---+---+---+---+---+---+---+---+---+ 0. any | | | | | | | | | | | | | | 1. unsigned | | Y | Y | Y | Y | | | Y | | | | | Y | 2. string | | S | Y | S | S | S | Y | S | | | | | Y | 4. double | | S | Y | Y | S | | | Y | | | | | Y | 5. integer | | S | Y | Y | Y | | | Y | | | | | Y | 6. boolean | | | Y | | | Y | | | | | | | Y | 7. varbinary | | | Y | | | | Y | | | | | | Y | 3. number | | S | Y | Y | S | | | Y | | | | | Y | 9. decimal | | | | | | | | | | | | | | 10. uuid | | | | | | | | | | | | | | 11. array | | | | | | | | | | | | | | 12. map | | | | | | | | | | | | | | 8. scalar | | S | Y | S | S | S | S | S | | | | | Y | +---+---+---+---+---+---+---+---+---+---+---+---+---+ Please pay attention that we omit DECIMAL, UUID, SCALAR and MAP rows and columns, as they not yet fully supported by Tarantool SQL. Once their support will be landed we will modify conversion table and tests (which we also introducing with current patchset). Timur Safin (3): sql: fixes for boolean expressions in explicit converstion tables sql: enabled ANY as target for explicit conversions sql: introduced explicit casts test e_casts.test.lua extra/mkkeywordhash.c | 3 +- src/box/sql/mem.c | 39 +--- src/box/sql/parse.y | 3 +- test/sql-tap/cse.test.lua | 12 +- test/sql-tap/e_casts.test.lua | 355 ++++++++++++++++++++++++++++++++ test/sql-tap/e_select1.test.lua | 2 +- test/sql-tap/in1.test.lua | 16 +- test/sql-tap/keyword1.test.lua | 2 +- test/sql-tap/misc3.test.lua | 2 +- test/sql/boolean.result | 38 +--- test/sql/types.result | 14 +- 11 files changed, 390 insertions(+), 96 deletions(-) create mode 100755 test/sql-tap/e_casts.test.lua -- 2.29.2