[ 
https://issues.apache.org/jira/browse/ARROW-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769811#comment-16769811
 ] 

Nicolas Trinquier commented on ARROW-4464:
------------------------------------------

Thank you [~andygrove]. I do have some questions!

I have a working branch 
[here|https://github.com/apache/arrow/compare/master...ntrinquier:arrow-4464?expand=1],
 but there's a couple of things I couldn't figure out:
 * batch.num_rows() is an usize but when evaluating the limit I get a 
PrimitiveType. Right now I hard-coded i64 and I am not sure how to safely cast.
 * I'm evaluating the limit expression multiple times but I should only need to 
do that once.
 * (Also as a note to myself there's this big filter function that I copied and 
adapted from Filter and that needs refactoring)

> [Rust] [DataFusion] Add support for LIMIT
> -----------------------------------------
>
>                 Key: ARROW-4464
>                 URL: https://issues.apache.org/jira/browse/ARROW-4464
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust, Rust - DataFusion
>            Reporter: Andy Grove
>            Assignee: Nicolas Trinquier
>            Priority: Major
>             Fix For: 0.13.0
>
>
> As a user, I would like to be able to specify a LIMIT clause on my SQL 
> queries.
> Work involved:
>  * Add Limit to LogicalPlan enum
>  * Write query planner code to translate SQL AST to Limit (SQL parser that we 
> use already supports LIMIT)
>  * Implement LimitRelation (look at filter.rs as a guide since it is quite 
> similar)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to