Changeset: cf28951c0388 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cf28951c0388
Modified Files:
gdk/gdk.h
monetdb5/mal/mal_instruction.c
Branch: nilmask
Log Message:
Merged with default.
diffs (200 lines):
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1304,16 +1304,18 @@ typedef union {
} inet4;
typedef union {
#ifdef HAVE_HGE
- hge align; /* force alignment, only used for equality */
+ uint128_t align; /* force alignment, only used for equality */
#else
- lng align[2]; /* force alignment, not otherwise used */
+ uint64_t align[2]; /* force alignment, not otherwise used */
#endif
- uint8_t hex[16];
+ uint8_t hex[16] __attribute__((__nonstring__));
} inet6;
#define SIZEOF_OID SIZEOF_SIZE_T
typedef size_t oid;
-#define OIDFMT "%zu"
+/* macro in the style of <inttypes.h> for formatting oid */
+#define PRIuOID "zu"
+#define OIDFMT "%" PRIuOID
typedef int bat; /* Index into BBP */
typedef void *ptr; /* Internal coding of types */
@@ -1328,9 +1330,9 @@ typedef char *str;
typedef union {
#ifdef HAVE_HGE
- hge h; /* force alignment, only used for equality */
+ uint128_t h; /* force alignment, only used for equality */
#else
- lng l[2]; /* force alignment, not otherwise used */
+ uint64_t l[2]; /* force alignment, not otherwise used */
#endif
uint8_t u[UUID_SIZE] __attribute__((__nonstring__));
} uuid;
@@ -1344,8 +1346,12 @@ gdk_export size_t blobsize(size_t nitems
#define SIZEOF_LNG 8
#define LL_CONSTANT(val) INT64_C(val)
-#define LLFMT "%" PRId64
-#define ULLFMT "%" PRIu64
+#define PRIdLNG PRId64
+#define PRIuLNG PRIu64
+#define PRIxLNG PRIx64
+#define PRIoLNG PRIo64
+#define LLFMT "%" PRIdLNG
+#define ULLFMT "%" PRIuLNG
#define LLSCN "%" SCNd64
#define ULLSCN "%" SCNu64
@@ -1375,12 +1381,8 @@ typedef oid var_t; /* type used for hea
typedef oid BUN; /* BUN position */
#define SIZEOF_BUN SIZEOF_OID
+#define PRIuBUN PRIuOID
#define BUNFMT OIDFMT
-/* alternatively:
-typedef size_t BUN;
-#define SIZEOF_BUN SIZEOF_SIZE_T
-#define BUNFMT "%zu"
-*/
#if SIZEOF_BUN == SIZEOF_INT
#define BUN_NONE ((BUN) INT_MAX)
#else
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -375,10 +375,10 @@ copyInstructionArgs(MalBlkPtr mb, const
if (new == NULL)
return new;
memcpy(new, p, offsetof(InstrRecord, argv) + p->maxarg *
sizeof(p->argv[0]));
+ new->maxarg = args;
if (args > p->maxarg)
memset(new->argv + p->maxarg, 0, (args - p->maxarg) *
sizeof(new->argv[0]));
new->typeresolved = false;
- new->maxarg = args;
return new;
}
diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c
--- a/monetdb5/modules/atoms/str.c
+++ b/monetdb5/modules/atoms/str.c
@@ -1965,7 +1965,7 @@ scan_loop_strselect(BAT *rl, BATiter *li
rl->tnil = false;
}
- TRC_DEBUG(ALGO, "%s, l=%s #%zu [%s], cl=%s #%zu, time="LLFMT"usecs)\n",
+ TRC_DEBUG(ALGO, "%s, l=%s #"BUNFMT" [%s], cl=%s #"BUNFMT",
time="LLFMT"usecs)\n",
fname,
BATgetId(li->b), li->count, ATOMname(li->b->ttype),
lci->s ? BATgetId(lci->s) : "NULL", lci->ncand,
@@ -2217,7 +2217,7 @@ nested_loop_strjoin(BAT *rl, BAT *rr, BA
}
}
- TRC_DEBUG(ALGO, "(%s, %s, l=%s #%zu [%s], r=%s #%zu [%s], cl=%s #%zu,
cr=%s #%zu, time="LLFMT"usecs)\n",
+ TRC_DEBUG(ALGO, "(%s, %s, l=%s #"BUNFMT" [%s], r=%s #"BUNFMT" [%s],
cl=%s #"BUNFMT", cr=%s #"BUNFMT", time="LLFMT"usecs)\n",
fname, "nested_loop_strjoin",
BATgetId(li->b), li->count, ATOMname(li->b->ttype),
BATgetId(ri->b), ri->count, ATOMname(ri->b->ttype),
@@ -2460,7 +2460,7 @@ bigram_strjoin(BAT *rl, BAT *rr, BATiter
ma_close(&ta_state);
- TRC_DEBUG(ALGO, "(%s, %s, l=%s #%zu [%s], r=%s #%zu [%s], cl=%s #%zu,
cr=%s #%zu, time="LLFMT"usecs)\n",
+ TRC_DEBUG(ALGO, "(%s, %s, l=%s #"BUNFMT" [%s], r=%s #"BUNFMT" [%s],
cl=%s #"BUNFMT", cr=%s #"BUNFMT", time="LLFMT"usecs)\n",
fname, "bigram_strjoin",
BATgetId(li->b), li->count, ATOMname(li->b->ttype),
BATgetId(ri->b), ri->count, ATOMname(ri->b->ttype),
diff --git a/monetdb5/modules/mal/pp_hash.c b/monetdb5/modules/mal/pp_hash.c
--- a/monetdb5/modules/mal/pp_hash.c
+++ b/monetdb5/modules/mal/pp_hash.c
@@ -150,12 +150,12 @@ ht_create(int type, size_t size, hash_ta
Type *vals = ht->vals; \
for (gid i = 0; i < ht->size; i++) \
{ \
- gid g = ht->gids[i]; \
+ gid g = (gid) ATOMIC_GET(&ht->gids[i]); \
if (g) { \
- mnstr_printf(fdout, "#| %7lld ", (long long)
i); \
+ mnstr_printf(fdout, "#| %7"PRIuOID" ", i); \
if (ht->pgids) \
- mnstr_printf(fdout, "| %7lld ", (long
long) ht->pgids[g]); \
- mnstr_printf(fdout, "| %7lld ", (long long)
(g-1)); \
+ mnstr_printf(fdout, "| %7"PRIuOID" ",
ht->pgids[g]); \
+ mnstr_printf(fdout, "| %7"PRIuOID" ", g - 1); \
if (is_##Type##_nil(vals[g])) \
mnstr_printf(fdout, "| NIL\n"); \
else \
@@ -163,7 +163,7 @@ ht_create(int type, size_t size, hash_ta
} \
} \
} while (0)
-void
+void
ht_print(stream *fdout, BAT *b)
{
hash_table *ht = (hash_table*)b->pl_io;
@@ -180,10 +180,10 @@ ht_print(stream *fdout, BAT *b)
mnstr_printf(fdout, "#| HSH | GID | VAL\n");
}
switch(ht->type) {
- case TYPE_bit:
+ case TYPE_bit:
prnt(bit);
break;
- case TYPE_bte:
+ case TYPE_bte:
prnt(bte);
break;
case TYPE_sht:
diff --git a/sql/backends/monet5/sql_bincopyconvert.c
b/sql/backends/monet5/sql_bincopyconvert.c
--- a/sql/backends/monet5/sql_bincopyconvert.c
+++ b/sql/backends/monet5/sql_bincopyconvert.c
@@ -569,7 +569,7 @@ load_zero_terminated_text(BAT *bat, stre
size_t consumed;
msg = insert_nul_terminated_values(&state, &bs->buf[bs->pos],
bs->len - bs->pos, &consumed);
#ifdef DEBUG_PRINTFS
- fprintf(stderr, "# consumed %zu, left_over=%zu,
batcount=%zu\n", consumed, state.left_over, BATcount(bat));
+ fprintf(stderr, "# consumed %zu, left_over=%zu,
batcount="BUNFMT"\n", consumed, state.left_over, BATcount(bat));
#endif
if (msg != MAL_SUCCEED)
goto end;
diff --git a/sql/backends/monet5/vaults/parquet/Tests/All
b/sql/backends/monet5/vaults/parquet/Tests/All
--- a/sql/backends/monet5/vaults/parquet/Tests/All
+++ b/sql/backends/monet5/vaults/parquet/Tests/All
@@ -1,4 +1,4 @@
#invalid_parquet
HAVE_SNAPPY?test_parquet_reader
HAVE_DATA_PATH&HAVE_ZSTD&HAVE_SNAPPY?parquet_testing
-HAVE_DATA_PATH&test_parquet_unsigned
+HAVE_DATA_PATH&HAVE_SNAPPY?test_parquet_unsigned
diff --git a/sql/backends/monet5/vaults/parquet/pqc_reader.c
b/sql/backends/monet5/vaults/parquet/pqc_reader.c
--- a/sql/backends/monet5/vaults/parquet/pqc_reader.c
+++ b/sql/backends/monet5/vaults/parquet/pqc_reader.c
@@ -526,8 +526,8 @@ blob_read_dict( pqc_creader_t *cr, uint3
data += sizeof(int);
blob *b = (blob*)buf;
+ b->nitems = len;
memcpy(b->data, data, len);
- b->nitems = len;
offsets[i] = (int) (buf - obuf);
rc[i] = buf;
buf += (sizeof(size_t)+len+15)&(~15);
diff --git a/sql/storage/bat/bat_logger.c b/sql/storage/bat/bat_logger.c
--- a/sql/storage/bat/bat_logger.c
+++ b/sql/storage/bat/bat_logger.c
@@ -1233,7 +1233,7 @@ snapshot_immediate_copy_file(stream *pla
GDKerror("Reading bytes of component %s failed: %s",
path, mnstr_peek_error(s));
goto end;
} else if (bytes_read < (ssize_t) chunk) {
- GDKerror("Read only %zu/%zu bytes of component %s: %s",
(size_t) bytes_read, chunk, path, mnstr_peek_error(s));
+ GDKerror("Read only %zd/%zu bytes of component %s: %s",
bytes_read, chunk, path, mnstr_peek_error(s));
goto end;
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]