Skip to content

Commit 4cb72a0

Browse files
committed
disable cache experiment
1 parent f066a75 commit 4cb72a0

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

sql/analyzer/resolve_subqueries.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,17 +369,17 @@ func cacheSubqueryAliasesInJoins(ctx *sql.Context, a *Analyzer, n sql.Node, scop
369369
leftChild = false
370370
}
371371

372-
if len(newChildren) == 0 && !doCache {
372+
if len(newChildren) == 0 {
373373
return n, transform.SameTree, nil
374374
}
375375

376376
ret := n
377377
if len(newChildren) > 0 {
378378
ret, _ = ret.WithChildren(ctx, newChildren...)
379379
}
380-
if doCache {
381-
ret = plan.NewCachedResults(n, a.CachedResultsManager)
382-
}
380+
//if doCache {
381+
// ret = plan.NewCachedResults(n, a.CachedResultsManager)
382+
//}
383383
return ret, transform.NewTree, nil
384384
}
385385
return recurse(n, false, false, false)

sql/rowexec/other_iters.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ func (i *cachedResultsIter) cleanUp() {
207207

208208
func (i *cachedResultsIter) Close(ctx *sql.Context) error {
209209
i.cleanUp()
210+
i.parent.Dispose(ctx)
210211
return i.iter.Close(ctx)
211212
}
212213

@@ -248,9 +249,6 @@ func (h *hashLookupGeneratingIter) Next(ctx *sql.Context) (sql.Row, error) {
248249
}
249250

250251
func (h *hashLookupGeneratingIter) Close(c *sql.Context) error {
251-
if cr, ok := h.n.Child.(*plan.CachedResults); ok {
252-
cr.Dispose(c)
253-
}
254252
return h.childIter.Close(c)
255253
}
256254

0 commit comments

Comments
 (0)