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

Improve SortPreservingMerge::enable_round_robin_repartition docs #13826

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Dec 18, 2024

Which issue does this PR close?

Rationale for this change

While reviweing #13133 as we integrate it into InfluxDB I reviewed the behavior of SortPreservingMerge and what it did and wanted to encode my findings in some more docs

What changes are included in this PR?

  1. Improve the documentation

Are these changes tested?

by CI,

Are there any user-facing changes?

Only docs, no functional changes

@github-actions github-actions bot added the physical-expr Physical Expressions label Dec 18, 2024
@alamb alamb added documentation Improvements or additions to documentation and removed physical-expr Physical Expressions labels Dec 18, 2024
@alamb alamb changed the title Clarify SortPreservingMerge::enable_round_robin_repartition docs Improve SortPreservingMerge::enable_round_robin_repartition docs Dec 18, 2024
///
/// When true (the default) equal output rows are placed in the merged
/// stream when ready, which is faster but not stable (can vary from
/// run to run).
Copy link
Contributor

@jayzhan211 jayzhan211 Dec 18, 2024

Choose a reason for hiding this comment

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

From what I remember, round robin repartition choose the smaller index if other condition is equals (value and polled count is equal). If there are 3 streams, we choose 1, 2, 3 and back to 1, 2, 3 (because we know the polled count) until the value advanced. Do you know why the result vary from run to run and is not always the same?

Copy link
Contributor

@jayzhan211 jayzhan211 Dec 18, 2024

Choose a reason for hiding this comment

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

Poll may be pending because of networking so value is not yet ready? Better includes the reason in the comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants