Changeset: e36411b74424 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e36411b74424
Modified Files:
        gdk/gdk_aggr.c
Branch: Jun2023
Log Message:

Some tweaks to the min/max aggregate.


diffs (30 lines):

diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c
--- a/gdk/gdk_aggr.c
+++ b/gdk/gdk_aggr.c
@@ -3674,7 +3674,7 @@ BATmin_skipnil(BAT *b, void *aggr, bit s
                        if (oidxh != NULL) {
                                const oid *ords = (const oid *) oidxh->base + 
ORDERIDXOFF;
                                BUN r;
-                               if (!bi.nonil) {
+                               if (skipnil && !bi.nonil) {
                                        MT_thread_setalgorithm(usepoidx ? 
"binsearch on parent oidx" : "binsearch on oidx");
                                        r = binsearch(ords, 0, bi.type, bi.base,
                                                      bi.vh ? bi.vh->base : 
NULL,
@@ -3820,15 +3820,14 @@ BATmax_skipnil(BAT *b, void *aggr, bit s
                        if (skipnil && !bi.nonil &&
                            ATOMcmp(bi.type, BUNtail(bi, bi.count - 1),
                                    ATOMnilptr(bi.type)) == 0)
-                               goto slow;
+                               pos = oid_nil; /* no non-nil values */
                } else if (BATordered_rev(b)) {
                        pos = b->hseqbase;
                        if (skipnil && !bi.nonil &&
                            ATOMcmp(bi.type, BUNtail(bi, 0),
                                    ATOMnilptr(bi.type)) == 0)
-                               goto slow;
+                               pos = oid_nil; /* no non-nil values */
                } else {
-                 slow:
                        if (BATcheckorderidx(b)) {
                                MT_lock_set(&b->batIdxLock);
                                oidxh = b->torderidx;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to