Changeset: a25745accd10 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a25745accd10
Modified Files:
        monetdb5/optimizer/opt_mergetable.c
        sql/backends/monet5/rel_bin.c
Branch: default
Log Message:

Merge with Dec2025 branch.


diffs (60 lines):

diff --git a/monetdb5/optimizer/opt_mergetable.c 
b/monetdb5/optimizer/opt_mergetable.c
--- a/monetdb5/optimizer/opt_mergetable.c
+++ b/monetdb5/optimizer/opt_mergetable.c
@@ -2116,7 +2116,7 @@ mat_topn(allocator *ma, MalBlkPtr mb, In
 
        if (is_slice) {
                ValRecord cst;
-               cst.vtype = getArgType(mb, p, 2);
+               cst.vtype = TYPE_lng;
                cst.val.lval = 0;
                cst.len = 0;
                no_offset = defConstant(mb, cst.vtype, &cst);
@@ -2126,7 +2126,7 @@ mat_topn(allocator *ma, MalBlkPtr mb, In
                }
        } else {
                ValRecord cst;
-               cst.vtype = getArgType(mb, p, 6);
+               cst.vtype = TYPE_bit;
                cst.val.btval = 1;
                cst.len = 0;
                no_offset = defConstant(mb, cst.vtype, &cst);
@@ -2156,7 +2156,7 @@ mat_topn(allocator *ma, MalBlkPtr mb, In
                        getArg(q, q->retc + 2) = getArg(ml->v[o].mi, k);
                }
                if (!is_slice)
-                       getArg(q, 6) = no_offset; /* only return the 0 - 
limit+offset, later reduce too offset-limit */
+                       getArg(q, q->retc + 5) = no_offset; /* only return the 
0 - limit+offset, later reduce to offset-limit */
                pushInstruction(mb, q);
 
                pck = pushArgument(mb, pck, getArg(q, 0));
diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -5133,17 +5133,6 @@ rel2bin_groupby(backend *be, sql_rel *re
        return cursub;
 }
 
-static bool
-has_partitioning( list *exps )
-{
-       for(node *n = exps->h; n; n = n->next){
-               sql_exp *gbe = n->data;
-               if (is_partitioning(gbe))
-                       return true;
-       }
-       return false;
-}
-
 static stmt *
 rel2bin_topn(backend *be, sql_rel *rel, list *refs)
 {
@@ -5188,8 +5177,6 @@ rel2bin_topn(backend *be, sql_rel *rel, 
                                        sub = sub_topn(be, sub, NULL, rel, 
rl->r, l, o, need_distinct(rl));
                        } else
                                sub = rel2bin_project(be, rl, refs, rel);
-                       if (0 && rel->grouped && rl->r && 
has_partitioning(rl->r))
-                               return sub;
                        if (rl->r && le)
                                return sub;
                } else {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to