Changeset: d199eac79eee for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d199eac79eee
Modified Files:
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_batop.c
sql/server/rel_statistics.c
sql/storage/bat/bat_logger.c
sql/storage/bat/bat_storage.c
Branch: persistent_sketches
Log Message:
merged with default
diffs (truncated from 24064 to 300 lines):
diff --git a/.editorconfig b/.editorconfig
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,11 +7,11 @@ insert_final_newline = true
[*.{c,h,y}{,.in}]
indent_style = tab
-tab_width = 4
+tab_width = 8
indent_size = tab
trim_trailing_whitespace = true
charset = utf-8
-max_line_length = 120
+max_line_length = 72
[*.py{,.in}]
indent_style = space
@@ -24,9 +24,9 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace = true
-[{clients/{mapi{lib,client},odbc},common/{options,utils},gdk}/**.{c,h}{,.in}]
-tab_width = 8
-max_line_length = 72
+[{monetdb5,sql}/**.{c,h,y}{,.in}]
+tab_width = 4
+max_line_length = 120
[*.yml]
indent_style = space
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -48,7 +48,7 @@ jobs:
- name: install packages
run: |
sudo apt-get update
- sudo apt-get install -y bison libbz2-dev libpcre2-dev liblzma-dev
liblz4-dev libxml2-dev pkg-config libxxhash-dev unixodbc-dev zlib1g-dev
libssl-dev
+ sudo apt-get install -y bison libbz2-dev libpcre2-dev liblzma-dev
liblz4-dev libxml2-dev pkg-config libxxhash-dev unixodbc-dev zlib1g-dev
libssl-dev libhts-dev
if: runner.os == 'Linux'
- name: Patch /etc/hosts on Unix
@@ -74,7 +74,7 @@ jobs:
if: runner.os == 'Linux'
- name: brew packages
- run: brew install bison pkgconf xxhash
+ run: brew install bison pkgconf xxhash htslib
if: runner.os == 'macOS'
- name: make MonetDB on macos
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,21 @@
# ChangeLog file for devel
# This file is updated with Maddlog
+* Thu Oct 22 2026 Martin van Dinther <[email protected]>
+- Added support for reading DNA sequence alignment data from *.sam and *.bam
files.
+ Usage examples:
+ SELECT * FROM '/path/to/file1.bam';
+ or
+ SELECT * FROM file_loader('/path/to/file1.bam');
+ Prerequisites:
+ We use the HTSlib for reading these files and the library needs to be
+ pre-installed on your OS (e.g. on Fedora via: sudo dnf install htslib).
+ See also: https://www.htslib.org/download/
+ The HTSlib must be version 1.24 or higher.
+ Also the MonetDB server has to be started with startup argument:
+ --loadmodule htslib
+ to enable it. By default it is not enabled.
+
* Wed Oct 21 2026 Sjoerd Mullender <[email protected]>
- There is a new type of database farm, like the --dbextra farm, for
temporary heaps. Temporary heaps are heaps which are created and
diff --git a/README.rst b/README.rst
--- a/README.rst
+++ b/README.rst
@@ -102,9 +102,9 @@ The following packages are optional but
``readline-devel``, ``xz-devel``, ``zlib-devel``.
The following packages are optional:
-``cfitsio-devel``, ``gdal-devel``, ``geos-devel``, ``libcmocka-devel``,
-``libcurl-devel``, ``libxml2-devel``, ``netcdf-devel``, ``proj-devel``,
-``unixODBC-devel``.
+``cfitsio-devel``, ``gdal-devel``, ``geos-devel``, ``htslib-devel``,
+``libcmocka-devel``, ``libcurl-devel``, ``libxml2-devel``,
+``netcdf-devel``, ``proj-devel``, ``unixODBC-devel``.
On Ubuntu and Debian the following packages are required:
``bison``, ``cmake``, ``gcc``, ``pkg-config``, ``python3``,
@@ -116,8 +116,8 @@ The following packages are optional but
The following packages are optional:
``libcfitsio-dev``, ``libcmocka-dev``, ``libcurl4-gnutls-dev``,
-``libgdal-dev``, ``libgeos-dev``, ``libnetcdf-dev``, ``libproj-dev``,
-``libxml2-dev``, ``unixodbc-dev``.
+``libgdal-dev``, ``libgeos-dev``, ``libhts-dev``, ``libnetcdf-dev``,
+``libproj-dev``, ``libxml2-dev``, ``unixodbc-dev``.
``cmake`` must be at least version 3.12, ``python`` must be at least
version 3.5.
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
@@ -127,7 +127,7 @@ restrict_t BATgetaccess(BAT *b);
ValPtr BATgetprop(BAT *b, enum prop_t idx);
ValPtr BATgetprop_nolock(BAT *b, enum prop_t idx);
gdk_return BATgroup(BAT **groups, BAT **extents, BAT **histo, BAT *b, BAT *s,
BAT *g, BAT *e, BAT *h);
-const char *BATgroupaggrinit(BAT *b, BAT *g, BAT *e, BAT *s, oid *minp, oid
*maxp, BUN *ngrpp, struct canditer *ci);
+const char *BATgroupaggrinit(BAT *b, BAT *g, BAT *e, BAT *s, oid *minp, oid
*maxp, BUN *ngrpp, struct canditer *ci, BATiter *bi);
gdk_return BATgroupavg(BAT **bnp, BAT **cntsp, BAT *b, BAT *g, BAT *e, BAT *s,
int tp, bool skip_nils, int scale);
gdk_return BATgroupavg2(BAT **bnp, BAT **cntsp, BAT *b, BAT *g, BAT *e, BAT
*s, int tp, BUN ngrp, bool skip_nils, int scale);
gdk_return BATgroupavg3(BAT **avgp, BAT **remp, BAT **cntp, BAT *b, BAT *g,
BAT *e, BAT *s, bool skip_nils, bool inout);
@@ -314,6 +314,7 @@ gdk_return GDKmergeidx(BAT *b, BAT **a,
void *GDKmmap(const char *path, int mode, size_t len);
int GDKms(void);
gdk_return GDKmunmap(void *addr, size_t len);
+int GDKnr_pipeline_threads;
int GDKnr_threads;
void GDKprepareExit(void);
void GDKprintinfo(void);
@@ -471,6 +472,7 @@ ssize_t bteToStr(allocator *ma, char **d
const bte bte_nil;
oid canditer_idx(const struct canditer *ci, BUN p);
void canditer_init(struct canditer *ci, BAT *b, BAT *s);
+void canditer_init_bi(struct canditer *ci, BATiter *bi, BAT *s);
oid canditer_last(const struct canditer *ci);
oid canditer_mask_next(const struct canditer *ci, oid o, bool next);
oid canditer_peek(const struct canditer *ci);
diff --git a/clients/examples/C/backrefencode.c
b/clients/examples/C/backrefencode.c
--- a/clients/examples/C/backrefencode.c
+++ b/clients/examples/C/backrefencode.c
@@ -21,8 +21,8 @@
// #include <string.h>
#ifdef _WIN32
- #include <io.h>
- #include <fcntl.h>
+#include <io.h>
+#include <fcntl.h>
#endif
// There we go again
@@ -241,24 +241,24 @@ main(int argc, char **argv)
bool do_encode;
switch (argc) {
- case 1:
- do_encode = true;
+ case 1:
+ do_encode = true;
+ break;
+ case 2:
+ if (strcmp(argv[1], "-d") == 0) {
+ do_encode = false;
break;
- case 2:
- if (strcmp(argv[1], "-d") == 0) {
- do_encode = false;
- break;
- }
- /* fallthrough */
- default:
- fprintf(stderr, "Usage: %s [-d] <input >output\n",
argv[0]);
- return 1;
+ }
+ /* fallthrough */
+ default:
+ fprintf(stderr, "Usage: %s [-d] <input >output\n", argv[0]);
+ return 1;
}
- #ifdef _WIN32
+#ifdef _WIN32
_setmode(_fileno(stdout),O_BINARY);
_setmode(_fileno(stdin),O_BINARY);
- #endif
+#endif
if (setvbuf(stdout, NULL, _IOFBF, 128 * 1024) < 0) {
fprintf(stderr, "setvbuf stdout: %s\n", strerror(errno));
diff --git a/clients/examples/C/bincopydata.c b/clients/examples/C/bincopydata.c
--- a/clients/examples/C/bincopydata.c
+++ b/clients/examples/C/bincopydata.c
@@ -349,11 +349,11 @@ gen_inet6(FILE *f, bool byteswap, long n
#include "bincopydecimal_impl.h"
#ifdef HAVE_HGE
- #define FUNCNAME gen_decimal_hugeints
- #define STYP int128_t
- #define UTYP uint128_t
- #define CONVERT copy_binary_convert128
- #include "bincopydecimal_impl.h"
+#define FUNCNAME gen_decimal_hugeints
+#define STYP int128_t
+#define UTYP uint128_t
+#define CONVERT copy_binary_convert128
+#include "bincopydecimal_impl.h"
#endif
typedef void (*generator_t)(FILE *f, bool byteswap, long nrecs, char
*argument);
@@ -485,7 +485,7 @@ main(int argc, char *argv[])
#else
true
#endif
- ;
+ ;
bool i_am_big_endian = !i_am_little_endian;
char **args = &argv[1];
diff --git a/clients/examples/C/bincopytemporaldata.c
b/clients/examples/C/bincopytemporaldata.c
--- a/clients/examples/C/bincopytemporaldata.c
+++ b/clients/examples/C/bincopytemporaldata.c
@@ -61,7 +61,7 @@ random_timestamp(struct rng *rng)
days == 28 &&
year > 0 && year % 4 == 0 &&
(year % 100 != 0 || year % 400 == 0)
- );
+ );
if (leap_year)
days = 29;
ts.date.day = 1 + rng_next(rng) % days;
@@ -84,22 +84,22 @@ gen_timestamps(FILE *f, bool byteswap, l
}
}
-#define GEN_TIMESTAMP_FIELD(name, typ, fld, nilvalue) \
- void name \
- (FILE *f, bool byteswap, long nrecs, char *arg) \
- { \
- (void)arg; \
- struct rng rng = my_favorite_rng(); \
- \
- for (long i = 0; i < nrecs; i++) { \
+#define GEN_TIMESTAMP_FIELD(name, typ, fld, nilvalue) \
+ void name \
+ (FILE *f, bool byteswap, long nrecs, char *arg) \
+ { \
+ (void)arg; \
+ struct rng rng = my_favorite_rng(); \
+ \
+ for (long i = 0; i < nrecs; i++) { \
copy_binary_timestamp ts = random_timestamp(&rng); \
- typ *p = &ts.fld; \
- typ tmp = ts.date.day == 255 ? nilvalue : *p; \
- if (byteswap) { \
- copy_binary_convert_timestamp(&ts); \
- } \
- fwrite(&tmp, sizeof(tmp), 1, f); \
- } \
+ typ *p = &ts.fld; \
+ typ tmp = ts.date.day == 255 ? nilvalue : *p; \
+ if (byteswap) { \
+ copy_binary_convert_timestamp(&ts); \
+ } \
+ fwrite(&tmp, sizeof(tmp), 1, f); \
+ } \
}
GEN_TIMESTAMP_FIELD(gen_timestamp_times, copy_binary_time, time,
binary_nil_timestamp.time)
diff --git a/clients/examples/C/bincopyuuid.c b/clients/examples/C/bincopyuuid.c
--- a/clients/examples/C/bincopyuuid.c
+++ b/clients/examples/C/bincopyuuid.c
@@ -27,7 +27,7 @@ random_uuid(struct rng *rng, my_uuid *u)
//
// _0_1_2_3 _4_5 _6_7 _8_9
// 123e4567-e89b-12d3-a456-426614174000
- // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
+ // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
//
// M: uuid version, located in byte 6
// N: uuid variant, located in byte 8
@@ -80,4 +80,3 @@ gen_text_uuids(FILE *f, bool byteswap, l
}
(void)byteswap;
}
-
diff --git a/clients/examples/C/sample0.c b/clients/examples/C/sample0.c
--- a/clients/examples/C/sample0.c
+++ b/clients/examples/C/sample0.c
@@ -13,15 +13,16 @@
#include <string.h>
#include <mapi.h>
-#define die(dbh,hdl) do { \
- if (hdl) \
- mapi_explain_result(hdl,stderr); \
- else if (dbh) \
- mapi_explain(dbh,stderr); \
- else \
- fprintf(stderr,"command failed\n"); \
- exit(-1); \
- } while (0)
+#define die(dbh,hdl) \
+ do { \
+ if (hdl) \
+ mapi_explain_result(hdl,stderr); \
+ else if (dbh) \
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]