MonetDB: no_type_bat - merged with default
Changeset: 64766f88abc0 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/64766f88abc0 Modified Files: clients/Tests/exports.stable.out gdk/gdk_bbp.c sql/common/sql_types.c sql/include/sql_catalog.h sql/server/rel_select.c sql/storage/bat/bat_storage.c sql/storage/objectset.c sql/storage/sql_storage.h sql/storage/store.c Branch: no_type_bat Log Message: merged with default diffs (truncated from 1065 to 300 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -224,6 +224,7 @@ void BBPlock(void); BAT *BBPquickdesc(bat b); int BBPreadBBPline(FILE *fp, unsigned bbpversion, int *lineno, BAT *bn, int *hashash, char *batname, char *filename, char **options); int BBPrelease(bat b); +void BBPrelinquishbats(void); int BBPrename(BAT *b, const char *nme); int BBPretain(bat b); gdk_return BBPsave(BAT *b); diff --git a/documentation/monetdbe/monetdbe_api.rst b/documentation/monetdbe/monetdbe_api.rst --- a/documentation/monetdbe/monetdbe_api.rst +++ b/documentation/monetdbe/monetdbe_api.rst @@ -167,7 +167,7 @@ Miscellaneous Return the internal NULL representation for the specific monetdbe type or NULL when the type is not found/supported. -.. c:function:: const char* monetdbe_get_mapi_port(void) +.. c:function:: const char * monetdbe_get_mapi_port(void) Return the mapi port or NULL if not used. @@ -175,6 +175,10 @@ Miscellaneous Return the MonetDBe version. +.. c:function:: const char * monetdbe_load_extension(monetdbe_database dbhdl, char *module_name) + +Load the module with name, module_name. The lib_module_name.so (or ddl) should be in the applications current working directory. + Caveats and errors -- diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -120,6 +120,7 @@ static MT_Lock BBPnameLock = MT_LOCK_INI static bat BBP_hash[BBP_mask+1]; /* BBP logical name hash buckets */ static MT_Lock GDKcacheLock = MT_LOCK_INITIALIZER(GDKcacheLock); static bat BBP_free; +static uint32_t BBP_nfree; #define BBP_FREE_LOWATER 10 #define BBP_FREE_HIWATER 50 @@ -2003,6 +2004,7 @@ BBPinit(bool allow_hge_upgrade) if (BBP_desc(i)->batCacheid == 0) { BBP_next(i) = BBP_free; BBP_free = i; + BBP_nfree++; } } @@ -2693,6 +2695,7 @@ maybeextend(void) BBP_next(sz) = ++size; } BBP_next(size) = 0; + BBP_nfree += BBP_FREE_LOWATER; return GDK_SUCCEED; } @@ -2731,6 +2734,7 @@ BBPallocbat(int tt) for (int x = 0; x < BBP_FREE_LOWATER && i; x++) { assert(BBP_next(i) == 0 || BBP_next(i) > i); t->nfreebats++; + BBP_nfree--; l = i; i = BBP_next(i); } @@ -2845,6 +2849,7 @@ BBPhandover(struct freebats *t, uint32_t if (n >= t->nfreebats) { bid = t->freebats; t->freebats = 0; + BBP_nfree += t->nfreebats; t->nfreebats = 0; } else { p = >freebats; @@ -2852,6 +2857,7 @@ BBPhandover(struct freebats *t, uint32_t p = _next(*p); bid = *p; *p = 0; + BBP_nfree += n; t->nfreebats -= n; } p = _free; @@ -2934,9 +2940,10 @@ BBPclear(bat i) } void -BBPrelinquish(struct freebats *t) +BBPrelinquishbats(void) { - if (t->nfreebats == 0) + struct freebats *t = MT_thread_getfreebats(); + if (t == NULL || t->nfreebats == 0) return; MT_lock_set(); while (t->nfreebats > 0) { @@ -4659,6 +4666,7 @@ gdk_bbp_reset(void) int i; BBP_free = 0; + BBP_nfree = 0; while (BBPlimit > BBPINIT) { BBPlimit -= BBPINIT; assert(BBPlimit >= 0); @@ -4892,4 +4900,5 @@ BBPprintinfo(void) printf("%d persistent bats using %zu virtual memory (%zu malloced)\n", pn, pvm, pmem); printf("%d transient bats using %zu virtual memory (%zu malloced)\n", tn, tvm, tmem); printf("%d bats are \"hot\" (i.e. currently or recently used)\n", nh); + printf("%"PRIu32" bats are in global free list\n", BBP_nfree); } diff --git a/gdk/gdk_bbp.h b/gdk/gdk_bbp.h --- a/gdk/gdk_bbp.h +++ b/gdk/gdk_bbp.h @@ -92,6 +92,7 @@ gdk_export int BBPrelease(bat b); gdk_export void BBPkeepref(BAT *b) __attribute__((__nonnull__(1))); gdk_export void BBPcold(bat i); +gdk_export void BBPrelinquishbats(void); #ifdef GDKLIBRARY_JSON typedef gdk_return ((*json_storage_conversion)(char **, const char **)); gdk_export gdk_return BBPjson_upgrade(json_storage_conversion); diff
monetdb-java: default - Optimise code, use append(char) instead ...
Changeset: 7621c80b08da for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/7621c80b08da Modified Files: src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java src/main/java/org/monetdb/jdbc/MonetResultSet.java src/main/java/org/monetdb/util/MDBvalidator.java Branch: default Log Message: Optimise code, use append(char) instead of append(String) diffs (84 lines): diff --git a/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java b/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java --- a/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java +++ b/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java @@ -768,7 +768,7 @@ public class MonetPreparedStatement hex.append(HEXES[(b & 0xF0) >> 4]) .append(HEXES[(b & 0x0F)]); } - hex.append("'");// end of hex string value + hex.append('\''); // end of hex string value setValue(parameterIndex, hex.toString()); } diff --git a/src/main/java/org/monetdb/jdbc/MonetResultSet.java b/src/main/java/org/monetdb/jdbc/MonetResultSet.java --- a/src/main/java/org/monetdb/jdbc/MonetResultSet.java +++ b/src/main/java/org/monetdb/jdbc/MonetResultSet.java @@ -2115,9 +2115,9 @@ public class MonetResultSet } else if (epos < monetDate.length()) { errMsg.append("parsing failed at pos ").append(epos + (negativeYear ? 2 : 1)) .append(" found: '").append(monetDate.charAt(epos)) - .append("' in '").append(monetDateStr).append("'"); + .append("' in '").append(monetDateStr).append('\''); } else { - errMsg.append("parsing failed, expected more data after '").append(monetDateStr).append("'"); + errMsg.append("parsing failed, expected more data after '").append(monetDateStr).append('\''); } throw new SQLException(errMsg.toString(), "01M10"); } diff --git a/src/main/java/org/monetdb/util/MDBvalidator.java b/src/main/java/org/monetdb/util/MDBvalidator.java --- a/src/main/java/org/monetdb/util/MDBvalidator.java +++ b/src/main/java/org/monetdb/util/MDBvalidator.java @@ -279,7 +279,7 @@ public final class MDBvalidator { final StringBuilder sb = new StringBuilder(400); sb.append(" FROM sys.keys k JOIN sys.tables t ON k.table_id = t.id JOIN sys.schemas s ON t.schema_id = s.id" + " WHERE k.type = ").append(pkey ? 0 : 1) // 0 = primary keys, 1 = unique keys - .append(" and s.name = '").append(schema).append("'"); + .append(" and s.name = '").append(schema).append('\''); String qry = sb.toString(); final int count = runCountQuery(qry); if (showValidationInfo) @@ -292,7 +292,7 @@ public final class MDBvalidator { sb.append("SELECT s.name as sch_nm, t.name as tbl_nm, k.name as key_nm, o.name as col_nm, o.nr") .append(" FROM sys.keys k JOIN sys.objects o ON k.id = o.id JOIN sys.tables t ON k.table_id = t.id JOIN sys.schemas s ON t.schema_id = s.id" + " WHERE k.type = ").append(pkey ? 0 : 1) // 0 = primary keys, 1 = unique keys - .append(" and s.name = '").append(schema).append("'") + .append(" and s.name = '").append(schema).append('\'') .append(" ORDER BY t.name, k.name, o.nr;"); qry = sb.toString(); rs = stmt.executeQuery(qry); @@ -407,7 +407,7 @@ public final class MDBvalidator { final StringBuilder sb = new StringBuilder(400); sb.append(" FROM sys.keys k JOIN sys.tables t ON k.table_id = t.id JOIN sys.schemas s ON t.schema_id = s.id" + " WHERE k.type = 2") // 2 = foreign keys - .append(" and s.name = '").append(schema).append("'"); + .append(" and s.name = '").append(schema).append('\''); String qry = sb.toString(); final int count = runCountQuery(qry); if (showValidationInfo) @@ -431,7 +431,7 @@ public final class MDBvalidator { " JOIN sys.schemas ps ON pt.schema_id = ps.id" + " WHERE fk.type = 2" + // 2 = foreign keys " AND fo.nr = po.nr") // important: matching fk-pk column ordering - .append(" AND fs.name = '").append(schema).append("'") + .append(" AND fs.name = '").append(schema).append('\'')
MonetDB: default - add minimal documentation to load extension o...
Changeset: cadb9054c46c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/cadb9054c46c Modified Files: documentation/monetdbe/monetdbe_api.rst Branch: default Log Message: add minimal documentation to load extension option for monetdbe diffs (23 lines): diff --git a/documentation/monetdbe/monetdbe_api.rst b/documentation/monetdbe/monetdbe_api.rst --- a/documentation/monetdbe/monetdbe_api.rst +++ b/documentation/monetdbe/monetdbe_api.rst @@ -167,7 +167,7 @@ Miscellaneous Return the internal NULL representation for the specific monetdbe type or NULL when the type is not found/supported. -.. c:function:: const char* monetdbe_get_mapi_port(void) +.. c:function:: const char * monetdbe_get_mapi_port(void) Return the mapi port or NULL if not used. @@ -175,6 +175,10 @@ Miscellaneous Return the MonetDBe version. +.. c:function:: const char * monetdbe_load_extension(monetdbe_database dbhdl, char *module_name) + +Load the module with name, module_name. The lib_module_name.so (or ddl) should be in the applications current working directory. + Caveats and errors -- ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: balanced_union - Merges with default
Changeset: 522d2a3dbae3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/522d2a3dbae3 Modified Files: ChangeLog.Dec2023 clients/ChangeLog.Dec2023 clients/mapilib/ChangeLog.Dec2023 clients/odbc/ChangeLog.Dec2023 common/stream/ChangeLog.Dec2023 debian/libmonetdb28.install gdk/ChangeLog.Dec2023 geom/ChangeLog.Dec2023 misc/ChangeLog.Dec2023 monetdb5/ChangeLog.Dec2023 sql/ChangeLog.Dec2023 sql/backends/monet5/rel_bin.c sql/include/sql_relation.h sql/rel.txt sql/server/rel_distribute.c sql/server/rel_dump.c sql/server/rel_exp.c sql/server/rel_optimize_others.c sql/server/rel_optimize_proj.c sql/server/rel_optimize_sel.c sql/server/rel_optimizer.c sql/server/rel_partition.c sql/server/rel_propagate.c sql/server/rel_rel.c sql/server/rel_rel.h sql/server/rel_rewriter.c sql/server/rel_select.c sql/server/rel_statistics.c sql/server/rel_unnest.c sql/server/sql_partition.c sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test sql/test/BugTracker-2016/Tests/merge_project.Bug-3955.test sql/test/BugTracker-2021/Tests/plan-not-optimal-view.Bug-7140.test sql/test/SQLancer/Tests/sqlancer17.test sql/test/bugs/Tests/rtrim_bug.test sql/test/miscellaneous/Tests/simple_plans.test sql/test/prepare/Tests/sqlancer_prepare.stable.out sql/test/prepare/Tests/sqlancer_prepare.stable.out.int128 sql/test/rel-optimizers/Tests/join-merge-remote-replica-plan.test sql/test/rel-optimizers/Tests/remote-replica-plan.reqtests sql/test/rel-optimizers/Tests/remote-replica-plan.test sql/test/rel-optimizers/Tests/replicas-join-plan.reqtests sql/test/rel-optimizers/Tests/replicas-join-plan.test sql/test/strings/Tests/asciify.test sql/test/strings/Tests/batstr_asciify.test sql/test/strings/Tests/batstr_contains.test sql/test/strings/Tests/batstr_endswith.test sql/test/strings/Tests/batstr_startswith.test sql/test/strings/Tests/contains.test sql/test/strings/Tests/endswith.test sql/test/strings/Tests/startswith.test sql/test/strings/Tests/ts_and_tstz_to_str_bug.test sql/test/strings/Tests/txtsim_jarowinkler.test sql/test/strings/Tests/txtsim_levenshtein.test testing/ChangeLog.Dec2023 tools/merovingian/ChangeLog.Dec2023 Branch: balanced_union Log Message: Merges with default diffs (truncated from 139157 to 300 lines): diff --git a/.bumpversion.cfg b/.bumpversion.cfg --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 11.48.0 +current_version = 11.50.0 commit = False tag = False diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,7 +43,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout -uses: actions/checkout@v3 +uses: actions/checkout@v4 with: ref: ${{ github.ref }} @@ -129,7 +129,7 @@ jobs: - name: Tar files run: tar -cvf mtests.tar mTests - name: Publish mtest results -uses: actions/upload-artifact@v3 +uses: actions/upload-artifact@v4 with: name: mtest-${{ github.sha }}-${{ matrix.os }}-${{ matrix.c_compiler }} path: mtests.tar diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -815,3 +815,11 @@ 6f88424ebfd9d82c072cf21d89070e04321983da 6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_SP2_release e6eb06773c17035954ac5d001cfe1f09ff3425cc Jun2023_13 5683fd900f28d65ad7c98d1ed1efd992023a7fa4 Jun2023_15 +c5b17681b55e6ca155db28be59913699e561502a Dec2023_root +c9e6096e7519636a4e840c7a0c2e27cccb7dc0fe Jun2023_17 +c9e6096e7519636a4e840c7a0c2e27cccb7dc0fe Jun2023_SP3_release +1230526af30f40eeea30fb87c47c3e414920561f Dec2023_1 +1230526af30f40eeea30fb87c47c3e414920561f Dec2023_release +95d8feaa1167b5ba87bd99253c3f4e62ebf528a1 Dec2023_3 +dcc8c702e685a4faf21ccf663028d1bc3d1165d1 Dec2023_5 +dcc8c702e685a4faf21ccf663028d1bc3d1165d1 Dec2023_SP1_release diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,9 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -# Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. +# Copyright 2024 MonetDB Foundation; +# Copyright August 2008 - 2023 MonetDB B.V.; +# Copyright 1997 - July 2008 CWI. #]] cmake_minimum_required(VERSION 3.12) diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,20 +1,3 @@ # ChangeLog file for devel # This file is updated with Maddlog -* Mon Oct 30 2023 Sjoerd Mullender -- The
monetdb-java: default - An array_size of 0 (so new String[0]) is...
Changeset: 485c75b35cc9 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/485c75b35cc9 Modified Files: src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java Branch: default Log Message: An array_size of 0 (so new String[0]) is allowed in java. diffs (53 lines): diff --git a/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java b/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java --- a/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java +++ b/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java @@ -166,7 +166,7 @@ public class MonetPreparedStatement int countParam = 0; int firstParamOffset = 0; - // initialise blank finals + // initialise metadata arrays. size can be 0. monetdbType = new String[size]; javaType = new int[size]; digits = new int[size]; @@ -185,7 +185,7 @@ public class MonetPreparedStatement final int schema_colnr = rs.findColumn("schema"); final int table_colnr = rs.findColumn("table"); final int column_colnr = rs.findColumn("column"); - for (int i = 0; rs.next(); i++) { + for (int i = 0; rs.next() && i < size; i++) { monetdbType[i] = rs.getString(type_colnr); javaType[i] = MonetDriver.getJdbcSQLType(monetdbType[i]); if (javaType[i] == Types.CLOB) { @@ -357,22 +357,16 @@ public class MonetPreparedStatement if (rsmd == null) { // first use, construct the arrays with metadata and a // ResultSetMetaData object once and reuse it for all next calls - final int rescolcount = size - paramCount; - int array_size = rescolcount; - if (array_size == 0) { - // there are no resultset columns for this prepared statement - // we can not create arrays of size 0, so use: - array_size = 1; - } + final int rescolcount = size - paramCount; // this can be 0 // create arrays for storing only the result columns meta data - final String[] schemas = new String[array_size]; - final String[] tables = new String[array_size]; - final String[] columns = new String[array_size]; - final String[] types = new String[array_size]; - final int[] jdbcTypes = new int[array_size]; - final int[] lengths = new int[array_size]; - final int[] precisions = new int[array_size]; - final int[] scales = new int[array_size]; + final String[] schemas = new String[rescolcount]; + final String[] tables = new String[rescolcount]; + final String[] columns = new String[rescolcount]; + final String[] types = new String[rescolcount]; + final int[] jdbcTypes = new int[rescolcount]; + final int[] lengths = new int[rescolcount]; + final int[] precisions = new int[rescolcount]; + final int[] scales = new int[rescolcount]; // fill the arrays with the resultset columns metadata for (int i = 0; i < rescolcount; i++) { schemas[i] = schema[i]; ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Use isinstance instead of type.
Changeset: ed305d0ab79f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ed305d0ab79f Modified Files: testing/sqllogictest.py Branch: Dec2023 Log Message: Use isinstance instead of type. diffs (12 lines): diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -429,7 +429,7 @@ class SQLLogic: for row in data: nrow = [] for col in row: -if type(col) == type(''): +if isinstance(col, str): res = geosre.search(col) if res is not None: points = ptsre.sub(r'(\g<0>)', res.group('points')) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Skip blobs when searching for MULTIPOINT.
Changeset: c42692e1ead1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c42692e1ead1 Modified Files: testing/sqllogictest.py Branch: Dec2023 Log Message: Skip blobs when searching for MULTIPOINT. diffs (12 lines): diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py --- a/testing/sqllogictest.py +++ b/testing/sqllogictest.py @@ -429,7 +429,7 @@ class SQLLogic: for row in data: nrow = [] for col in row: -if type(col) in (type(''), type(b'')): +if type(col) == type(''): res = geosre.search(col) if res is not None: points = ptsre.sub(r'(\g<0>)', res.group('points')) ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org
MonetDB: Dec2023 - Moved smarts for geos 3.12 compatibility into...
Changeset: 005a87105649 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/005a87105649 Removed Files: geom/sql/functions/Tests/ST_AsEWKT-3.12.reqtests geom/sql/functions/Tests/ST_AsEWKT-3.12.test geom/sql/functions/Tests/ST_AsText-3.12.reqtests geom/sql/functions/Tests/ST_AsText-3.12.test geom/sql/functions/Tests/ST_Boundary-3.12.reqtests geom/sql/functions/Tests/ST_Boundary-3.12.test geom/sql/functions/Tests/ST_Collect-3.12.test geom/sql/functions/Tests/ST_Contains-3.12.reqtests geom/sql/functions/Tests/ST_Contains-3.12.test geom/sql/functions/Tests/ST_CoordDim-3.12.reqtests geom/sql/functions/Tests/ST_CoordDim-3.12.test geom/sql/functions/Tests/ST_GeomFromText-3.12.reqtests geom/sql/functions/Tests/ST_GeomFromText-3.12.test geom/sql/functions/Tests/ST_GeometryN-3.12.reqtests geom/sql/functions/Tests/ST_GeometryN-3.12.test geom/sql/functions/Tests/ST_GeometryType-3.12.reqtests geom/sql/functions/Tests/ST_GeometryType-3.12.test geom/sql/functions/Tests/ST_IsClosed-3.12.reqtests geom/sql/functions/Tests/ST_IsClosed-3.12.test geom/sql/functions/Tests/ST_IsSimple-3.12.reqtests geom/sql/functions/Tests/ST_IsSimple-3.12.test geom/sql/functions/Tests/ST_IsValid-3.12.reqtests geom/sql/functions/Tests/ST_IsValid-3.12.test geom/sql/functions/Tests/ST_MPointFromText-3.12.reqtests geom/sql/functions/Tests/ST_MPointFromText-3.12.test geom/sql/functions/Tests/ST_NRings-3.12.reqtests geom/sql/functions/Tests/ST_NRings-3.12.test geom/sql/functions/Tests/ST_NumInteriorRings-3.12.reqtests geom/sql/functions/Tests/ST_NumInteriorRings-3.12.test geom/sql/functions/Tests/ST_Transform-3.12.reqtests geom/sql/functions/Tests/ST_Transform-3.12.test geom/sql/pg_regression/Tests/boundary-3.12.test Modified Files: geom/sql/functions/Tests/All geom/sql/functions/Tests/ST_AsEWKT.test geom/sql/functions/Tests/ST_AsText.test geom/sql/functions/Tests/ST_Boundary.test geom/sql/functions/Tests/ST_Collect.test geom/sql/functions/Tests/ST_Contains.test geom/sql/functions/Tests/ST_CoordDim.test geom/sql/functions/Tests/ST_GeomFromText.test geom/sql/functions/Tests/ST_GeometryN.test geom/sql/functions/Tests/ST_GeometryType.test geom/sql/functions/Tests/ST_IsClosed.test geom/sql/functions/Tests/ST_IsSimple.test geom/sql/functions/Tests/ST_IsValid.test geom/sql/functions/Tests/ST_MPointFromText.test geom/sql/functions/Tests/ST_NRings.test geom/sql/functions/Tests/ST_NumInteriorRings.test geom/sql/functions/Tests/ST_Transform.test geom/sql/pg_regression/Tests/All geom/sql/pg_regression/Tests/boundary.test sql/test/testdb/Tests/dump.SQL.py testing/sqllogictest.py Branch: Dec2023 Log Message: Moved smarts for geos 3.12 compatibility into sqllogictest.py. A bit of a hack: in older versions, add extra parentheses in MULTIPOINT values. diffs (truncated from 2875 to 300 lines): diff --git a/geom/sql/functions/Tests/All b/geom/sql/functions/Tests/All --- a/geom/sql/functions/Tests/All +++ b/geom/sql/functions/Tests/All @@ -3,18 +3,15 @@ HAVE_GEOM?loadTestWKT HAVE_GEOM?ST_PointFromText HAVE_GEOM?ST_LineFromText HAVE_GEOM?ST_PolygonFromText -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_MPointFromText -HAVE_GEOM_VERSION>=3.12.0?ST_MPointFromText-3.12 +HAVE_GEOM?ST_MPointFromText HAVE_GEOM?ST_MLineFromText HAVE_GEOM?ST_MPolygonFromText -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_GeomFromText -HAVE_GEOM_VERSION>=3.12.0?ST_GeomFromText-3.12 +HAVE_GEOM?ST_GeomFromText HAVE_GEOM?dropTestWKT HAVE_GEOM?ST_MakePoint -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_Collect -HAVE_GEOM_VERSION>=3.12.0?ST_Collect-3.12 +HAVE_GEOM?ST_Collect HAVE_GEOM?ST_MakeLine HAVE_GEOM?loadTestPolygons HAVE_GEOM?ST_Intersects @@ -27,50 +24,38 @@ HAVE_GEOM?ST_DWithinRTree HAVE_GEOM?loadTestGeometries -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_GeometryType -HAVE_GEOM_VERSION>=3.12.0?ST_GeometryType-3.12 -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_AsText -HAVE_GEOM_VERSION>=3.12.0?ST_AsText-3.12 +HAVE_GEOM?ST_GeometryType +HAVE_GEOM?ST_AsText -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_IsClosed -HAVE_GEOM_VERSION>=3.12.0?ST_IsClosed-3.12 +HAVE_GEOM?ST_IsClosed HAVE_GEOM?ST_IsEmpty -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_IsSimple -HAVE_GEOM_VERSION>=3.12.0?ST_IsSimple-3.12 -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_IsValid -HAVE_GEOM_VERSION>=3.12.0?ST_IsValid-3.12 +HAVE_GEOM?ST_IsSimple +HAVE_GEOM?ST_IsValid HAVE_GEOM?ST_IsRing HAVE_GEOM?XYZ HAVE_GEOM?XYZMinMax #HAVE_GEOM?srid -HAVE_GEOM&!GEOS_VERSION>=3.12.0?ST_GeometryN -HAVE_GEOM_VERSION>=3.12.0?ST_GeometryN-3.12 +HAVE_GEOM?ST_GeometryN HAVE_GEOM?ST_NumGeometries HAVE_GEOM?ST_NumPoints HAVE_GEOM?ST_NPoints
monetdb-java: default - Corrected ResultSetMetaData methods getP...
Changeset: 549225b7be85 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/549225b7be85 Modified Files: ChangeLog src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java src/main/java/org/monetdb/jdbc/MonetResultSetMetaData.java tests/JDBC_API_Tester.java Branch: default Log Message: Corrected ResultSetMetaData methods getPrecision(), getColumnDisplaySize() and ParameterMetaData method getPrecision() for the interval data types. They now return more precise information for the 13 possible interval data types. diffs (257 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -2,9 +2,10 @@ # This file is updated with Maddlog * Thu Apr 4 2024 Martin van Dinther -- Improved ResultSetMetaData.getColumnTypeName() and - ParameterMetaData.getParameterTypeName() for interval types. It now - returns more precise information for the interval data types. +- Corrected ResultSetMetaData methods getColumnTypeName(), getPrecision(), + getColumnDisplaySize() and ParameterMetaData methods getParameterTypeName() + and getPrecision() for the interval data types. They now return + more precise information for the 13 possible interval data types. * Thu Mar 7 2024 Martin van Dinther - Improved DatabaseMetaData.getTypeInfo(). It now also returns the serial diff --git a/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java b/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java --- a/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java +++ b/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java @@ -198,6 +198,36 @@ final class MonetParameterMetaData case Types.NUMERIC: // these data types have a variable precision (max precision is 38) try { + // Special handling for: day_interval and sec_interval as they are + // mapped to Types.NUMERIC and Types.DECIMAL types (see MonetDriver typeMap) + final String monettype = monetdbTypes[param]; + if (monettype != null && monettype.endsWith("_interval")) { + /* for interval types, precisions[] contains the interval subtype code */ + switch (precisions[param]) { + case 1: return 4; // interval year + case 2: return 6; // interval year to month + case 3: return 6; // interval month + case 4: return 9; // interval day + case 5: return 11; // interval day to hour + case 6: return 13; // interval day to minute + case 7: return 15; // interval day to second + case 8: return 11; // interval hour + case 9: return 13; // interval hour to minute + case 10: return 15; // interval hour to second + case 11: return 13; // interval minute + case 12: return 15; // interval minute to second + case 13: return 15; // interval second + default: + { // fall back to the 3 available monettype names + if ("sec_interval".equals(monettype)) + return 15; + if ("day_interval".equals(monettype)) + return 9; + if ("month_interval".equals(monettype)) + return 6; + } + } + } return precisions[param]; } catch (IndexOutOfBoundsException e) { throw newSQLInvalidParameterIndexException(param); @@ -293,6 +323,7 @@ final class MonetParameterMetaData
monetdb-java: default - Improved ResultSetMetaData.getColumnType...
Changeset: 674f9ed21308 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/674f9ed21308 Modified Files: ChangeLog src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java src/main/java/org/monetdb/jdbc/MonetResultSetMetaData.java tests/JDBC_API_Tester.java Branch: default Log Message: Improved ResultSetMetaData.getColumnTypeName() and ParameterMetaData.getParameterTypeName() for interval types. It now returns more precise information for the 13 possible interval data types. Also extended test Test_Interval_Types() to test all 13 interval types, both as result column and as parameter. diffs (190 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog +* Thu Apr 4 2024 Martin van Dinther +- Improved ResultSetMetaData.getColumnTypeName() and + ParameterMetaData.getParameterTypeName() for interval types. It now + returns more precise information for the interval data types. + * Thu Mar 7 2024 Martin van Dinther - Improved DatabaseMetaData.getTypeInfo(). It now also returns the serial and bigserial data types and all 13 possible interval data types. diff --git a/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java b/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java --- a/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java +++ b/src/main/java/org/monetdb/jdbc/MonetParameterMetaData.java @@ -293,12 +293,30 @@ final class MonetParameterMetaData final String monettype = monetdbTypes[param]; if (monettype != null && monettype.endsWith("_interval")) { /* convert the interval type names to valid SQL data type names */ - if ("day_interval".equals(monettype)) - return "interval day"; - if ("month_interval".equals(monettype)) - return "interval month"; - if ("sec_interval".equals(monettype)) - return "interval second"; + switch (precisions[param]) { + case 1: return "interval year"; + case 2: return "interval year to month"; + case 3: return "interval month"; + case 4: return "interval day"; + case 5: return "interval day to hour"; + case 6: return "interval day to minute"; + case 7: return "interval day to second"; + case 8: return "interval hour"; + case 9: return "interval hour to minute"; + case 10: return "interval hour to second"; + case 11: return "interval minute"; + case 12: return "interval minute to second"; + case 13: return "interval second"; + default: + { // fall back to the 3 available monettype names + if ("day_interval".equals(monettype)) + return "interval day"; + if ("month_interval".equals(monettype)) + return "interval month"; + if ("sec_interval".equals(monettype)) + return "interval second"; + } + } } return monettype; } catch (IndexOutOfBoundsException e) { diff --git a/src/main/java/org/monetdb/jdbc/MonetResultSetMetaData.java b/src/main/java/org/monetdb/jdbc/MonetResultSetMetaData.java --- a/src/main/java/org/monetdb/jdbc/MonetResultSetMetaData.java +++ b/src/main/java/org/monetdb/jdbc/MonetResultSetMetaData.java @@ -543,12 +543,34 @@ final class MonetResultSetMetaData /* convert the interval type names to valid SQL data type names, * such that generic applications can use them in create table statements */ - if ("day_interval".equals(monettype)) - return "interval day"; - if ("month_interval".equals(monettype)) - return "interval month"; -
MonetDB: Dec2023 - added esacpes for * in text
Changeset: 400ac5f934c5 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/400ac5f934c5 Modified Files: documentation/monetdbe/manual_pages/monetdbe_options.rst Branch: Dec2023 Log Message: added esacpes for * in text diffs (16 lines): diff --git a/documentation/monetdbe/manual_pages/monetdbe_options.rst b/documentation/monetdbe/manual_pages/monetdbe_options.rst --- a/documentation/monetdbe/manual_pages/monetdbe_options.rst +++ b/documentation/monetdbe/manual_pages/monetdbe_options.rst @@ -31,9 +31,9 @@ MonetDBe options struct. Object can be p (2) int querytimeout. Gracefully terminate query after a few seconds. (3) int sessiontimeout. Graceful terminate the session after a few seconds. (4) int nr_threads. Maximum number of worker treads, limits level of parallelism. -(5) monetdbe_remote* remote. Pointer to a monetdbe_remote object. -(6) monetdbe_mapi_server* mapi_server. Pointer to a monetdbe_mapi_server object. -(7) const char *trace_file. File to which log output should be written. +(5) monetdbe_remote\* remote. Pointer to a monetdbe_remote object. +(6) monetdbe_mapi_server\* mapi_server. Pointer to a monetdbe_mapi_server object. +(7) const char \*trace_file. File to which log output should be written. EXAMPLES ___ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org