richox commented on code in PR #1740:
URL: https://github.com/apache/auron/pull/1740#discussion_r2638448154
##########
native-engine/auron-serde/src/from_proto.rs:
##########
@@ -315,12 +315,18 @@ impl TryInto<Arc<dyn ExecutionPlan>> for
&protobuf::PhysicalPlanNode {
panic!("Failed to parse physical sort expressions: {}", e);
});
+ let fetch = sort.fetch_limit.as_ref();
+ let limit_for_sort = fetch.map(|f| f.limit as usize);
+ let offset = fetch.map(|f| f.offset as usize).unwrap_or(0);
+ let mut plan: Arc<dyn ExecutionPlan> =
+ Arc::new(SortExec::new(input, exprs, limit_for_sort));
+
+ if offset > 0 {
+ plan = Arc::new(LimitExec::new(plan, usize::MAX, offset));
Review Comment:
this nested execution plan will break metric nodes tree. i suggest to add a
new `offset` field to SortExec and handle offset logics in `SortExec::execute()`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]