code: func addCachePlan(p PhysicalPlan, allocator *idAllocator) {
  	if len(p.GetChildren()) == 0 {
  		return
  	}
  	newChildren := make([]Plan, 0, len(p.GetChildren()))
  	for _, child := range p.GetChildren() {
  		addCachePlan(child.(PhysicalPlan), allocator)
  		if p.IsCorrelated() && !child.IsCorrelated() {
  			newChild := &Cache{}
  			newChild.tp = "Cache"
  			newChild.allocator = allocator
  			newChild.initIDAndContext(p.context())
  			newChild.SetSchema(child.GetSchema())
  
  			addChild(newChild, child)
  			newChild.SetParents(p)
  
  			newChildren = append(newChildren, newChild)
  		} else {
  			newChildren = append(newChildren, child)
  		}
  	}
  	p.SetChildren(newChildren...)
  }
docs: // addCachePlan will add a Cache plan above the plan whose father's IsCorrelated() is true but its own IsCorrelated() is false.