fix aggregation with LIMIT
@@ -799,6 +799,9 @@ public class OSelectExecutionPlanner {
long aggregationLimit = -1;
if (info.orderBy == null && info.limit != null) {
aggregationLimit = info.limit.getValue(ctx);
+ if(info.skip!=null && info.skip.getValue(ctx) > 0){
+ aggregationLimit += info.skip.getValue(ctx);
+ }
}
result.chain(
new AggregateProjectionCalculationStep(
