mingmwang commented on code in PR #5661:
URL: https://github.com/apache/arrow-datafusion/pull/5661#discussion_r1155342558
##########
datafusion/core/src/physical_optimizer/utils.rs:
##########
@@ -68,3 +74,40 @@ pub fn add_sort_above(
}
Ok(())
}
+
+/// Checks whether the given executor is a limit;
+/// i.e. either a [`LocalLimitExec`] or a [`GlobalLimitExec`].
+pub fn is_limit(plan: &Arc<dyn ExecutionPlan>) -> bool {
+ plan.as_any().is::<GlobalLimitExec>() ||
plan.as_any().is::<LocalLimitExec>()
+}
+
Review Comment:
I would suggest avoid using the word `executor`, maybe you can use input
`plan` or input `operator` instead.
Executor usually refers to different things, for example in Flink it is the
TaskManager, in Spark or Ballista it is the Worker who runs the tasks(physical
plan fragments).
--
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]