fix: use the original limit
@@ -73,8 +73,9 @@ impl BlockPruner {
Some(filters) => filters.is_empty(),
};
- // shortcut, just returns all the blocks
- if limit.is_none() && is_filter_empty {
+ // shortcut, just returns all the blocks.
+ // we use the original limit (from push_down) here, since order_by alone, can use shortcut
+ if push_down.as_ref().and_then(|p| p.limit).is_none() && is_filter_empty {
return Self::all_the_blocks(segment_locs, ctx.as_ref()).await;
}
