alamb opened a new issue, #9821:
URL: https://github.com/apache/arrow-datafusion/issues/9821

                 Could we change the `Limit` logical plan to support arbitrary 
expressions? 
   ```rust
   pub struct Limit {
       pub skip: Expr,
       pub fetch: Option<Expr>,
       pub input: Arc<LogicalPlan>,
   }
   ```
   The `SimplifyExpressions` rule can automatically optimize them into 
constants. Some optimization rules such as `PushDownLimit` only run when the 
limit expression is a constant. We may need to add a cast for the limit 
expression when planning, only checking if it is a constant of type u64.
   
   When creating the `LimitExec` physical plan, convert the limit expression 
into `PhysicalExpr` and evaluate it.
   
   _Originally posted by @jonahgao in 
https://github.com/apache/arrow-datafusion/pull/9790#discussion_r1539358701_
               


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

Reply via email to