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 BFC2F6EC40; Fri, 13 Aug 2021 06:12:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BFC2F6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628824374; bh=+Ww41kLO85rHMjm30TCiXyKU/ej4EO1NGeKTdWYLBLc=; h=To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=V3wqv65sxq0S7RIFTTDaFl7mjbVjTZ2tZEQxxvDXdIHjapHi8Ej9VWGkuSC1qQHQ6 wUnIjIE0bVN80TfCLaJb5KsdQVPdZJEHls3iuMMc5o3fovtDqFtKHZ4mSaaf/fScN5 4tRMt+QXD9sZVqUi5WtNpLglqLJ/4epAdaSh35p8= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 614696EC40 for ; Fri, 13 Aug 2021 06:12:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 614696EC40 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mENcq-0000Uu-Cg; Fri, 13 Aug 2021 06:12:52 +0300 To: vdavydov@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Fri, 13 Aug 2021 06:12:52 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD9BCE6B93DE0C6C3914462CDB1732D383C182A05F538085040C174A18CEC14639687984A3D1AAAB52C63D11CFC754899869F80585CED6A7C2B X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72847AA60176ABEF3EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063750DEB490C003C9A78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8D9E29ABC43CEFF571B19E3AC8FF67937117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18C26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B66F6A3E018CF4DC80089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C69415AB31670C86CAEB0519FF8539FF9D9E871F11CE934F89C2B6934AE262D3EE7EAB7254005DCEDF412240F52665EC71E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0E6E19F5B27DD8FB88E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D4E96E2A5B1100E06EC09C531DCEFD94F6D1F659C02FC36B9252F7D32440A1260AB2C3BBFF7110B81D7E09C32AA3244C4C5C3CA4B37FB972F571E6461AD77BED7C0C08F7987826B9729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj0dLV0c3jbkxL4Ys0b809mA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D3A6378914A3E7BF1F0DCB8FFE1C3CDF383D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v1 0/7] Rework SCALAR and NUMBER types in SQL 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: Mergen Imeev via Tarantool-patches Reply-To: imeevma@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This patch reworks SCALAR and NUMBER types. Afther these patches SCANAR and NUMBER values will follow newly defined rules. However, only one SQL built-in function is actually changed in this patch. All other functions that should be changed will be reworked in issue #6105. https://github.com/tarantool/tarantool/issues/6221 https://github.com/tarantool/tarantool/tree/imeevma/gh-6221-introduce-mem-type-number Mergen Imeev (7): sql: remove enum field_type from struct Mem sql: re-introduce NUMBER and SCALAR meta-types sql: disallow implicit cast from NUMBER and SCALAR sql: disallow arithmetic for NUMBER and SCALAR sql: disallow bitwise for NUMBER and SCALAR sql: disallow concatination for SCALAR sql: fix comparison with SCALAR value .../gh-5956-remove-field-types-from-mem.md | 3 + ...21-re-introduce-scalar-and-number-types.md | 8 + src/box/sql/func.c | 19 +- src/box/sql/mem.c | 388 ++++++++---------- src/box/sql/mem.h | 17 +- src/box/sql/vdbe.c | 35 +- src/box/sql/vdbeInt.h | 3 - src/box/sql/vdbesort.c | 6 - test/sql-tap/cast.test.lua | 26 +- test/sql-tap/colname.test.lua | 4 +- test/sql-tap/e_select1.test.lua | 6 +- test/sql-tap/engine.cfg | 3 + test/sql-tap/func.test.lua | 12 +- test/sql-tap/func5.test.lua | 75 +++- .../gh-5335-wrong-int-to-double-cast.test.lua | 40 -- ...-5756-implicit-cast-in-arithmetic.test.lua | 32 +- test/sql-tap/in4.test.lua | 2 +- test/sql-tap/metatypes.test.lua | 187 +++++++++ test/sql-tap/minmax2.test.lua | 2 +- test/sql-tap/numcast.test.lua | 58 +-- test/sql-tap/select7.test.lua | 8 +- test/sql-tap/sort.test.lua | 14 +- test/sql-tap/sql-errors.test.lua | 8 +- test/sql-tap/table.test.lua | 4 +- test/sql-tap/tkt-7bbfb7d442.test.lua | 4 +- test/sql-tap/tkt-91e2e8ba6f.test.lua | 96 ----- test/sql-tap/tkt-a8a0d2996a.test.lua | 18 +- test/sql-tap/trigger9.test.lua | 2 +- test/sql-tap/uuid.test.lua | 12 +- test/sql-tap/view.test.lua | 4 +- test/sql/boolean.result | 368 +++++++++-------- test/sql/boolean.test.sql | 4 +- test/sql/gh-4697-scalar-bool-sort-cmp.result | 16 +- test/sql/prepared.result | 2 +- test/sql/prepared.test.lua | 2 +- test/sql/types.result | 19 +- 36 files changed, 761 insertions(+), 746 deletions(-) create mode 100644 changelogs/unreleased/gh-5956-remove-field-types-from-mem.md create mode 100644 changelogs/unreleased/gh-6221-re-introduce-scalar-and-number-types.md delete mode 100755 test/sql-tap/gh-5335-wrong-int-to-double-cast.test.lua create mode 100755 test/sql-tap/metatypes.test.lua delete mode 100755 test/sql-tap/tkt-91e2e8ba6f.test.lua -- 2.25.1