Changeset: 2e603403828e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2e603403828e
Modified Files:
sql/backends/monet5/dict.c
Branch: default
Log Message:
cheaper (cleaner) solution for the dict thetaselect, ie simply check if the
returned position has a matching value or not.
diffs (16 lines):
diff --git a/sql/backends/monet5/dict.c b/sql/backends/monet5/dict.c
--- a/sql/backends/monet5/dict.c
+++ b/sql/backends/monet5/dict.c
@@ -708,9 +708,10 @@ DICTthetaselect(Client cntxt, MalBlkPtr
} else if (op[0] == '<' || op[0] == '>') {
p = SORTfndfirst(lv, v);
if (p != BUN_NONE && op[0] == '<' && op[1] == '=') {
- BUN q = SORTfnd(lv, v);
- if (q == BUN_NONE)
+ BATiter li = bat_iterator(lv);
+ if (ATOMcmp(lv->ttype, v, BUNtail(li, p)) != 0)
p--;
+ bat_iterator_end(&li);
}
}
if (p != BUN_NONE) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]