Changeset: 816106ae18ed for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=816106ae18ed
Added Files:
geom/sql/Tests/ogc_destroy.stable.err
geom/sql/Tests/ogc_destroy.stable.out
Modified Files:
geom/monetdb5/geom.c
geom/sql/Tests/ogc_load.sql
monetdb5/modules/mal/mat.c
Branch: default
Log Message:
Next step in GEOS fixing
diffs (216 lines):
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -746,7 +746,7 @@ wkbcreatepoint_bat(int *out, int *ix, in
{
BAT *bo = NULL, *bx = NULL, *by = NULL;
dbl *x = NULL, *y = NULL;
- BUN i, o;
+ BUN i;
wkb *p = NULL;
if ((bx = BATdescriptor(*ix)) == NULL) {
@@ -756,8 +756,8 @@ wkbcreatepoint_bat(int *out, int *ix, in
BBPreleaseref(bx->batCacheid);
throw(MAL, "geom.point", RUNTIME_OBJECT_MISSING);
}
- if (!BAThdense(bx) ||
- !BAThdense(by) ||
+ if ( bx->htype != TYPE_void ||
+ by->htype != TYPE_void ||
bx->hseqbase != by->hseqbase ||
BATcount(bx) != BATcount(by)) {
BBPreleaseref(bx->batCacheid);
@@ -771,14 +771,10 @@ wkbcreatepoint_bat(int *out, int *ix, in
throw(MAL, "geom.point", MAL_MALLOC_FAIL);
}
BATseqbase(bo, bx->hseqbase);
- bo->hdense = TRUE;
- bo->hsorted = TRUE;
- bo->H->nonil = TRUE;
- BATkey(bo, TRUE);
x = (dbl *) Tloc(bx, BUNfirst(bx));
y = (dbl *) Tloc(by, BUNfirst(bx));
- for (i = 0, o = BUNlast(bo); i < BATcount(bx); i++, o++) {
+ for (i = 0; i < BATcount(bx); i++) {
str err = NULL;
if ((err = wkbcreatepoint(&p, &x[i], &y[i])) != MAL_SUCCEED) {
BBPreleaseref(bx->batCacheid);
@@ -786,32 +782,18 @@ wkbcreatepoint_bat(int *out, int *ix, in
BBPreleaseref(bo->batCacheid);
throw(MAL, "geom.point", "%s", err);
}
- tfastins_nocheck(bo, o, p, Tsize(bo));
+ BUNappend(bo,p,TRUE);
GDKfree(p);
p = NULL;
}
BATsetcount(bo, BATcount(bx));
- bo->batDirty = TRUE;
- bo->tdense = FALSE;
- bo->tsorted = BATcount(bo) <= 1;
- bo->trevsorted = BATcount(bo) <= 1;
- bo->hrevsorted = BATcount(bo) <= 1;
- bo->T->nonil = (bx->T->nonil && by->T->nonil);
- BATkey(BATmirror(bo), (bx->tkey && by->tkey));
-
+ BATsettrivprop(bo);
+ BATderiveProps(bo,FALSE);
BBPreleaseref(bx->batCacheid);
BBPreleaseref(by->batCacheid);
BBPkeepref(*out = bo->batCacheid);
return MAL_SUCCEED;
-
- bunins_failed:
- if (p)
- GDKfree(p);
- BBPreleaseref(bx->batCacheid);
- BBPreleaseref(by->batCacheid);
- BBPreleaseref(bo->batCacheid);
- throw(MAL, "geom.point", "bunins failed");
}
str
diff --git a/geom/sql/Tests/ogc_destroy.stable.err
b/geom/sql/Tests/ogc_destroy.stable.err
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/ogc_destroy.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'ogc_destroy` in directory 'geom/sql` itself:
+
+
+# 16:04:13 >
+# 16:04:13 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=35585" "--set"
"mapi_usock=/var/tmp/mtest-8565/.s.monetdb.35585" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/export/scratch1/mk/current//Linux/var/MonetDB/mTests_geom_sql"
"--set" "mal_listing=0"
+# 16:04:13 >
+
+# builtin opt gdk_dbpath =
/export/scratch1/mk/current//Linux/var/monetdb5/dbfarm/demo
+# builtin opt gdk_debug = 0
+# builtin opt gdk_vmtrim = no
+# builtin opt monet_prompt = >
+# builtin opt monet_daemon = no
+# builtin opt mapi_port = 50000
+# builtin opt mapi_open = false
+# builtin opt mapi_autosense = false
+# builtin opt sql_optimizer = default_pipe
+# builtin opt sql_debug = 0
+# cmdline opt gdk_nr_threads = 0
+# cmdline opt mapi_open = true
+# cmdline opt mapi_port = 35585
+# cmdline opt mapi_usock = /var/tmp/mtest-8565/.s.monetdb.35585
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
+# cmdline opt gdk_dbpath =
/export/scratch1/mk/current//Linux/var/MonetDB/mTests_geom_sql
+# cmdline opt mal_listing = 0
+
+# 16:04:13 >
+# 16:04:13 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-8565" "--port=35585"
+# 16:04:13 >
+
+
+# 16:04:13 >
+# 16:04:13 > "Done."
+# 16:04:13 >
+
diff --git a/geom/sql/Tests/ogc_destroy.stable.out
b/geom/sql/Tests/ogc_destroy.stable.out
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/ogc_destroy.stable.out
@@ -0,0 +1,55 @@
+stdout of test 'ogc_destroy` in directory 'geom/sql` itself:
+
+
+# 16:04:13 >
+# 16:04:13 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=35585" "--set"
"mapi_usock=/var/tmp/mtest-8565/.s.monetdb.35585" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/export/scratch1/mk/current//Linux/var/MonetDB/mTests_geom_sql"
"--set" "mal_listing=0"
+# 16:04:13 >
+
+# MonetDB 5 server v11.18.0
+# This is an unreleased version
+# Serving database 'mTests_geom_sql', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically
linked
+# Found 15.591 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:35585/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-8565/.s.monetdb.35585
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 16:04:13 >
+# 16:04:13 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-8565" "--port=35585"
+# 16:04:13 >
+
+#DROP TABLE geometry_columns;
+#DROP TABLE spatial_ref_sys;
+#DROP TABLE lake_geom;
+#DROP TABLE road_segment_geom;
+#DROP TABLE divided_route_geom;
+#DROP TABLE forest_geom;
+#DROP TABLE bridge_geom;
+#DROP TABLE stream_geom;
+#DROP TABLE building_pt_geom;
+#DROP TABLE building_area_geom;
+#DROP TABLE pond_geom;
+#DROP TABLE named_place_geom;
+#DROP TABLE map_neatline_geom;
+#DROP TABLE lakes;
+#DROP TABLE road_segments;
+#DROP TABLE divided_routes;
+#DROP TABLE forests;
+#DROP TABLE bridges;
+#DROP TABLE streams;
+#DROP TABLE buildings;
+#DROP TABLE ponds;
+#DROP TABLE named_places;
+#DROP TABLE map_neatlines;
+
+# 16:04:13 >
+# 16:04:13 > "Done."
+# 16:04:13 >
+
diff --git a/geom/sql/Tests/ogc_load.sql b/geom/sql/Tests/ogc_load.sql
--- a/geom/sql/Tests/ogc_load.sql
+++ b/geom/sql/Tests/ogc_load.sql
@@ -64,14 +64,14 @@ INSERT INTO named_places VALUES(118, 'Go
INSERT INTO map_neatline_geom VALUES(101, 1, 5, 1, 0,0, 0,48, 84,48, 84,0,
0,0);
INSERT INTO map_neatlines VALUES(115, 101);
-- Geometry Columns
-INSERT INTO geometry_columns VALUES ( 'lakes', 'shore_gid', 'lake_geom',0, 5,
2, 5, 101);
-INSERT INTO geometry_columns VALUES ( 'road_segments', 'centerline_gid',
'road_segment_geom',0, 3, 2, 3, 101);
-INSERT INTO geometry_columns VALUES ( 'divided_routes', 'centerlines_gid',
'divided_route_geom',0, 9, 2, 3, 101);
-INSERT INTO geometry_columns VALUES ( 'forests', 'boundary_gid',
'forest_geom',0, 11, 2, 5, 101);
-INSERT INTO geometry_columns VALUES ( 'bridges', 'position_gid',
'bridge_geom',0, 1, 2, 1, 101);
-INSERT INTO geometry_columns VALUES ( 'streams', 'centerline_gid',
'stream_geom',0, 3, 2, 3, 101);
-INSERT INTO geometry_columns VALUES ( 'buildings', 'position_gid',
'building_pt_geom',0, 1, 2, 1, 101);
-INSERT INTO geometry_columns VALUES ( 'buildings', 'footprint_gid',
'building_area_geom',0, 5, 2, 5, 101);
-INSERT INTO geometry_columns VALUES ( 'ponds', 'shores_gid', 'pond_geom',0,
11, 2, 4, 101);
-INSERT INTO geometry_columns VALUES ( 'named_places', 'boundary_gid',
'named_place_geom',0, 5, 2, 4, 101);
-INSERT INTO geometry_columns VALUES ( 'map_neatlines', 'neatline_gid',
'map_neatline_geom',0, 5, 2, 5, 101);
+INSERT INTO geometry_columns VALUES ('local', 'lakes', 'shore_gid',
'lake_geom',0, 5, 2, 5, 101);
+INSERT INTO geometry_columns VALUES ('local', 'road_segments',
'centerline_gid', 'road_segment_geom',0, 3, 2, 3, 101);
+INSERT INTO geometry_columns VALUES ('local', 'divided_routes',
'centerlines_gid', 'divided_route_geom',0, 9, 2, 3, 101);
+INSERT INTO geometry_columns VALUES ('local', 'forests', 'boundary_gid',
'forest_geom',0, 11, 2, 5, 101);
+INSERT INTO geometry_columns VALUES ('local', 'bridges', 'position_gid',
'bridge_geom',0, 1, 2, 1, 101);
+INSERT INTO geometry_columns VALUES ('local', 'streams', 'centerline_gid',
'stream_geom',0, 3, 2, 3, 101);
+INSERT INTO geometry_columns VALUES ('local', 'buildings', 'position_gid',
'building_pt_geom',0, 1, 2, 1, 101);
+INSERT INTO geometry_columns VALUES ('local', 'buildings', 'footprint_gid',
'building_area_geom',0, 5, 2, 5, 101);
+INSERT INTO geometry_columns VALUES ('local', 'ponds', 'shores_gid',
'pond_geom',0, 11, 2, 4, 101);
+INSERT INTO geometry_columns VALUES ('local', 'named_places', 'boundary_gid',
'named_place_geom',0, 5, 2, 4, 101);
+INSERT INTO geometry_columns VALUES ('local', 'map_neatlines', 'neatline_gid',
'map_neatline_geom',0, 5, 2, 5, 101);
diff --git a/monetdb5/modules/mal/mat.c b/monetdb5/modules/mal/mat.c
--- a/monetdb5/modules/mal/mat.c
+++ b/monetdb5/modules/mal/mat.c
@@ -493,6 +493,8 @@ MATpackValues(Client cntxt, MalBlkPtr mb
for(i = first; i < p->argc; i++)
BUNappend(bn, getArgReference(stk, p, i), TRUE);
}
+ BATsettrivprop(bn);
+ BATderiveProps(bn,FALSE);
ret= (int*) getArgReference(stk,p,0);
BBPkeepref(*ret = bn->batCacheid);
return MAL_SUCCEED;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list