Changeset: 306f9037af34 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/306f9037af34
Modified Files:
        gdk/gdk_join.c
Branch: default
Log Message:

Use properties.


diffs (22 lines):

diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -3987,12 +3987,17 @@ guess_uniques(BAT *b, struct canditer *c
 BUN
 BATguess_uniques(BAT *b, struct canditer *ci)
 {
+       BUN n = BUN_NONE;
+
        MT_lock_set(&b->theaplock);
-       BUN n = BUN_NONE;
        if (b->batCount == 0 || (ci && ci->ncand == 0))
                n = 0;
        else if (b->batCount == 1 || (ci && ci->ncand == 1))
                n = 1;
+       else if (b->tsorted && b->trevsorted)
+               n = 1;
+       else if (b->tkey)
+               n = ci ? ci->ncand : b->batCount;
        MT_lock_unset(&b->theaplock);
        if (n != BUN_NONE)
                return n;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to