doris icon indicating copy to clipboard operation
doris copied to clipboard

[feature](nereids) support query cache and partition cache

Open xiaojunjie opened this issue 2 years ago • 2 comments

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

  1. Split corresponding conjuncts and rewrite logicalFilter to the new plan, named LogicalCache.
  2. CopyOut current root plan and print its treeString, which is used as the key of partition cache.
  3. Fetch cache data. Then logicalCache with cache-missed conjuncts will be rewrite back to logicalFilter
  4. 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)

xiaojunjie avatar Feb 21 '23 06:02 xiaojunjie

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!

github-actions[bot] avatar Oct 25 '23 00:10 github-actions[bot]