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

Commits on Mar 24, 2023

  1. [Bugfix] fix rewrite bug after insert new partition data (#20157)

    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)
    ABingHuang authored and mergify[bot] committed Mar 24, 2023
    Configuration menu
    Copy the full SHA
    c76db5b View commit details
    Browse the repository at this point in the history