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

Minor: Extract parent/child limit calculation into a function, improve docs #10501

Merged
merged 3 commits into from
May 15, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented May 14, 2024

Which issue does this PR close?

Part of #10292

Rationale for this change

While reviewing the code for PushDownLimit this logic is slightly tricky and a natural candidate to extract into a function to allow docstrings as well as to make the refactoring to avoid copies slightly easier

What changes are included in this PR?

  1. Extract parent/child limit calculation into a function
  2. improve doc formatting

Are these changes tested?

Existing CI

Are there any user-facing changes?

@github-actions github-actions bot added the optimizer Optimizer rules label May 14, 2024
(None, None) => None,
};
let (skip, fetch) =
combine_limit(limit.skip, limit.fetch, child.skip, child.fetch);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this PR just refactors all the existing logic to a function

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @alamb. a small minor

@alamb alamb merged commit ea9c325 into apache:main May 15, 2024
23 checks passed
@alamb
Copy link
Contributor Author

alamb commented May 15, 2024

Thanks for the review @comphead

findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
…e docs (apache#10501)

* Minor: Extract parent/child limit calculation into a function, improve docs

* Update datafusion/optimizer/src/push_down_limit.rs

Co-authored-by: Oleks V <[email protected]>

---------

Co-authored-by: Oleks V <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants