andygrove commented on code in PR #2521:
URL: https://github.com/apache/arrow-datafusion/pull/2521#discussion_r872643055
##########
datafusion/core/src/sql/planner.rs:
##########
@@ -1259,6 +1262,33 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
}
}
+ /// Wrap a plan in a offset
+ fn offset(
+ &self,
+ input: LogicalPlan,
+ offset: Option<SQLOffset>,
+ ) -> Result<LogicalPlan> {
+ match offset {
+ Some(offset_expr) => {
+ let offset = match self.sql_to_rex(
+ offset_expr.value,
+ input.schema(),
+ &mut HashMap::new(),
+ )? {
+ Expr::Literal(ScalarValue::Int64(Some(offset))) => {
Review Comment:
We should probably have a check that the offset is `>= 0` ?
--
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]