cloud-fan commented on issue #27429: [SPARK-28330][SQL] Support ANSI SQL: result offset clause in query expression URL: https://github.com/apache/spark/pull/27429#issuecomment-581362656 > LocalLimitExec (limit = 10, offset = 10) // Take the first 20(limit + offset) rows locally This is `LocalLimitExec(20)`, seems we don't need to add "offset" parameter to `LocalLimitExec`? > GlobalLimitExec (limit = 10, offset = 10) // Skip the first 10 rows and take the next 10 rows globally Can we create a new operator `GlobalLimitAndOffset` for it? It's a bad idea to overload the sematic of an existing operator. > ... force running query when user knows the offset is small enough. Let's not add a feature that is disabled by default and not needed by most users. Maintaining a feature has cost. For OFFSET without LIMIT, we already have an operator `Tail`, which fails if it's not the root node. I think root node OFFSET is the most common use case and `Tail` is good enough. So a solution can be 1. For LIMIT ... OFFSET ... , create `GlobalLimitAndOffset(..., LocalLimit(...))` 2. For OFFSET only, create `Tail`.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org