Skip to content

Commit

Permalink
patch for group by + ordering + filter
Browse files Browse the repository at this point in the history
  • Loading branch information
msalvadores committed Mar 26, 2012
1 parent 935e22e commit 2847d55
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/frontend/results.c
Expand Up @@ -2522,6 +2522,7 @@ nextrow: ;

return q->resrow;
} else if (q->row >= q->length) {
returng: ;
if (q->aggregate_order) {
while (q->offset_aggregate > 0) {
q->offset_aggregate--;
Expand Down Expand Up @@ -2573,7 +2574,6 @@ nextrow: ;
}
next_row++;
} while (next_row < q->length && !constrain_group);

if (constrain_group) {
while (next_row < q->length && groups->data[ord->data[next_row]] == group) {
if (apply_constraints(q,ord->data[next_row]))
Expand All @@ -2585,8 +2585,10 @@ nextrow: ;
next_row++;
goto nextgroup;
}
} else
return NULL;
} else {
goto returng;
//return NULL;
}
} else {
long len = fs_binding_length(q->bt);
grows = fs_rid_vector_new(len);
Expand Down

0 comments on commit 2847d55

Please sign in to comment.