Skip to content

Commit a45272b

Browse files
committed
Extend the geometric regression test cases a little.
Add another edge-case value to "point_tbl", and add a test for the line(point, point) function. Some of the behaviors exposed here are wrong, but the idea of committing this separately is to memorialize what we were getting, and to allow easier inspection of the behavior changes caused by upcoming patches. Kyotaro Horiguchi (line() test added by me) Discussion: https://postgr.es/m/CAGf+fX70rWFOk5cd00uMfa__0yP+vtQg5ck7c2Onb-Yczp0URA@mail.gmail.com
1 parent 878f3a1 commit a45272b

File tree

5 files changed

+453
-83
lines changed

5 files changed

+453
-83
lines changed

src/test/regress/expected/create_index.out

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 << '(0.0, 0.0)';
157157
SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
158158
count
159159
-------
160-
3
160+
4
161161
(1 row)
162162

163163
SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
@@ -169,7 +169,7 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 <^ '(0.0, 0.0)';
169169
SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
170170
count
171171
-------
172-
4
172+
5
173173
(1 row)
174174

175175
SELECT count(*) FROM point_tbl p WHERE p.f1 ~= '(-5, -12)';
@@ -188,10 +188,11 @@ SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
188188
(10,10)
189189
(-5,-12)
190190
(5.1,34.5)
191+
(Infinity,1e+300)
191192
(1e+300,Infinity)
192193
(NaN,NaN)
193194

194-
(10 rows)
195+
(11 rows)
195196

196197
SELECT * FROM point_tbl WHERE f1 IS NULL;
197198
f1
@@ -202,16 +203,17 @@ SELECT * FROM point_tbl WHERE f1 IS NULL;
202203
SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
203204
f1
204205
-------------------
205-
(1e-300,-1e-300)
206206
(0,0)
207+
(1e-300,-1e-300)
207208
(-3,4)
208209
(-10,0)
209210
(10,10)
210211
(-5,-12)
211212
(5.1,34.5)
212213
(1e+300,Infinity)
214+
(Infinity,1e+300)
213215
(NaN,NaN)
214-
(9 rows)
216+
(10 rows)
215217

216218
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';
217219
f1
@@ -464,7 +466,7 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
464466
SELECT count(*) FROM point_tbl p WHERE p.f1 >> '(0.0, 0.0)';
465467
count
466468
-------
467-
3
469+
4
468470
(1 row)
469471

470472
EXPLAIN (COSTS OFF)
@@ -494,7 +496,7 @@ SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
494496
SELECT count(*) FROM point_tbl p WHERE p.f1 >^ '(0.0, 0.0)';
495497
count
496498
-------
497-
4
499+
5
498500
(1 row)
499501

500502
EXPLAIN (COSTS OFF)
@@ -530,10 +532,11 @@ SELECT * FROM point_tbl ORDER BY f1 <-> '0,1';
530532
(10,10)
531533
(-5,-12)
532534
(5.1,34.5)
535+
(Infinity,1e+300)
533536
(1e+300,Infinity)
534537
(NaN,NaN)
535538

536-
(10 rows)
539+
(11 rows)
537540

538541
EXPLAIN (COSTS OFF)
539542
SELECT * FROM point_tbl WHERE f1 IS NULL;
@@ -568,9 +571,10 @@ SELECT * FROM point_tbl WHERE f1 IS NOT NULL ORDER BY f1 <-> '0,1';
568571
(10,10)
569572
(-5,-12)
570573
(5.1,34.5)
574+
(Infinity,1e+300)
571575
(1e+300,Infinity)
572576
(NaN,NaN)
573-
(9 rows)
577+
(10 rows)
574578

575579
EXPLAIN (COSTS OFF)
576580
SELECT * FROM point_tbl WHERE f1 <@ '(-10,-10),(10,10)':: box ORDER BY f1 <-> '0,1';

0 commit comments

Comments
 (0)