alamb commented on code in PR #2694:
URL: https://github.com/apache/arrow-datafusion/pull/2694#discussion_r892780173


##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -906,15 +905,14 @@ impl DefaultPhysicalPlanner {
                     } else {
                         // Apply a LocalLimitExec to each partition. The 
optimizer will also insert
                         // a CoalescePartitionsExec between the 
GlobalLimitExec and LocalLimitExec
-                        Arc::new(LocalLimitExec::new(input, limit))
+                        if let Some(fetch) = fetch {
+                            Arc::new(LocalLimitExec::new(input, *fetch))

Review Comment:
   Looks good now:
   
   ```
   ❯ select * from test limit 2 offset 1;
   +----------+----------+
   | column_1 | column_2 |
   +----------+----------+
   | 3        | 4        |
   | a        | b        |
   +----------+----------+
   2 rows in set. Query took 0.039 seconds.
   ❯ 
   ```
   
   



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