Skip to content

Releases: coralogix/arrow-datafusion

v45.0.0-cx.4: Take 2860ada from upstream (#20048) (#393)

30 Jan 17:59
5e1137e

Choose a tag to compare

fix: The limit_pushdown physical optimization rule removes limits in some cases leading to incorrect results (#20048)
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->

None

## Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
Bug 1: When pushing down limits, we recurse down the physical plan
accumulating limits until we reach a node where we can't push the limit
down further. At this point, we insert another limit executor (or push
it into the current node, if that node supports it). After this, we
continue recursing to try to find more limits to push down. If we do
find another, we remove it, but we don't set the
`GlobalRequirements::satisfied` field back to false, meaning we don't
always re-insert this limit.

Bug 2: When we're pushing down a limit with a skip/offset and no
fetch/limit and we run into a node that supports fetch, we set
`GlobalRequirements::satisfied` to true. This is wrong: the limit is not
satisfied because fetch doesn't support skip/offset. Instead, we should
set `GlobalRequirements::satisfied` to true if skip/offset is 0.

## What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
This includes a one-line change to the push down limit logic that fixes
the issue.

## Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

I added a test that replicates the issue and fails without this change.

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
No
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->

v43.0.0-cx.4

06 Nov 19:14
ab0491e

Choose a tag to compare

What's Changed

Full Changelog: v43.0.0-cx.3...v43.0.0-cx.4

v43.0.0-cx.3

06 Nov 16:50
8d32a8c

Choose a tag to compare

What's Changed

Full Changelog: https://github.com/coralogix/arrow-datafusion/commits/v43.0.0-cx.3

v42.0.0-cx.18

01 Jul 15:13
a040394

Choose a tag to compare

Use partial aggregation schema for spilling to avoid column mismatch …

v42.0.0-cx.17

21 Jun 18:15
6c90e2c

Choose a tag to compare

What's Changed

Full Changelog: v42.0.0-cx.16...v42.0.0-cx.17

v42.0.0-cx.16

19 Jun 06:55
2fb45f8

Choose a tag to compare

What's Changed

Full Changelog: v42.0.0-cx.15...v42.0.0-cx.16

v42.0.0-cx.15 (DO NOT USE)

19 Jun 05:42
f7a5ed0

Choose a tag to compare

What's Changed

Full Changelog: v42.0.0-cx.13...v42.0.0-cx.15

v42.0.0-cx.13

07 May 17:21
a103bac

Choose a tag to compare

What's Changed

Full Changelog: v42.0.0-cx.12...v42.0.0-cx.13

v42.0.0-cx.12

06 May 20:03
a581f23

Choose a tag to compare

What's Changed

Full Changelog: v42.0.0-cx.11...v42.0.0-cx.12

v42.0.0-cx.11

30 Apr 10:52
f2e5c20

Choose a tag to compare

What's Changed

Full Changelog: https://github.com/coralogix/arrow-datafusion/commits/v42.0.0-cx.11