Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native] Derive TableScan stream type as FIXED #24468

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

arhimondr
Copy link
Member

Description

In native a fixed number of drivers is created for a pipeline containing TableScan

Motivation and Context

To avoid unnecessary local exchange when fixed number of streams is necessary (for example for TableWriteOperator)

Impact

Improved performance for certain type of INSERT INTO queries

Test Plan

CI, Unit Tests

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.

== NO RELEASE NOTE ==

@facebook-github-bot
Copy link
Collaborator

@arhimondr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jaystarshot
Copy link
Member

jaystarshot commented Jan 31, 2025

// Native execution creates a fixed number of drivers for TableScan pipelines

Is there a reason why only native execution creates fixed number of drivers?

@arhimondr
Copy link
Member Author

In Presto (Java) the number of TableScan drivers created was chosen adaptively. That added a lot of complexity to TaskExecutor and the benefit was not clear.

In Velox the number of TableScan drivers is fixed. The adaptivity can still be achieved via delivering splits to only a subset of TableScan drivers without going into complexity of managing the number of drivers dynamically. Here's an example where @xiaoxmeng adds TableScan scaling: facebookincubator/velox#11879

@arhimondr arhimondr force-pushed the table_scan_fixed_prestissimo branch from 320464c to f45a1eb Compare February 7, 2025 19:08
@arhimondr arhimondr requested a review from a team as a code owner February 7, 2025 19:08
@arhimondr arhimondr changed the title [WIP] [native] Derive TableScan stream type as FIXED [native] Derive TableScan stream type as FIXED Feb 7, 2025
@arhimondr
Copy link
Member Author

Ready for review

Copy link
Contributor

@amitkdutta amitkdutta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @arhimondr

Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @arhimondr for this PR and the context.

In native a fixed number of drivers is created for a pipeline containing
TableScan
@arhimondr arhimondr force-pushed the table_scan_fixed_prestissimo branch from f45a1eb to 0ba7548 Compare February 10, 2025 23:20
@facebook-github-bot
Copy link
Collaborator

@arhimondr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@arhimondr arhimondr merged commit 099bd42 into prestodb:master Feb 11, 2025
62 of 63 checks passed
@arhimondr arhimondr deleted the table_scan_fixed_prestissimo branch February 11, 2025 01:23
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.

7 participants