Changeset: 2a8fac88bb08 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2a8fac88bb08
Modified Files:
geom/monetdb5/geod.c
geom/monetdb5/geod.h
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geomBulk.c
geom/monetdb5/geom_atoms.c
geom/monetdb5/geom_atoms.h
monetdb5/mal/mal_interpreter.c
monetdb5/modules/atoms/batxml.c
monetdb5/modules/atoms/blob.c
monetdb5/modules/atoms/inet.c
monetdb5/modules/atoms/json.c
monetdb5/modules/atoms/mtime.c
monetdb5/modules/atoms/str.c
monetdb5/modules/atoms/streams.c
monetdb5/modules/atoms/url.c
monetdb5/modules/atoms/uuid.c
monetdb5/modules/atoms/xml.c
monetdb5/modules/atoms/xml.h
monetdb5/modules/kernel/aggr.c
monetdb5/modules/kernel/aggr.h
monetdb5/modules/kernel/alarm.c
monetdb5/modules/kernel/algebra.c
monetdb5/modules/kernel/algebra.h
monetdb5/modules/kernel/bat5.c
monetdb5/modules/kernel/bat5.h
monetdb5/modules/kernel/group.c
monetdb5/modules/kernel/group.h
monetdb5/modules/kernel/microbenchmark.c
monetdb5/modules/kernel/mmath.c
monetdb5/modules/mal/batExtensions.c
monetdb5/modules/mal/bbp.c
monetdb5/modules/mal/calc.c
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/groupby.c
monetdb5/modules/mal/inspect.c
monetdb5/modules/mal/iterator.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/orderidx.c
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/profiler.c
monetdb5/modules/mal/querylog.c
monetdb5/modules/mal/querylog.h
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/tracer.c
monetdb5/modules/mal/txtsim.c
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_pipes.h
monetdb5/optimizer/optimizer.c
monetdb5/optimizer/optimizer.h
sql/backends/monet5/UDF/pyapi3/conversion3.c
sql/backends/monet5/UDF/udf/udf.c
sql/backends/monet5/UDF/udf/udf.h
sql/backends/monet5/UDF/udf/udf_impl.h
sql/backends/monet5/sql.c
sql/backends/monet5/sql.h
sql/backends/monet5/sql_cast.h
sql/backends/monet5/sql_cast_impl_int.h
sql/backends/monet5/sql_datetrunc.c
sql/backends/monet5/sql_fround_impl.h
sql/backends/monet5/sql_rank.c
sql/backends/monet5/sql_round_impl.h
sql/backends/monet5/sql_subquery.c
sql/backends/monet5/sql_subquery.h
sql/backends/monet5/sql_time.c
sql/backends/monet5/sql_upgrades.c
sql/backends/monet5/vaults/fits/fits.c
sql/backends/monet5/vaults/fits/fits.h
sql/backends/monet5/vaults/netcdf/netcdf.c
sql/backends/monet5/vaults/netcdf/netcdf_vault.h
testing/melcheck.py
Branch: resource_management
Log Message:
Added a Client pointer as first argument to all "command" implementations.
It compiles, at least in debug mode in my system...
diffs (truncated from 12446 to 300 lines):
diff --git a/geom/monetdb5/geod.c b/geom/monetdb5/geod.c
--- a/geom/monetdb5/geod.c
+++ b/geom/monetdb5/geod.c
@@ -775,8 +775,9 @@ geoDistanceInternal(GEOSGeom a, GEOSGeom
**/
/* Calculates the distance, in meters, between two geographic geometries with
latitude/longitude coordinates */
str
-wkbDistanceGeographic(dbl *out, wkb * const *a, wkb * const *b)
+wkbDistanceGeographic(Client ctx, dbl *out, wkb * const *a, wkb * const *b)
{
+ (void) ctx;
str err = MAL_SUCCEED;
GEOSGeom ga, gb;
err = wkbGetCompatibleGeometries(a, b, &ga, &gb);
@@ -794,8 +795,9 @@ wkbDistanceGeographic(dbl *out, wkb * co
**/
/* Checks if two geographic geometries are within d meters of one another */
str
-wkbDWithinGeographic(bit *out, wkb * const *a, wkb * const *b, const dbl *d)
+wkbDWithinGeographic(Client ctx, bit *out, wkb * const *a, wkb * const *b,
const dbl *d)
{
+ (void) ctx;
str err = MAL_SUCCEED;
GEOSGeom ga, gb;
double distance;
@@ -815,8 +817,9 @@ wkbDWithinGeographic(bit *out, wkb * con
**/
/* Checks if two geographic geometries intersect at any point */
str
-wkbIntersectsGeographic(bit *out, wkb * const *a, wkb * const *b)
+wkbIntersectsGeographic(Client ctx, bit *out, wkb * const *a, wkb * const *b)
{
+ (void) ctx;
str err = MAL_SUCCEED;
GEOSGeom ga, gb;
double distance;
@@ -919,8 +922,9 @@ geoCoversInternal(GEOSGeom a, GEOSGeom b
**/
/* Checks if no point of Geometry B is outside Geometry A */
str
-wkbCoversGeographic(bit *out, wkb * const *a, wkb * const *b)
+wkbCoversGeographic(Client ctx, bit *out, wkb * const *a, wkb * const *b)
{
+ (void) ctx;
str err = MAL_SUCCEED;
GEOSGeom ga, gb;
err = wkbGetCompatibleGeometries(a, b, &ga, &gb);
@@ -1173,7 +1177,8 @@ free:
}
str
-wkbDWithinGeographicJoin(bat *lres_id, bat *rres_id, const bat *l_id, const
bat *r_id, const bat *d_id, const bat *ls_id, const bat *rs_id, const bit
*nil_matches, const lng *estimate, const bit *anti) {
+wkbDWithinGeographicJoin(Client ctx, bat *lres_id, bat *rres_id, const bat
*l_id, const bat *r_id, const bat *d_id, const bat *ls_id, const bat *rs_id,
const bit *nil_matches, const lng *estimate, const bit *anti) {
+ (void) ctx;
double distance_within = 0;
BAT *d = NULL;
//Get the distance BAT and get the double value
@@ -1188,17 +1193,20 @@ wkbDWithinGeographicJoin(bat *lres_id, b
}
str
-wkbDWithinGeographicSelect(bat* outid, const bat *bid , const bat *sid, wkb *
const *wkb_const, const dbl *distance_within, const bit *anti) {
+wkbDWithinGeographicSelect(Client ctx, bat* outid, const bat *bid , const bat
*sid, wkb * const *wkb_const, const dbl *distance_within, const bit *anti) {
+ (void) ctx;
return
filterSelectGeomGeomDoubleToBit(outid,bid,sid,*wkb_const,*distance_within,*anti,geosDistanceWithin,"geom.wkbDWithinGeographicSelect");
}
str
-wkbIntersectsGeographicJoin(bat *lres_id, bat *rres_id, const bat *l_id, const
bat *r_id, const bat *ls_id, const bat *rs_id, const bit *nil_matches, const
lng *estimate, const bit *anti) {
+wkbIntersectsGeographicJoin(Client ctx, bat *lres_id, bat *rres_id, const bat
*l_id, const bat *r_id, const bat *ls_id, const bat *rs_id, const bit
*nil_matches, const lng *estimate, const bit *anti) {
+ (void) ctx;
return
filterJoinGeomGeomDoubleToBit(lres_id,rres_id,l_id,r_id,0,ls_id,rs_id,*nil_matches,estimate,*anti,geosDistanceWithin,"geom.wkbIntersectsGeographicJoin");
}
str
-wkbIntersectsGeographicSelect(bat* outid, const bat *bid , const bat *sid, wkb
* const *wkb_const, const bit *anti) {
+wkbIntersectsGeographicSelect(Client ctx, bat* outid, const bat *bid , const
bat *sid, wkb * const *wkb_const, const bit *anti) {
+ (void) ctx;
return
filterSelectGeomGeomDoubleToBit(outid,bid,sid,*wkb_const,0,*anti,geosDistanceWithin,"geom.wkbIntersectsGeographicSelect");
}
diff --git a/geom/monetdb5/geod.h b/geom/monetdb5/geod.h
--- a/geom/monetdb5/geod.h
+++ b/geom/monetdb5/geod.h
@@ -64,17 +64,17 @@ typedef struct CartPoint2D
str wkbGetCompatibleGeometries(wkb * const *a, wkb * const *b, GEOSGeom *ga,
GEOSGeom *gb);
/* Geographic functions */
-str wkbCoversGeographic(bit* out, wkb * const * a, wkb * const * b);
+str wkbCoversGeographic(Client ctx, bit* out, wkb * const * a, wkb * const *
b);
-str wkbDistanceGeographic(dbl* out, wkb * const * a, wkb * const * b);
-str wkbDistanceGeographic_bat(bat *outBAT_id, const bat *aBAT_id, const bat
*bBAT_id);
-str wkbDistanceGeographic_bat_cand(bat *out_id, const bat *a_id, const bat
*b_id, const bat *s1_id, const bat *s2_id);
+str wkbDistanceGeographic(Client ctx, dbl* out, wkb * const * a, wkb * const *
b);
+str wkbDistanceGeographic_bat(Client ctx, bat *outBAT_id, const bat *aBAT_id,
const bat *bBAT_id);
+str wkbDistanceGeographic_bat_cand(Client ctx, bat *out_id, const bat *a_id,
const bat *b_id, const bat *s1_id, const bat *s2_id);
-str wkbDWithinGeographic(bit* out, wkb * const * a, wkb * const * b, const dbl
*distance);
-str wkbDWithinGeographicSelect(bat* outid, const bat *bid , const bat *sid,
wkb * const *wkb_const, const dbl *distance_within, const bit *anti);
-str wkbDWithinGeographicJoin(bat *lres_id, bat *rres_id, const bat *l_id,
const bat *r_id, const bat *d_id, const bat *ls_id, const bat *rs_id, const bit
*nil_matches, const lng *estimate, const bit *anti);
-str wkbIntersectsGeographic(bit* out, wkb * const * a, wkb * const * b);
-str wkbIntersectsGeographicSelect(bat* outid, const bat *bid , const bat *sid,
wkb * const *wkb_const, const bit *anti);
-str wkbIntersectsGeographicJoin(bat *lres_id, bat *rres_id, const bat *l_id,
const bat *r_id, const bat *ls_id, const bat *rs_id, const bit *nil_matches,
const lng *estimate, const bit *anti);
+str wkbDWithinGeographic(Client ctx, bit* out, wkb * const * a, wkb * const *
b, const dbl *distance);
+str wkbDWithinGeographicSelect(Client ctx, bat* outid, const bat *bid , const
bat *sid, wkb * const *wkb_const, const dbl *distance_within, const bit *anti);
+str wkbDWithinGeographicJoin(Client ctx, bat *lres_id, bat *rres_id, const bat
*l_id, const bat *r_id, const bat *d_id, const bat *ls_id, const bat *rs_id,
const bit *nil_matches, const lng *estimate, const bit *anti);
+str wkbIntersectsGeographic(Client ctx, bit* out, wkb * const * a, wkb * const
* b);
+str wkbIntersectsGeographicSelect(Client ctx, bat* outid, const bat *bid ,
const bat *sid, wkb * const *wkb_const, const bit *anti);
+str wkbIntersectsGeographicJoin(Client ctx, bat *lres_id, bat *rres_id, const
bat *l_id, const bat *r_id, const bat *ls_id, const bat *rs_id, const bit
*nil_matches, const lng *estimate, const bit *anti);
str geodeticEdgeBoundingBox(const CartPoint3D* p1, const CartPoint3D* p2,
BoundingBox* mbox);
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -51,8 +51,9 @@ GEOSGeom_getCollectionType (int GEOSGeom
/* Group By operation. Joins geometries together in the same group into a
MultiGeometry */
str
-wkbCollectAggrSubGroupedCand(bat *outid, const bat *bid, const bat *gid, const
bat *eid, const bat *sid, const bit *skip_nils)
-{
+wkbCollectAggrSubGroupedCand(Client ctx, bat *outid, const bat *bid, const bat
*gid, const bat *eid, const bat *sid, const bit *skip_nils)
+{
+ (void) ctx;
BAT *b = NULL, *g = NULL, *s = NULL, *out = NULL;
BAT *sortedgroups, *sortedorder;
BATiter bi;
@@ -227,13 +228,14 @@ free:
}
str
-wkbCollectAggrSubGrouped(bat *out, const bat *bid, const bat *gid, const bat
*eid, const bit *skip_nils)
-{
- return wkbCollectAggrSubGroupedCand(out, bid, gid, eid, NULL,
skip_nils);
+wkbCollectAggrSubGrouped(Client ctx, bat *out, const bat *bid, const bat *gid,
const bat *eid, const bit *skip_nils)
+{
+ return wkbCollectAggrSubGroupedCand(ctx, out, bid, gid, eid, NULL,
skip_nils);
}
str
-wkbCollectAggr (wkb **out, const bat *bid) {
+wkbCollectAggr(Client ctx, wkb **out, const bat *bid) {
+ (void) ctx;
str msg = MAL_SUCCEED;
BAT *b = NULL;
GEOSGeom *unionGroup = NULL, collection;
@@ -288,7 +290,8 @@ wkbCollectAggr (wkb **out, const bat *bi
}
static str
-wkbCollect (wkb **out, wkb * const *a, wkb * const *b) {
+wkbCollect(Client ctx, wkb **out, wkb * const *a, wkb * const *b) {
+ (void) ctx;
str err = MAL_SUCCEED;
GEOSGeom collection;
/* geom_a and geom_b */
@@ -651,8 +654,9 @@ transformMultiGeometry(GEOSGeometry **tr
/* It gets a geometry and transforms its coordinates to the provided srid */
str
-wkbTransform(wkb **transformedWKB, wkb **geomWKB, int *srid_src, int
*srid_dst, char **proj4_src_str, char **proj4_dst_str)
-{
+wkbTransform(Client ctx, wkb **transformedWKB, wkb **geomWKB, int *srid_src,
int *srid_dst, char **proj4_src_str, char **proj4_dst_str)
+{
+ (void) ctx;
#ifndef HAVE_PROJ
*transformedWKB = NULL;
(void) geomWKB;
@@ -1024,8 +1028,9 @@ forceDimGeometry(GEOSGeometry **outGeome
}
str
-wkbForceDim(wkb **outWKB, wkb **geomWKB, int *dim)
-{
+wkbForceDim(Client ctx, wkb **outWKB, wkb **geomWKB, int *dim)
+{
+ (void) ctx;
GEOSGeometry *outGeometry;
GEOSGeom geosGeometry;
str err;
@@ -1404,8 +1409,9 @@ segmentizeGeometry(GEOSGeometry **outGeo
}
str
-wkbSegmentize(wkb **outWKB, wkb **geomWKB, dbl *sz)
-{
+wkbSegmentize(Client ctx, wkb **outWKB, wkb **geomWKB, dbl *sz)
+{
+ (void) ctx;
GEOSGeometry *outGeometry;
GEOSGeom geosGeometry;
str err;
@@ -1722,8 +1728,9 @@ translateGeometry(GEOSGeometry **outGeom
}
str
-wkbTranslate(wkb **outWKB, wkb **geomWKB, dbl *dx, dbl *dy, dbl *dz)
-{
+wkbTranslate(Client ctx, wkb **outWKB, wkb **geomWKB, dbl *dx, dbl *dy, dbl
*dz)
+{
+ (void) ctx;
GEOSGeometry *outGeometry;
GEOSGeom geosGeometry;
str err;
@@ -1763,8 +1770,9 @@ wkbTranslate(wkb **outWKB, wkb **geomWKB
//flag = 0 => returns a collection of polygons
//flag = 1 => returns a multilinestring
str
-wkbDelaunayTriangles(wkb **outWKB, wkb **geomWKB, dbl *tolerance, int *flag)
-{
+wkbDelaunayTriangles(Client ctx, wkb **outWKB, wkb **geomWKB, dbl *tolerance,
int *flag)
+{
+ (void) ctx;
GEOSGeom outGeometry;
GEOSGeom geosGeometry;
@@ -1792,8 +1800,9 @@ wkbDelaunayTriangles(wkb **outWKB, wkb *
}
str
-wkbPointOnSurface(wkb **resWKB, wkb **geomWKB)
-{
+wkbPointOnSurface(Client ctx, wkb **resWKB, wkb **geomWKB)
+{
+ (void) ctx;
GEOSGeom geosGeometry, resGeosGeometry;
if (is_wkb_nil(*geomWKB)) {
@@ -1949,8 +1958,9 @@ dumpGeometriesGeometry(BAT *idBAT, BAT *
}
str
-wkbDump(bat *idBAT_id, bat *geomBAT_id, wkb **geomWKB)
-{
+wkbDump(Client ctx, bat *idBAT_id, bat *geomBAT_id, wkb **geomWKB)
+{
+ (void) ctx;
BAT *idBAT = NULL, *geomBAT = NULL;
GEOSGeom geosGeometry;
unsigned int geometriesNum;
@@ -2041,7 +2051,7 @@ dumpPointsPoint(BAT *idBAT, BAT *geomBAT
}
static str
-dumpPointsLineString(BAT *idBAT, BAT *geomBAT, const GEOSGeometry
*geosGeometry, const char *path)
+dumpPointsLineString(Client ctx, BAT *idBAT, BAT *geomBAT, const GEOSGeometry
*geosGeometry, const char *path)
{
int pointsNum = 0;
str err;
@@ -2050,7 +2060,7 @@ dumpPointsLineString(BAT *idBAT, BAT *ge
unsigned int lvl = 0;
wkb *geomWKB = geos2wkb(geosGeometry);
- err = wkbNumPoints(&pointsNum, &geomWKB, &check);
+ err = wkbNumPoints(ctx, &pointsNum, &geomWKB, &check);
GDKfree(geomWKB);
if (err != MAL_SUCCEED)
return err;
@@ -2069,7 +2079,7 @@ dumpPointsLineString(BAT *idBAT, BAT *ge
}
static str
-dumpPointsPolygon(BAT *idBAT, BAT *geomBAT, const GEOSGeometry *geosGeometry,
unsigned int *lvl, const char *path)
+dumpPointsPolygon(Client ctx, BAT *idBAT, BAT *geomBAT, const GEOSGeometry
*geosGeometry, unsigned int *lvl, const char *path)
{
const GEOSGeometry *exteriorRingGeometry;
int numInteriorRings = 0, i = 0;
@@ -2093,7 +2103,7 @@ dumpPointsPolygon(BAT *idBAT, BAT *geomB
"%s%u%s", path, *lvl, extraStr);
//get the points in the exterior ring
- err = dumpPointsLineString(idBAT, geomBAT, exteriorRingGeometry,
newPath);
+ err = dumpPointsLineString(ctx, idBAT, geomBAT, exteriorRingGeometry,
newPath);
GDKfree(newPath);
if (err != MAL_SUCCEED)
return err;
@@ -2113,7 +2123,7 @@ dumpPointsPolygon(BAT *idBAT, BAT *geomB
snprintf(newPath, pathLength + lvlDigitsNum + extraLength + 1,
"%s%u%s", path, *lvl, extraStr);
- err = dumpPointsLineString(idBAT, geomBAT,
GEOSGetInteriorRingN_r(geoshandle, geosGeometry, i), newPath);
+ err = dumpPointsLineString(ctx, idBAT, geomBAT,
GEOSGetInteriorRingN_r(geoshandle, geosGeometry, i), newPath);
GDKfree(newPath);
if (err != MAL_SUCCEED)
return err;
@@ -2122,9 +2132,9 @@ dumpPointsPolygon(BAT *idBAT, BAT *geomB
return MAL_SUCCEED;
}
-static str dumpPointsGeometry(BAT *idBAT, BAT *geomBAT, const GEOSGeometry
*geosGeometry, const char *path);
+static str dumpPointsGeometry(Client ctx, BAT *idBAT, BAT *geomBAT, const
GEOSGeometry *geosGeometry, const char *path);
static str
-dumpPointsMultiGeometry(BAT *idBAT, BAT *geomBAT, const GEOSGeometry
*geosGeometry, const char *path)
+dumpPointsMultiGeometry(Client ctx, BAT *idBAT, BAT *geomBAT, const
GEOSGeometry *geosGeometry, const char *path)
{
int geometriesNum, i;
const GEOSGeometry *multiGeometry = NULL;
@@ -2150,7 +2160,7 @@ dumpPointsMultiGeometry(BAT *idBAT, BAT
"%s%u%s", path, lvl, extraStr);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]