Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct the previously unsuccessful decimal_ops sort result fix #2869

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

+------+---------------------+
Expand Down Expand Up @@ -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);

+------+---------------------+
Expand Down Expand Up @@ -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;

+---+---------------------+
Expand All @@ -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;

+---+---------------------+------+---------------------+
Expand Down
8 changes: 4 additions & 4 deletions tests/cases/standalone/common/types/decimal/decimal_ops.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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?
Expand Down Expand Up @@ -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;
Expand Down
Loading