doris
doris copied to clipboard
[feature](nereids) support query cache and partition cache
Proposed changes
Issue Number: close #15394 #15395 #15396
Problem summary
The original process of NereidsPlan includes analysis, rewriting and optimization. This newly added cache works after rewriting, before optimization.
query cache
The treeString of rewritePlan is used as the key of query cache. If successfully fetch cache data, the process of NereidsPlan will end. Otherwise, continue.
partition cache
- Split corresponding conjuncts and rewrite logicalFilter to the new plan, named LogicalCache.
- CopyOut current root plan and print its treeString, which is used as the key of partition cache.
- Fetch cache data. Then logicalCache with cache-missed conjuncts will be rewrite back to logicalFilter
- Continue the rest of the process of NereidsPlan.
Checklist(Required)
- [x] Does it affect the original behavior
- [ ] Has unit tests been added
- [ ] Has document been added or modified
- [ ] Does it need to update dependencies
- [ ] Is this PR support rollback (If NO, please explain WHY)
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!