From 96e12e9ee5cb1ca783d93a0a56a00b587b4e347f Mon Sep 17 00:00:00 2001 From: Zhenchi Date: Mon, 4 Dec 2023 23:29:02 +0800 Subject: [PATCH] fix: correct the previously unsuccessful decimal_ops sort result fix (#2869) Signed-off-by: Zhenchi --- .../standalone/common/types/decimal/decimal_ops.result | 8 ++++---- .../cases/standalone/common/types/decimal/decimal_ops.sql | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/cases/standalone/common/types/decimal/decimal_ops.result b/tests/cases/standalone/common/types/decimal/decimal_ops.result index 967d7545db67..3081f3811c24 100644 --- a/tests/cases/standalone/common/types/decimal/decimal_ops.result +++ b/tests/cases/standalone/common/types/decimal/decimal_ops.result @@ -7,7 +7,7 @@ INSERT INTO decimals VALUES ('0.1',1000), ('0.2',2000); Affected Rows: 2 --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM decimals; +------+---------------------+ @@ -37,7 +37,7 @@ SELECT * FROM decimals WHERE d = '0.1'::DECIMAL(3,2); +------+---------------------+ -- greater than equals --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM decimals WHERE d >= '0.1'::DECIMAL(3,2); +------+---------------------+ @@ -409,7 +409,7 @@ INSERT INTO tmp_table VALUES (1, 1000), (2, 2000), (3, 3000); Affected Rows: 3 --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM tmp_table; +---+---------------------+ @@ -420,7 +420,7 @@ SELECT * FROM tmp_table; | 3 | 1970-01-01T00:00:03 | +---+---------------------+ --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM tmp_table JOIN decimals ON decimals.ts = tmp_table.ts; +---+---------------------+------+---------------------+ diff --git a/tests/cases/standalone/common/types/decimal/decimal_ops.sql b/tests/cases/standalone/common/types/decimal/decimal_ops.sql index e59a3cefcd80..8682aa18ff7d 100644 --- a/tests/cases/standalone/common/types/decimal/decimal_ops.sql +++ b/tests/cases/standalone/common/types/decimal/decimal_ops.sql @@ -4,7 +4,7 @@ CREATE TABLE decimals(d DECIMAL(3, 2), ts timestamp time index); INSERT INTO decimals VALUES ('0.1',1000), ('0.2',2000); --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM decimals; -- ORDER BY @@ -17,7 +17,7 @@ SELECT * FROM decimals WHERE d = '0.1'::DECIMAL(3,2); -- greater than equals --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM decimals WHERE d >= '0.1'::DECIMAL(3,2); -- what about if we use different decimal scales? @@ -196,10 +196,10 @@ CREATE TABLE tmp_table(i INTEGER, ts timestamp time index); INSERT INTO tmp_table VALUES (1, 1000), (2, 2000), (3, 3000); --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM tmp_table; --- SQLNESS SORT 3 1 +-- SQLNESS SORT_RESULT 3 1 SELECT * FROM tmp_table JOIN decimals ON decimals.ts = tmp_table.ts; DROP TABLE decimals;