Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita0a546f

Browse files
committed
Tweak "line" test to avoid negative zeros on some platforms
1 parent5e1e47c commita0a546f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/test/regress/expected/line.out

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
--DROP TABLE LINE_TBL;
66
CREATE TABLE LINE_TBL (s line);
77
INSERT INTO LINE_TBL VALUES ('{1,-1,1}');
8-
INSERT INTO LINE_TBL VALUES ('(0,0),(6,6)');
8+
INSERT INTO LINE_TBL VALUES ('(0,0.1),(6,6)');
99
INSERT INTO LINE_TBL VALUES ('10,-10 ,-5,-4');
1010
INSERT INTO LINE_TBL VALUES ('[-1e6,2e2,3e5, -4e1]');
1111
INSERT INTO LINE_TBL VALUES ('(11,22,33,44)');
@@ -42,7 +42,7 @@ select * from LINE_TBL;
4242
s
4343
---------------------------------------------
4444
{1,-1,1}
45-
{1,-1,0}
45+
{0.983333333333333,-1,0.1}
4646
{-0.4,-1,-6}
4747
{-0.000184615384615385,-1,15.3846153846154}
4848
{1,-1,11}
@@ -55,7 +55,7 @@ SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10;
5555
s
5656
---------------------------------------------
5757
{1,-1,1}
58-
{1,-1,0}
58+
{0.983333333333333,-1,0.1}
5959
{-0.4,-1,-6}
6060
{-0.000184615384615385,-1,15.3846153846154}
6161
{1,-1,11}
@@ -64,17 +64,17 @@ SELECT * FROM LINE_TBL WHERE (s <-> line '[(1,2),(3,4)]') < 10;
6464
(7 rows)
6565

6666
SELECT * FROM LINE_TBL WHERE (point '(0.1,0.1)' <-> s) < 1;
67-
s
68-
----------
67+
s
68+
----------------------------
6969
{1,-1,1}
70-
{1,-1,0}
70+
{0.983333333333333,-1,0.1}
7171
(2 rows)
7272

7373
SELECT * FROM LINE_TBL WHERE (lseg '[(0.1,0.1),(0.2,0.2)]' <-> s) < 1;
74-
s
75-
----------
74+
s
75+
----------------------------
7676
{1,-1,1}
77-
{1,-1,0}
77+
{0.983333333333333,-1,0.1}
7878
(2 rows)
7979

8080
SELECT line '[(1,1),(2,1)]' <-> line '[(-1,-1),(-2,-1)]';

‎src/test/regress/sql/line.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
CREATETABLELINE_TBL (sline);
88

99
INSERT INTO LINE_TBLVALUES ('{1,-1,1}');
10-
INSERT INTO LINE_TBLVALUES ('(0,0),(6,6)');
10+
INSERT INTO LINE_TBLVALUES ('(0,0.1),(6,6)');
1111
INSERT INTO LINE_TBLVALUES ('10,-10 ,-5,-4');
1212
INSERT INTO LINE_TBLVALUES ('[-1e6,2e2,3e5, -4e1]');
1313
INSERT INTO LINE_TBLVALUES ('(11,22,33,44)');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp