Changeset: 14d4f211697a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=14d4f211697a
Modified Files:
        geom/monetdb5/geom.c
        geom/monetdb5/geom_x3d.c
        sql/server/rel_optimizer.c
Branch: sfcgal
Log Message:

Merge


diffs (79 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -3769,6 +3769,7 @@ wkbMakePolygon(wkb **out, wkb **external
        GEOSGeom geosGeometry, externalGeometry, linearRingGeometry;
        bit closed = 0;
        GEOSCoordSeq coordSeq_copy;
+       int geometryType;
 
        if (wkb_isnil(*external) || *srid == int_nil) {
                if ((*out = wkbNULLcopy()) == NULL)
@@ -3781,10 +3782,11 @@ wkbMakePolygon(wkb **out, wkb **external
                throw(MAL, "geom.Polygon", MAL_MALLOC_FAIL);
 
        //check the type of the external geometry
-       if ((GEOSGeomTypeId(externalGeometry) + 1) != wkbLineString_mdb) {
+       geometryType = GEOSGeomTypeId(externalGeometry) + 1;
+       if (geometryType != wkbLineString_mdb) {
                *out = NULL;
                GEOSGeom_destroy(externalGeometry);
-               throw(MAL, "geom.Polygon", "Geometries should be LineString");
+               throw(MAL, "geom.Polygon", "Geometries should be LineString, 
but it is %s.", geom_type2str(geometryType, 0));
        }
        //check whether the linestring is closed
        wkbIsClosed(&closed, external);
diff --git a/geom/monetdb5/geom_x3d.c b/geom/monetdb5/geom_x3d.c
--- a/geom/monetdb5/geom_x3d.c
+++ b/geom/monetdb5/geom_x3d.c
@@ -497,7 +497,7 @@ x3d_3_psurface_buf(const GEOSGeometry *p
             {
                 ptr += sprintf(ptr, " ");
             }
-            ptr += sprintf(ptr, "%ud", (j + k));
+            ptr += sprintf(ptr, "%u", (j + k));
         }
         if (i < (ngeoms - 1) )
         {
@@ -618,7 +618,7 @@ x3d_3_collection_size(const GEOSGeometry
     for (i=0; i<ngeoms; i++)
     {
         const GEOSGeometry *subgeom = GEOSGetGeometryN(col, i);
-        size += ( sizeof("<Shape />") + defidlen ) * 2;
+        //size += ( sizeof("<Shape />") + defidlen ) * 2;
         switch (type) {
             case ( wkbPoint_mdb ):
                 size += x3d_3_point_size(subgeom, precision);
@@ -662,7 +662,7 @@ x3d_3_collection_buf(const GEOSGeometry 
     for (i=0; i<ngeoms; i++)
     {
         subgeom = GEOSGetGeometryN(col, i);
-        ptr += sprintf(ptr, "<Shape%s>", defid);
+        //ptr += sprintf(ptr, "<Shape%s>", defid);
         switch (type) {
             case ( wkbPoint_mdb ):
                 ptr += x3d_3_point_buf(subgeom, ptr, precision, opts);
@@ -690,7 +690,7 @@ x3d_3_collection_buf(const GEOSGeometry 
                 assert(0);
         }
 
-        ptr += printf(ptr, "</Shape>");
+        //ptr += printf(ptr, "</Shape>");
     }
 
     return (ptr-output);
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -7541,6 +7541,11 @@ rel_merge_table_rewrite(int *changes, mv
                                                }
                                                assert(e->type == e_column);
                                                exp_setname(sql->sa, ne, e->l, 
e->r);
+                                               /* make sure we don't include 
additional indices */
+                                               if (!n->next && m->next) {
+                                                       m->next = NULL;
+                                                       prel->exps->cnt = 
rel->exps->cnt;
+                                               }
                                        }
                                        first = 0;
                                        if (!skip) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to