[BugFix] Fix PushDownContext shallow copy bug#5199
[BugFix] Fix PushDownContext shallow copy bug#5199songkant-aws wants to merge 2 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Songkan Tang <songkant@amazon.com>
PR Reviewer Guide 🔍(Review updated until commit 21f8940)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 21f8940
Previous suggestionsSuggestions up to commit 62df8d2
|
Signed-off-by: Songkan Tang <songkant@amazon.com>
|
Persistent review updated to latest commit 21f8940 |
Description
PushdownContext.clone() / cloneWithoutSort() / cloneForAggregate() replays add(operation) to construct new context. Aggregation operations reuses the same
AggPushDownActioninstance in both old and new context due to shallow copy side effect happened during cloning PushdownContext. The following pushdown actions from other equivalent RelSubsets will modify this shared mutable action object, which could contaminate previous context's agg states.Related Issues
Resolves #5125
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.