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

[Bugfix] fix rewrite bug after insert new partition data (backport #20157) #20287

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 24, 2023

This is an automatic backport of pull request #20157 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Fix rewrite failure after inserting new partition data.
The bug reason is that the mv plan is cached, but the plan may change after ingestion with new partitions data.
And the logic of partition predicate calculation for mv rewrite depends on scan node's selected partition id,
which may change after ingestion. So it leads to invalid compensation predicate in mv rewrite,
which caused an invalid rewritten plan. Fix it by:
1. disable partition prune rules during compile mv plan, which will keep partition predicates in mv plan, to avoid the problem of caching plan
2. remove mv partition predicate compensation logic because it is not necessary after step 1. and it also fixed the problem of redundant partition predicates after partition prune of mv.

Signed-off-by: ABingHuang <[email protected]>
(cherry picked from commit ce97629)
@sonarcloud
Copy link

sonarcloud bot commented Mar 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@murphyatwork murphyatwork enabled auto-merge (squash) March 24, 2023 18:04
@wangruin wangruin closed this Mar 4, 2024
auto-merge was automatically disabled March 4, 2024 08:48

Pull request was closed

@wangruin wangruin deleted the mergify/bp/branch-2.5/pr-20157 branch March 4, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants