Changeset: 978a2b87f602 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=978a2b87f602
Modified Files:
sql/backends/monet5/sql_gencode.c
Branch: default
Log Message:
fixed problem in using firstn with group result
diffs (26 lines):
diff --git a/sql/backends/monet5/sql_gencode.c
b/sql/backends/monet5/sql_gencode.c
--- a/sql/backends/monet5/sql_gencode.c
+++ b/sql/backends/monet5/sql_gencode.c
@@ -1002,10 +1002,10 @@ static int
return -1;
c = k;
}
- if (s->flag) {
- int topn = 0, flag = s->flag, utopn = flag & 2;
+ if (s->flag&1) {
+ int topn = 0, flag = s->flag, grps = flag & 2;
- flag >>= 2;
+ flag >>= 1;
q = newStmt1(mb, calcRef, "+");
q = pushArgument(mb, q, offset);
@@ -1015,7 +1015,7 @@ static int
topn = getDestVar(q);
q = newStmt(mb, algebraRef, firstnRef);
- if (utopn)
+ if (grps) /* we need the groups for the next
firstn */
q = pushReturn(mb, q,
newTmpVariable(mb, TYPE_any));
q = pushArgument(mb, q, c);
if (p)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list