You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/03/27 13:04:41 UTC

[I] Could we change the `Limit` logical plan to support arbitrary expressions? [arrow-datafusion]

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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Support arbitrary expressions in `LIMIT` clause [datafusion]

Posted by "jonahgao (via GitHub)" <gi...@apache.org>.
jonahgao commented on issue #9821:
URL: https://github.com/apache/datafusion/issues/9821#issuecomment-2414054675

   > While re-reading this I think we should start with implementhing limits that can be evaluated to a constant by the time the physical plan is created (aka don't change the physical execution plans)
   
   I will switch my focus to working on it.
   
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support arbitrary expressions in `LIMIT` clause [datafusion]

Posted by "jonahgao (via GitHub)" <gi...@apache.org>.
jonahgao closed issue #9821: Support arbitrary expressions in `LIMIT` clause
URL: https://github.com/apache/datafusion/issues/9821


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support arbitrary expressions in `LIMIT` clause [arrow-datafusion]

Posted by "Lordworms (via GitHub)" <gi...@apache.org>.
Lordworms commented on issue #9821:
URL: https://github.com/apache/arrow-datafusion/issues/9821#issuecomment-2028801844

   wait until https://github.com/apache/arrow-datafusion/pull/9815#issue-2209595815 merged


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Support arbitrary expressions in `LIMIT` clause [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #9821:
URL: https://github.com/apache/datafusion/issues/9821#issuecomment-2413520474

   While re-reading this I think we should start with implementhing limits that can be evaluated to a constant by the time the physical plan is created (aka don't change the physical execution plans)


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support arbitrary expressions in `LIMIT` clause [arrow-datafusion]

Posted by "Lordworms (via GitHub)" <gi...@apache.org>.
Lordworms commented on issue #9821:
URL: https://github.com/apache/arrow-datafusion/issues/9821#issuecomment-2022782440

   I can do this one since I have been doing a related limit pushdown feature.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Support arbitrary expressions in `LIMIT` clause [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #9821:
URL: https://github.com/apache/datafusion/issues/9821#issuecomment-2413517161

   This one is probably ready to work on 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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org