Changeset: 7e1b4c0cb921 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7e1b4c0cb921
Branch: default
Log Message:
merged
diffs (74 lines):
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -1700,7 +1700,7 @@ fixstrnilbat(BAT *b)
ALGOBATPAR(b));
return GDK_SUCCEED;
}
- assert(niloff >= 8192);
+ assert(niloff >= GDK_STRHASHSIZE);
}
if (GDKmove(b->theap->farmid, srcdir, bnme, t,
@@ -1750,13 +1750,13 @@ fixstrnilbat(BAT *b)
case 1: {
const uint8_t *p1 = (const uint8_t *) h1.base;
uint8_t *p2 = (uint8_t *) h2->base;
- vfree -= 8192;
- niloff -= 8192;
+ vfree -= GDK_STRHASHSIZE;
+ niloff -= GDK_STRHASHSIZE;
for (BUN i = 0; i < b->batCount; i++) {
uint8_t v = p1[i];
if (v == niloff)
p2[i] = 0;
- else if (v >= vfree || vbase[v + 8192] == '\200')
+ else if (v >= vfree || vbase[v + GDK_STRHASHSIZE] ==
'\200')
p2[i] = 0;
else
p2[i] = v;
@@ -1766,13 +1766,13 @@ fixstrnilbat(BAT *b)
case 2: {
const uint16_t *p1 = (const uint16_t *) h1.base;
uint16_t *p2 = (uint16_t *) h2->base;
- vfree -= 8192;
- niloff -= 8192;
+ vfree -= GDK_STRHASHSIZE;
+ niloff -= GDK_STRHASHSIZE;
for (BUN i = 0; i < b->batCount; i++) {
uint16_t v = p1[i];
if (v == niloff)
p2[i] = 0;
- else if (v >= vfree || vbase[v + 8192] == '\200')
+ else if (v >= vfree || vbase[v + GDK_STRHASHSIZE] ==
'\200')
p2[i] = 0;
else
p2[i] = v;
diff --git a/gdk/gdk_sketch.c b/gdk/gdk_sketch.c
--- a/gdk/gdk_sketch.c
+++ b/gdk/gdk_sketch.c
@@ -250,7 +250,11 @@ bat_guess_uniques(BAT *b, BATiter *bi, s
uint8_t cnting_sketch[BUCKETS][CLZ_BUCKETS] = {0};
double unique_guess = 0;
- if (sketch_populate(b, bi, bci, cnting_sketch) == GDK_SUCCEED)
+ if (b->tsorted && b->trevsorted) /* all values are the same */
+ unique_guess = (double) (b->batCount > 0);
+ else if (b->tkey) /* all values are distinct */
+ unique_guess = (double) b->batCount;
+ else if (sketch_populate(b, bi, bci, cnting_sketch) == GDK_SUCCEED)
unique_guess = sketch_estimate(cnting_sketch);
b->tunique_est = unique_guess;
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
@@ -756,7 +756,7 @@ pqc_page_header( pqc_reader_t *r, pqc_cr
} else {
pr->dict_allocated = false;
pr->dict = pr->buffer+pos;
- if((((ulng)pr->dict) & 15) != 0) { /* copy for
alignment issues */
+ if((((size_t)pr->dict) & 15) != 0) { /* copy for
alignment issues */
char *buf = pr->dict;
pr->dict = NEW_ARRAY(char, uncompressed_size);
if (!pr->dict)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]