Changeset: e893e270950a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/e893e270950a Branch: pushcands Log Message:
Merged with default diffs (truncated from 428 to 300 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -6143,6 +6143,7 @@ stdout of test 'MAL-signatures` in direc [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:timestamp]):bat[:int] ", "MTIMEseconds_since_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:timestamp], X_1:bat[:oid]):bat[:int] ", "MTIMEseconds_since_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:lng]):bat[:timestamp] ", "MTIMEtimestamp_frommsec_epoch_bulk;", "" ] +[ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:lng], X_1:bat[:oid]):bat[:timestamp] ", "MTIMEtimestamp_frommsec_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:int]):bat[:timestamp] ", "MTIMEtimestamp_fromsecond_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:int], X_1:bat[:oid]):bat[:timestamp] ", "MTIMEtimestamp_fromsecond_epoch_bulk;", "" ] [ "batmtime", "epoch_ms", "pattern batmtime.epoch_ms(X_0:bat[:date]):bat[:lng] ", "MTIMEdate_extract_epoch_ms_bulk;", "" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -8677,6 +8677,7 @@ stdout of test 'MAL-signatures` in direc [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:timestamp]):bat[:int] ", "MTIMEseconds_since_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:timestamp], X_1:bat[:oid]):bat[:int] ", "MTIMEseconds_since_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:lng]):bat[:timestamp] ", "MTIMEtimestamp_frommsec_epoch_bulk;", "" ] +[ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:lng], X_1:bat[:oid]):bat[:timestamp] ", "MTIMEtimestamp_frommsec_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:int]):bat[:timestamp] ", "MTIMEtimestamp_fromsecond_epoch_bulk;", "" ] [ "batmtime", "epoch", "pattern batmtime.epoch(X_0:bat[:int], X_1:bat[:oid]):bat[:timestamp] ", "MTIMEtimestamp_fromsecond_epoch_bulk;", "" ] [ "batmtime", "epoch_ms", "pattern batmtime.epoch_ms(X_0:bat[:date]):bat[:lng] ", "MTIMEdate_extract_epoch_ms_bulk;", "" ] diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c --- a/gdk/gdk_join.c +++ b/gdk/gdk_join.c @@ -3592,14 +3592,16 @@ leftjoin(BAT **r1p, BAT **r2p, BAT *l, B if ((parent = VIEWtparent(l)) != 0) { BAT *b = BBPdescriptor(parent); if (l->hseqbase == b->hseqbase && - BATcount(l) == BATcount(b)) { + BATcount(l) == BATcount(b) && + ATOMtype(l->ttype) == ATOMtype(b->ttype)) { l = b; } } if ((parent = VIEWtparent(r)) != 0) { BAT *b = BBPdescriptor(parent); if (r->hseqbase == b->hseqbase && - BATcount(r) == BATcount(b)) { + BATcount(r) == BATcount(b) && + ATOMtype(r->ttype) == ATOMtype(b->ttype)) { r = b; } } diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c --- a/gdk/gdk_string.c +++ b/gdk/gdk_string.c @@ -108,8 +108,8 @@ strCleanHash(Heap *h, bool rebuild) * started. */ memset(newhash, 0, sizeof(newhash)); pos = GDK_STRHASHSIZE; - while (pos < h->free && pos < GDK_ELIMLIMIT) { - pad = GDK_VARALIGN - (pos & (GDK_VARALIGN - 1)); + while (pos < h->free && + pos + (pad = GDK_VARALIGN - (pos & (GDK_VARALIGN - 1))) < GDK_ELIMLIMIT) { if (pad < sizeof(stridx_t)) pad += GDK_VARALIGN; pos += pad + extralen; @@ -255,7 +255,6 @@ strPut(BAT *b, var_t *dst, const void *V { const char *v = V; Heap *h = b->tvheap; - size_t elimbase = GDK_ELIMBASE(h->free); size_t pad; size_t pos, len = strLen(v); const size_t extralen = h->hashash ? EXTRALEN : 0; @@ -304,19 +303,16 @@ strPut(BAT *b, var_t *dst, const void *V } pad = GDK_VARALIGN - (h->free & (GDK_VARALIGN - 1)); - if (elimbase == 0) { /* i.e. h->free < GDK_ELIMLIMIT */ + if (GDK_ELIMBASE(h->free + pad) == 0) { /* i.e. h->free+pad < GDK_ELIMLIMIT */ if (pad < sizeof(stridx_t)) { /* make room for hash link */ pad += GDK_VARALIGN; } - } else if (extralen == 0) { /* i.e., h->hashash == FALSE */ - /* no VARSHIFT and no string hash value stored => no - * padding/alignment needed */ + } else if (GDK_ELIMBASE(h->free) != 0) { + /* no extra padding needed when no hash links needed + * (but only when padding doesn't cross duplicate + * elimination boundary) */ pad = 0; - } else { - /* pad to align on VARALIGN for VARSHIFT and/or string - * hash value */ - pad &= (GDK_VARALIGN - 1); } /* check heap for space (limited to a certain maximum after @@ -371,7 +367,7 @@ strPut(BAT *b, var_t *dst, const void *V /* maintain hash table */ pos -= extralen; - if (elimbase == 0) { /* small string heap: link the next pointer */ + if (GDK_ELIMBASE(pos) == 0) { /* small string heap: link the next pointer */ /* the stridx_t next pointer directly precedes the * string and optional (depending on hashash) hash * value */ diff --git a/monetdb5/mal/Tests/tst049.maltest b/monetdb5/mal/Tests/tst049.maltest --- a/monetdb5/mal/Tests/tst049.maltest +++ b/monetdb5/mal/Tests/tst049.maltest @@ -61,7 +61,7 @@ 9 123456123456 statement ok -i:= str.like("hello","hello") +i:= algebra.like("hello","hello","",false) query T rowsort io.print(i) @@ -69,7 +69,7 @@ io.print(i) true statement ok -i:= str.like("hello","hell") +i:= algebra.like("hello","hell","",false) query T rowsort io.print(i) @@ -77,7 +77,7 @@ io.print(i) false statement ok -i:= str.like("hello","h_llo") +i:= algebra.like("hello","h_llo","",false) query T rowsort io.print(i) @@ -85,7 +85,7 @@ io.print(i) true statement ok -i:= str.like("hello","%llo") +i:= algebra.like("hello","%llo","",false) query T rowsort io.print(i) @@ -93,7 +93,7 @@ io.print(i) true statement ok -i:= str.like("hello","%___") +i:= algebra.like("hello","%___","",false) query T rowsort io.print(i) @@ -101,7 +101,7 @@ io.print(i) true statement ok -i:= str.like("hello","hxllo") +i:= algebra.like("hello","hxllo","",false) query T rowsort io.print(i) @@ -109,7 +109,7 @@ io.print(i) false statement ok -i:= str.like("tr","t_") +i:= algebra.like("tr","t_","",false) query T rowsort io.print(i) @@ -117,7 +117,7 @@ io.print(i) true statement ok -i:= str.like("trx","t_") +i:= algebra.like("trx","t_","",false) query T rowsort io.print(i) @@ -125,7 +125,7 @@ io.print(i) false statement ok -z:= batalgebra.like(b,"t_") +z:= batalgebra.like(b,"t_","",false) query II rowsort io.print(z) @@ -154,7 +154,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%math%") +z:= mal.manifold("algebra","like",b,"%math%","",false) query II rowsort io.print(z) @@ -183,7 +183,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%m_th_a%t") +z:= mal.manifold("algebra","like",b,"%m_th_a%t","",false) query II rowsort io.print(z) @@ -212,7 +212,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%at%_!") +z:= mal.manifold("algebra","like",b,"%at%_!","",false) query II rowsort io.print(z) @@ -241,7 +241,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"1%") +z:= mal.manifold("algebra","like",b,"1%","",false) query II rowsort io.print(z) @@ -270,7 +270,7 @@ 9 1 statement ok -z:= mal.manifold("str","like",b,"3%") +z:= mal.manifold("algebra","like",b,"3%","",false) query II rowsort io.print(z) @@ -299,7 +299,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%1") +z:= mal.manifold("algebra","like",b,"%1","",false) query II rowsort io.print(z) @@ -328,7 +328,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%3") +z:= mal.manifold("algebra","like",b,"%3","",false) query II rowsort io.print(z) @@ -357,7 +357,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%1%") +z:= mal.manifold("algebra","like",b,"%1%","",false) query II rowsort io.print(z) @@ -386,7 +386,7 @@ 9 1 statement ok -z:= mal.manifold("str","like",b,"%12%") +z:= mal.manifold("algebra","like",b,"%12%","",false) query II rowsort io.print(z) @@ -415,7 +415,7 @@ 9 1 statement ok -z:= mal.manifold("str","like",b,"%13%") +z:= mal.manifold("algebra","like",b,"%13%","",false) query II rowsort io.print(z) @@ -444,7 +444,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%454%") +z:= mal.manifold("algebra","like",b,"%454%","",false) query II rowsort io.print(z) @@ -473,7 +473,7 @@ 9 0 statement ok -z:= mal.manifold("str","like",b,"%2%2%") +z:= mal.manifold("algebra","like",b,"%2%2%","",false) query II rowsort io.print(z) @@ -502,7 +502,7 @@ 9 1 statement ok -z:= mal.manifold("str","like",b,"_2_3%123") +z:= mal.manifold("algebra","like",b,"_2_3%123","",false) query II rowsort _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list