Skip to content

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 and others added 2 commits May 15, 2024 13:35
@alamb alamb merged commit ea9c325 into apache:main May 15, 2024
@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 <comphead@users.noreply.github.com>

---------

Co-authored-by: Oleks V <comphead@users.noreply.github.com>
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