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

Commit36f4c78

Browse files
committed
Adjust cube.out expected output for new test queries.
Previous commit modified the test case, but I didn't update cube.outexpected output file in previous commit because it was not needed by theplatforms I have easy access to. Buildfarm animal 'dugong', running"Debian 4.0 icc 10.1.011 ia64", has now gone red because of that, so updateit now.Also adjust cube_3.out. According to git history, it was added to support64-bit MinGW. There is no such animal in the buildfarm, so I'm doing thisblindly, but it was added quite recently so maybe someone still cares.
1 parent2885881 commit36f4c78

File tree

2 files changed

+562
-0
lines changed

2 files changed

+562
-0
lines changed

‎contrib/cube/expected/cube.out

Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,85 @@ SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[3,2,1,1]);
473473
(5, 3, 1, 1),(8, 7, 6, 6)
474474
(1 row)
475475

476+
SELECT cube_subset(cube('(1,3,5),(1,3,5)'), ARRAY[3,2,1,1]);
477+
cube_subset
478+
--------------
479+
(5, 3, 1, 1)
480+
(1 row)
481+
476482
SELECT cube_subset(cube('(1,3,5),(6,7,8)'), ARRAY[4,0]);
477483
ERROR: Index out of bounds
484+
SELECT cube_subset(cube('(6,7,8),(6,7,8)'), ARRAY[4,0]);
485+
ERROR: Index out of bounds
486+
--
487+
-- Test point processing
488+
--
489+
SELECT cube('(1,2),(1,2)'); -- cube_in
490+
cube
491+
--------
492+
(1, 2)
493+
(1 row)
494+
495+
SELECT cube('{0,1,2}'::float[], '{0,1,2}'::float[]); -- cube_a_f8_f8
496+
cube
497+
-----------
498+
(0, 1, 2)
499+
(1 row)
500+
501+
SELECT cube('{5,6,7,8}'::float[]); -- cube_a_f8
502+
cube
503+
--------------
504+
(5, 6, 7, 8)
505+
(1 row)
506+
507+
SELECT cube(1.37); -- cube_f8
508+
cube
509+
--------
510+
(1.37)
511+
(1 row)
512+
513+
SELECT cube(1.37, 1.37); -- cube_f8_f8
514+
cube
515+
--------
516+
(1.37)
517+
(1 row)
518+
519+
SELECT cube(cube(1,1), 42); -- cube_c_f8
520+
cube
521+
---------
522+
(1, 42)
523+
(1 row)
524+
525+
SELECT cube(cube(1,2), 42); -- cube_c_f8
526+
cube
527+
-----------------
528+
(1, 42),(2, 42)
529+
(1 row)
530+
531+
SELECT cube(cube(1,1), 42, 42); -- cube_c_f8_f8
532+
cube
533+
---------
534+
(1, 42)
535+
(1 row)
536+
537+
SELECT cube(cube(1,1), 42, 24); -- cube_c_f8_f8
538+
cube
539+
-----------------
540+
(1, 42),(1, 24)
541+
(1 row)
542+
543+
SELECT cube(cube(1,2), 42, 42); -- cube_c_f8_f8
544+
cube
545+
-----------------
546+
(1, 42),(2, 42)
547+
(1 row)
548+
549+
SELECT cube(cube(1,2), 42, 24); -- cube_c_f8_f8
550+
cube
551+
-----------------
552+
(1, 42),(2, 24)
553+
(1 row)
554+
478555
--
479556
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
480557
--
@@ -878,6 +955,24 @@ SELECT cube_distance('(0)'::cube,'(.3,.4)'::cube);
878955
0.5
879956
(1 row)
880957

958+
SELECT cube_distance('(2,3,4)'::cube,'(2,3,4)'::cube);
959+
cube_distance
960+
---------------
961+
0
962+
(1 row)
963+
964+
SELECT cube_distance('(42,42,42,42)'::cube,'(137,137,137,137)'::cube);
965+
cube_distance
966+
---------------
967+
190
968+
(1 row)
969+
970+
SELECT cube_distance('(42,42,42)'::cube,'(137,137)'::cube);
971+
cube_distance
972+
------------------
973+
140.762210837994
974+
(1 row)
975+
881976
-- Test of cube function (text to cube)
882977
--
883978
SELECT cube('(1,1.2)'::text);
@@ -912,6 +1007,18 @@ SELECT cube_dim('(0,0,0)'::cube);
9121007
3
9131008
(1 row)
9141009

1010+
SELECT cube_dim('(42,42,42),(42,42,42)'::cube);
1011+
cube_dim
1012+
----------
1013+
3
1014+
(1 row)
1015+
1016+
SELECT cube_dim('(4,8,15,16,23),(4,8,15,16,23)'::cube);
1017+
cube_dim
1018+
----------
1019+
5
1020+
(1 row)
1021+
9151022
-- Test of cube_ll_coord function (retrieves LL coodinate values)
9161023
--
9171024
SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 1);
@@ -932,6 +1039,42 @@ SELECT cube_ll_coord('(-1,1),(2,-2)'::cube, 3);
9321039
0
9331040
(1 row)
9341041

1042+
SELECT cube_ll_coord('(1,2),(1,2)'::cube, 1);
1043+
cube_ll_coord
1044+
---------------
1045+
1
1046+
(1 row)
1047+
1048+
SELECT cube_ll_coord('(1,2),(1,2)'::cube, 2);
1049+
cube_ll_coord
1050+
---------------
1051+
2
1052+
(1 row)
1053+
1054+
SELECT cube_ll_coord('(1,2),(1,2)'::cube, 3);
1055+
cube_ll_coord
1056+
---------------
1057+
0
1058+
(1 row)
1059+
1060+
SELECT cube_ll_coord('(42,137)'::cube, 1);
1061+
cube_ll_coord
1062+
---------------
1063+
42
1064+
(1 row)
1065+
1066+
SELECT cube_ll_coord('(42,137)'::cube, 2);
1067+
cube_ll_coord
1068+
---------------
1069+
137
1070+
(1 row)
1071+
1072+
SELECT cube_ll_coord('(42,137)'::cube, 3);
1073+
cube_ll_coord
1074+
---------------
1075+
0
1076+
(1 row)
1077+
9351078
-- Test of cube_ur_coord function (retrieves UR coodinate values)
9361079
--
9371080
SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 1);
@@ -952,6 +1095,42 @@ SELECT cube_ur_coord('(-1,1),(2,-2)'::cube, 3);
9521095
0
9531096
(1 row)
9541097

1098+
SELECT cube_ur_coord('(1,2),(1,2)'::cube, 1);
1099+
cube_ur_coord
1100+
---------------
1101+
1
1102+
(1 row)
1103+
1104+
SELECT cube_ur_coord('(1,2),(1,2)'::cube, 2);
1105+
cube_ur_coord
1106+
---------------
1107+
2
1108+
(1 row)
1109+
1110+
SELECT cube_ur_coord('(1,2),(1,2)'::cube, 3);
1111+
cube_ur_coord
1112+
---------------
1113+
0
1114+
(1 row)
1115+
1116+
SELECT cube_ur_coord('(42,137)'::cube, 1);
1117+
cube_ur_coord
1118+
---------------
1119+
42
1120+
(1 row)
1121+
1122+
SELECT cube_ur_coord('(42,137)'::cube, 2);
1123+
cube_ur_coord
1124+
---------------
1125+
137
1126+
(1 row)
1127+
1128+
SELECT cube_ur_coord('(42,137)'::cube, 3);
1129+
cube_ur_coord
1130+
---------------
1131+
0
1132+
(1 row)
1133+
9551134
-- Test of cube_is_point
9561135
--
9571136
SELECT cube_is_point('(0)'::cube);
@@ -1100,6 +1279,108 @@ SELECT cube_enlarge('(2,-2),(-3,7)'::cube, -3, 2);
11001279
(-0.5, 1),(-0.5, 4)
11011280
(1 row)
11021281

1282+
SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -23, 5);
1283+
cube_enlarge
1284+
--------------
1285+
(42, 0, 0)
1286+
(1 row)
1287+
1288+
SELECT cube_enlarge('(42,-23,-23),(42,23,23)'::cube, -24, 5);
1289+
cube_enlarge
1290+
--------------
1291+
(42, 0, 0)
1292+
(1 row)
1293+
1294+
-- Test of cube_union (MBR for two cubes)
1295+
--
1296+
SELECT cube_union('(1,2),(3,4)'::cube, '(5,6,7),(8,9,10)'::cube);
1297+
cube_union
1298+
----------------------
1299+
(1, 2, 0),(8, 9, 10)
1300+
(1 row)
1301+
1302+
SELECT cube_union('(1,2)'::cube, '(4,2,0,0)'::cube);
1303+
cube_union
1304+
---------------------------
1305+
(1, 2, 0, 0),(4, 2, 0, 0)
1306+
(1 row)
1307+
1308+
SELECT cube_union('(1,2),(1,2)'::cube, '(4,2),(4,2)'::cube);
1309+
cube_union
1310+
---------------
1311+
(1, 2),(4, 2)
1312+
(1 row)
1313+
1314+
SELECT cube_union('(1,2),(1,2)'::cube, '(1,2),(1,2)'::cube);
1315+
cube_union
1316+
------------
1317+
(1, 2)
1318+
(1 row)
1319+
1320+
SELECT cube_union('(1,2),(1,2)'::cube, '(1,2,0),(1,2,0)'::cube);
1321+
cube_union
1322+
------------
1323+
(1, 2, 0)
1324+
(1 row)
1325+
1326+
-- Test of cube_inter
1327+
--
1328+
SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (16,15)'::cube); -- intersects
1329+
cube_inter
1330+
-----------------
1331+
(3, 4),(10, 11)
1332+
(1 row)
1333+
1334+
SELECT cube_inter('(1,2),(10,11)'::cube, '(3,4), (6,5)'::cube); -- includes
1335+
cube_inter
1336+
---------------
1337+
(3, 4),(6, 5)
1338+
(1 row)
1339+
1340+
SELECT cube_inter('(1,2),(10,11)'::cube, '(13,14), (16,15)'::cube); -- no intersection
1341+
cube_inter
1342+
-------------------
1343+
(13, 14),(10, 11)
1344+
(1 row)
1345+
1346+
SELECT cube_inter('(1,2),(10,11)'::cube, '(3,14), (16,15)'::cube); -- no intersection, but one dimension intersects
1347+
cube_inter
1348+
------------------
1349+
(3, 14),(10, 11)
1350+
(1 row)
1351+
1352+
SELECT cube_inter('(1,2),(10,11)'::cube, '(10,11), (16,15)'::cube); -- point intersection
1353+
cube_inter
1354+
------------
1355+
(10, 11)
1356+
(1 row)
1357+
1358+
SELECT cube_inter('(1,2,3)'::cube, '(1,2,3)'::cube); -- point args
1359+
cube_inter
1360+
------------
1361+
(1, 2, 3)
1362+
(1 row)
1363+
1364+
SELECT cube_inter('(1,2,3)'::cube, '(5,6,3)'::cube); -- point args
1365+
cube_inter
1366+
---------------------
1367+
(5, 6, 3),(1, 2, 3)
1368+
(1 row)
1369+
1370+
-- Test of cube_size
1371+
--
1372+
SELECT cube_size('(4,8),(15,16)'::cube);
1373+
cube_size
1374+
-----------
1375+
88
1376+
(1 row)
1377+
1378+
SELECT cube_size('(42,137)'::cube);
1379+
cube_size
1380+
-----------
1381+
0
1382+
(1 row)
1383+
11031384
-- Load some example data and build the index
11041385
--
11051386
CREATE TABLE test_cube (c cube);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp