You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/05/24 10:39:42 UTC

[GitHub] [arrow-datafusion] alamb commented on issue #2551: Implement physical plan for OFFSET

alamb commented on issue #2551:
URL: https://github.com/apache/arrow-datafusion/issues/2551#issuecomment-1135751894

   Hi @hi-rustin 
   
   There is some more detail here https://github.com/apache/arrow-datafusion/pull/2521#issuecomment-1135736282
   
   Here are some queries and examples that should work
   
   Given this input:
   ```sql
   ❯ select * from (values (1), (3), (2), (10), (8)) order by column1;
   +---------+
   | column1 |
   +---------+
   | 1       |
   | 2       |
   | 3       |
   | 8       |
   | 10      |
   +---------+
   5 rows in set. Query took 0.010 seconds.
   ```
   
   Trying to run with an `offset` results in:
   ```sql
   ❯ select * from (values (1), (3), (2), (10), (8)) order by column1 limit 1 offset 2;
   Internal("Unsupported logical plan: OFFSET")
   ❯ select * from (values (1), (3), (2), (10), (8)) order by column1 limit 1 offset 3;
   Internal("Unsupported logical plan: OFFSET")
   ❯ select * from (values (1), (3), (2), (10), (8)) order by column1 limit 2 offset 3;
   Internal("Unsupported logical plan: OFFSET")
   ❯ 
   ```
   
   The answers should be:
   ```
   -- (3)
   ❯ select * from (values (1), (3), (2), (10), (8)) order by column1 limit 1 offset 2;
   -- (8)
   ❯ select * from (values (1), (3), (2), (10), (8)) order by column1 limit 1 offset 3;
   Internal("Unsupported logical plan: OFFSET")
   -- (8) (10)
   ❯ select * from (values (1), (3), (2), (10), (8)) order by column1 limit 2 offset 3;
   Internal("Unsupported logical plan: OFFSET")
   ```
   
   Does that help?


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