shivbhatia10 commented on code in PR #21057:
URL: https://github.com/apache/datafusion/pull/21057#discussion_r2973929807


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1392,6 +1392,82 @@ impl LogicalPlan {
         }
     }
 
+    /// Returns the skip (offset) of this plan node, if it has one.
+    ///
+    /// Only [`LogicalPlan::Limit`] carries a skip value; all other variants
+    /// return `Ok(None)`. Returns `Ok(None)` for a zero skip.
+    pub fn skip(&self) -> Result<Option<usize>> {

Review Comment:
   I think it might be confusing if limit returns an Option<usize>, but I could 
make it a boolean function like `fn has_internal_limit(&self) -> Result<bool>` 
instead if that's clearer than having two methods. Although I think these 
methods might be reusable in other contexts as they are now



##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -1392,6 +1392,82 @@ impl LogicalPlan {
         }
     }
 
+    /// Returns the skip (offset) of this plan node, if it has one.
+    ///
+    /// Only [`LogicalPlan::Limit`] carries a skip value; all other variants
+    /// return `Ok(None)`. Returns `Ok(None)` for a zero skip.
+    pub fn skip(&self) -> Result<Option<usize>> {

Review Comment:
   I think it might be confusing if limit returns an `Option<usize>`, but I 
could make it a boolean function like `fn has_internal_limit(&self) -> 
Result<bool>` instead if that's clearer than having two methods. Although I 
think these methods might be reusable in other contexts as they are now



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to