Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-46693][SQL] Inject LocalLimitExec when matching OffsetAndLimit…
… or LimitAndOffset ### What changes were proposed in this pull request? - Add LocalLimitExec to SparkStrategies in Limit + Offset cases - Add UT ### Why are the changes needed? Originally, `OffsetAndLimit` and `LimitAndOffset` match cases were matching then dropping a LocalLimit node. Adds this LocalLimitExec node to the physical plan to improve efficiency. Note that this was not a correctness bug since not applying LocalLimit only leads to larger intermediate shuffles / nodes. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? UT ### Was this patch authored or co-authored using generative AI tooling? No Closes #44699 from n-young-db/limit-offset-drops-local-limit. Authored-by: Nick Young <nick.young@databricks.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
- Loading branch information