Skip to content

Fix distributed sort parallelism for single node execution#25022

Merged
arhimondr merged 1 commit into
prestodb:masterfrom
arhimondr:fix_sort_parallelism
May 1, 2025
Merged

Fix distributed sort parallelism for single node execution#25022
arhimondr merged 1 commit into
prestodb:masterfrom
arhimondr:fix_sort_parallelism

Conversation

@arhimondr

@arhimondr arhimondr commented May 1, 2025

Copy link
Copy Markdown
Member

Description

The AddExchanges optimizer rule is disabled for single node execution. The AddExchanges was responsible for marking the SortNode as partial. When the SortNode is not marked as partial, Velox only runs a single instance of a pipeline containing a SortNode.

Motivation and Context

Improve parallelism for queries running in single node mode containing ORDER BY

Impact

Improved performance for ORDER BY queries running in single node mode

Test Plan

Integration test

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Improve performance of ORDER BY queries on single node execution :pr:`25022`

The AddExchanges optimizer rule is disabled for single node execution.
The AddExchanges was responsible for marking the SortNode as partial.
When the SortNode is not marked as partial, Velox only runs a single
instance of a pipeline containing a SortNode.
@arhimondr arhimondr requested review from a team as code owners May 1, 2025 15:43
@arhimondr arhimondr requested a review from jaystarshot May 1, 2025 15:43
@prestodb-ci prestodb-ci added the from:Meta PR from Meta label May 1, 2025
@arhimondr arhimondr merged commit e540ed9 into prestodb:master May 1, 2025
@arhimondr arhimondr deleted the fix_sort_parallelism branch May 1, 2025 21:50
@ZacBlanco ZacBlanco mentioned this pull request May 29, 2025
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:Meta PR from Meta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants